datapath: Fix inconsistency in upstream and out of tree ovs module.

There is a inconsistent ordering in function ovs_vport_cmd_set()
between upstream and out of tree ovs module. Following patch
fixes it by releasing lock before calling ovs_notify.

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
datapath: Fix struct vport comment.

Removes remaining part of comment about `linkname` vport member.

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Add a tutorial for advanced Open vSwitch features.

Signed-off-by: Ben Pfaff <blp@nicira.com>
fix an obvious mistake in a test of IFM_ETHER

fix a bug in FreeBSD code.  the fix is suggested by Ed Maste.

Signed-off-by: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
add ax_check_openssl.m4

this file is obtained from:
http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=blob_plain;f=m4/ax_check_openssl.m4;hb=5a7260331c7d13263126e35c5743fdc35cbc2894

Signed-off-by: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
use ax_check_openssl.m4 instead of a direct use of pkg-config.

on some platforms, including NetBSD-6, openssl is available but
its pkg-config files (*.pc) are not.  according to Ed Maste,
this is the case for FreeBSD as well.

Signed-off-by: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
remove remaining pkg-config references

Signed-off-by: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
include strings.h for strcasecmp

while this is not the only place strcasecmp is used without an
explicit inclusion of the header, it's the only place gcc complains
on my environment.  for other places, probably the header is included
indirectly via other headers, i guess.

Signed-off-by: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ovs-pki: Add NetBSD case for test

Signed-off-by: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
explicitly invoke perl for uuidfilt.pl (rather than via shebang)

depending on a platform, perl might not be /usr/bin/perl.
eg. on NetBSD it's usually /usr/pkg/bin/perl.

Signed-off-by: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
invoke perl as ${PERL}

as suggested by Ben Pfaff.

Signed-off-by: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
change the type of popcount unsigned

it's a natural choice and compatible with a version found in NetBSD libc.

Signed-off-by: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
be compilable even when _SC_PHYS_PAGES is not available

Signed-off-by: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
some ctype related casts to suppress gcc warnings on NetBSD

where it can't be EOF, cast a value to unsigned char before passing it
to ctype functions to avoid unintended sign extension.

Signed-off-by: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
include some headers to satisfy header file dependencies on NetBSD-6

while this change don't seem to be necessary on NetBSD-current,
NetBSD-6 is the latest release at this point.

Signed-off-by: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
use RT_ROUNDUP on NetBSD

Signed-off-by: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
odp-util: Keep base flow in sync with the kernel view.

Change the base flow only if a corresponding kernel action is generated
in commit_odp_tunnel_action().

Signed-off-by: Jarno Rajahalme <jarno.rajahalme@nsn.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ofproto-dpif: Restore flow nw_tos in all cases.

Signed-off-by: Jarno Rajahalme <jarno.rajahalme@nsn.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Restore all flow changes by compose_output_action__().

This makes sure that output actions leave no changes to any flow fields,
while all explicit set_field actions are retained across output actions.

Signed-off-by: Jarno Rajahalme <jarno.rajahalme@nsn.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Implement IPFIX export

Define a new NXAST_SAMPLE OpenFlow vendor action and the corresponding
OFPACT_SAMPLE OVS action, to do per-flow packet sampling, translated
into a new SAMPLE "flow_sample" dp action.

Make the userspace action's userdata size vary depending on the union
member used.  Add a new "flow_sample" upcall to do per-flow packet
sampling.  Add a new "ipfix" upcall to do per-bridge packet sampling
to IPFIX collectors.

Extend the OVSDB schema to support configuring IPFIX collector sets.
Add support for configuring multiple IPFIX collectors for per-flow
packet sampling.  Add support for configuring per-bridge IPFIX
sampling.

Automatically generate standard IPFIX entity definitions from the IANA
specs.  Send one IPFIX data record message for every packet sampled by
an OpenFlow sample action or received by a bridge configured with
IPFIX sampling, and periodically send IPFIX template set messages.

Signed-off-by: Romain Lenglet <rlenglet@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>