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>
configure: Identify OpenSSL libraries in Windows.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
socket-util: Remove unused functions.

A Windows porter mentioned to me that these functions caused special
trouble in the Windows port.  However, they are no longer used, so we
might as well remove them.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>