ofproto: Update rule's priority in eviction group.

We do call heap_rebuild in ofproto_run, but we do not update rule's
priority with latest hard_timeout and idle_timeout before heap_rebuild.

This patch ensures that rule's priority has been updated before
heap_rebuild, and adds two test cases to check eviction with modified
hard_timeout and idle_timwout.

Signed-off-by: kmindg <kmindg@gmail.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ovsdb-server: Truncate file for Windows.

There is no ftruncate() in visual studio. There is a _chsize_s()
which has a similar functionality.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
uuid: Use current time to compute sha.

Windows does not have the getppid(), getuid(), getgid() functions.
We do get a random seed from CryptGenRandom(). That seed along with
process id and current time hopefully is good enough.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
ofp-print: __attribute__ format in visual studio.

Visual studio does not understand __attribute__ format.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
learn.at: wrap long comments

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
learn.at: fix a comment

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
learn.at: fix a race in "self-modifying flow with hard_timeout" test

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>