ofproto-dpif-upcall: Hardcode max_idle to 1500ms.

Before this patch, OVS tried to guess an optimal max idle time for
datapath flows based on the number of datapath flows relative to the
limit.  This caused instability because the limit was based on the
dump duration which was affected by the max idle time.  This patch
chooses instead to hardcode the max idle time to 1.5s except in
extreme case where the datapath flow limit is exceeded.  1.5s was
chosen to ensure pings occurring at once per second stay cached in the
datapath.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Joe Stringer <joestringer@nicira.com>
bridge: Set ofport column in every database transaction.

Database transactions can occasionally fail due to concurrent changes in
the database.  When that happens, the next transaction should repeat the
changes that ovs-vswitchd tried to make the first time (adjusted for the
changes to the database).

The code to report the OpenFlow port number in use didn't do that.  It set
the ofport field once when it created the port and never set it again, even
if the transaction to set it failed.  This commit fixes the problem.

Bug #23047.
Reported-by: Suganya Ramachandran <suganyar@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Justin Pettit <jpettit@nicira.com>
BUILD.Windows: Clarify on the correct linker.

This has tripped a couple of people.

The workaround in cccl does not actually work. So get rid of it and
clarify in documentation.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
BUILD.Windows: Add documentation to handle the libtool change.

With the recent change to libtool, the default behavior is to use
MinGW's 'ld'. Set the LD variable to direct it to Visual Studio's
linker.

The wordings for the documentation is copied from INSTALL.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
cccl: Handle library paths for one shot compilation.

When one wishes to compile and link a program with an
external library in one shot, additional
option "-link" is expected after all the other options. For example,

$ cl -I/c/OpenSSL-Win32/include 3.c -link -LIBPATH:"C:/OpenSSL-Win32/lib"

This is needed in an upcoming commit to compile conftest.c in autoconf.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
datapath: Fix ovs_flow_free() ovs-lock assert.

ovs_flow_free() is not called under ovs-lock during packet
execute path (ovs_packet_cmd_execute()). Since packet execute
does not touch flow->mask, there is no need to take that
lock either. So move assert in case where flow->mask is checked.

Found by code inspection.

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>