datapath-windows: Don't leak NBLs with multiple NBs.

Currently, if we receive an NBL with multiple NBs from NDIS, we just
ASSERT() and not do anything. The right thing to do obviously is to
process the NBL. This is a work in progress.

In the meantime, we should complete the NBL and not just leak it.

Signed-off-by: Nithin Raju <nithin@vmware.com>
Acked-by: Eitan Eliahu <eliahue@vmware.com>
Tested-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
datapath-windows: Nuke USE_NEW_VPORT_ADD_WORKFLOW.

We were using USE_NEW_VPORT_ADD_WORKFLOW while transitioning from old
workflow for adding ports. We don't need it anymore.

Signed-off-by: Nithin Raju <nithin@vmware.com>
Acked-by: Eitan Eliahu <eliahue@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
datapath-windows: Fix locking code in OvsGetNetdevCmdHandler().

We were acquiring locks twice, and forgotten to release a lock in an
error case.

Signed-off-by: Nithin Raju <nithin@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
datapath-windows: Increase the maximum size of port name.

In userspace, port name sizes are restricted to IFNAMSIZ which is
defined to IF_NAME_SIZE in:
C:\Program Files (x86)\Windows Kits\8.1\Include\shared\netioapi.h

In the kernel, since IFNAMSIZ was not available, we previously defined a
value of 16 for the kernel. This is restrictive for Openstack
integration where we use UUID as the name.

In this patch, we make the kernel code also use the same value as the
userspace.

Also updated is the OVS.psm1 powershell script which now allows friendly
names to be upto 48 bytes.

Signed-off-by: Nithin Raju <nithin@vmware.com>
Acked-by: Eitan Eliahu <eliahue@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
AUTHORS: Add Scott Lowe <scott.lowe@scottlowe.org>.

Contributors to the webpage deserve authorship credit too.

CC: Scott Lowe <scott.lowe@scottlowe.org>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ovs-ofctl: Free group buckets.

To some extent this is cosmetic because ovs-ovfctl will immediately
exit. However, it does seem to be in keeping with freeing 'gms' in
ofctl_group_mod_file().

Found by inspection using make check-valgrind.

Signed-off-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ofp-print-ofctl: Free group buckets.

Found by inspection using make check-valgrind.

Signed-off-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ovs-ofctl: Improve error message for meter=0.

Signed-off-by: Joe Stringer <joestringer@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
odp-util: Fix segfault in MPLS attribute parsing.

Just because the ethertype is MPLS, this doesn't mean that the datapath
understands and provides OVS_KEY_ATTR_MPLS attributes for the flow.
Previously we would check the size of the OVS_KEY_ATTR_MPLS attribute
before checking whether the attribute is present. This would cause a
segfault in nl_attr_get_size(), usually triggered from a handler thread.

This patch brings the MPLS parsing code more in line with the rest of
the parse_l2_5_onward() function, by only processing MPLS if the
attribute is present.

Reported-by: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: Joe Stringer <joestringer@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
classifier: Use rculist.

The list of identical, but lower priority rules is not currently used
in classifier lookup.  A later patch introducing conjunctive matches
needs to access the list during lookups, so we must make the list RCU.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
test-classifier: Ensure priority is not INT_MIN.

Classifier reserves the priority value INT_MIN for its own use.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>