dpif-netdev: Avoid variable length array on MSVC.

MSVC does not like variable length array either.

This patch treats the following error:

lib/dpif-netdev.c(2272) : error C2057: expected constant expression
lib/dpif-netdev.c(2272) : error C2466: cannot allocate an array of constant size 0
lib/dpif-netdev.c(2272) : error C2133: 'batches' : unknown size
lib/dpif-netdev.c(2273) : error C2057: expected constant expression
lib/dpif-netdev.c(2273) : error C2466: cannot allocate an array of constant size 0
lib/dpif-netdev.c(2273) : error C2133: 'mfs' : unknown size
lib/dpif-netdev.c(2274) : error C2057: expected constant expression
lib/dpif-netdev.c(2274) : error C2466: cannot allocate an array of constant size 0
lib/dpif-netdev.c(2274) : error C2133: 'rules' : unknown size
lib/dpif-netdev.c(2363) : warning C4034: sizeof returns 0
lib/dpif-netdev.c(2381) : error C2057: expected constant expression
lib/dpif-netdev.c(2381) : error C2466: cannot allocate an array of constant size 0
lib/dpif-netdev.c(2381) : error C2133: 'keys' : unknown size
make[2]: *** [lib/dpif-netdev.lo] Error 1

Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
travis: Announce travis CI and new build list in NEWS and CONTRIBUTING

Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
test-stp: Fix leak of open file descriptor for input_file

Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
test-bitmap: Fix multiple minor memory leaks

Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ofp-actions: Support "resubmit" actions in action sets.

Fixing issue where "resubmit" action in a group action set was not
considered sufficient to retain the full action set. This patch allows
a group action set (considered terminal with OF1.4 and earlier spec)
to have the "output" action come from a different table.

Signed-off-by: Srini Seetharaman <srini.seetharaman@gmail.com>
[blp@nicira.com added documentation]
Signed-off-by: Ben Pfaff <blp@nicira.com>
ovs-vsctl: Correctly exit on errors for non-map types in "remove" command.

Reported-by: Thomas Graf <tgraf@noironetworks.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Thomas Graf <tgraf@noironetworks.com>
getopt_long: Fix broken sequence of casts in __UNCONST macor.

Unlike the compilation mode used for OVS x64 Linux Windows long word is
4 bytes for both 32 and 64 bit builds.
Replaced _UNCONST macro with CONST_CAST to avoid the intermediate casting
to an integer.

Testing: 32 and 64 Windows builds.
Signed-off-by: Eitan Eliahu eliahue@vmware.com
Signed-off-by: Ben Pfaff <blp@nicira.com>
datapath: fix a memory leak

The user_skb maybe be leaked if the operation on it failed and codes
skipped into the label "out:" without calling genlmsg_unicast.

Cc: Pravin Shelar <pshelar@nicira.com>
Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
netdev-dpdk: Make memory pool name contain the socket id.

This commit makes the memory pool name contain the socket id.
Since dpdk library do not allow creation of memory pool with
same name, this commit serves as a simple way of making each
name unique.

Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Thomas Graf <tgraf@noironetworks.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
packet: Fix sparse warnings ICMPv6.

The system defined ICMPv6 header doesn't have sparse annotation,
so this adds a definition so that endianness can be checked.

Reported-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
netdev-dpdk: Show interface status for dpdk0.

This commit fixes a bug which prevents the display of interface
status for dpdk0.

Found by inspection.

Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
vtep: additions to BFD configuration and status reporting

This commit adds default values for some BFD configuration keys
(bfd_config_local:bfd_dst_mac and bfd_params:enable). It also adds new
BFD status keys (bfd_enabled and bfd_info).

Signed-off-by: Ariel Tubaltsev <atubaltsev@vmware.com>
Signed-off-by: Bruce Davie <bdavie@vmware.com>
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
dpif-netdev: Introduce port_try_ref() to prevent a race.

When pmd thread interates through all ports for queue loading,
the main thread may unreference and 'rcu-free' a port before
pmd thread take new reference of it.  This could cause pmd
thread fail the reference and access freed memory later.

This commit fixes this race by introducing port_try_ref()
which uses ovs_refcount_try_ref_rcu().  And the pmd thread
will only load the port's queue, if port_try_ref() returns
true.

Found by inspection.

Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>