dpif-netlink: Fix windows build.

Commit 7af12bd "dpif: Generate flow_hash for revalidators in dpif."
broke compilation on windows. Fix it.

Signed-off-by: Joe Stringer <joestringer@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
lib/route-table-*: Fix non-Linux builds

Fix build failures introduced by
commit 1bc50ef389d40be9ee215e66b49cf66fcbdb9eeb
("dpctl: Fix crash.")

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Acked-by: Ben Pfaff <blp@nicira.com>
flow.h: Simplify MAP_FOR_EACH_INDEX()

Avoid comparing against specific values.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
flow: Define miniflow_get__() to simplify code.

miniflow_get__() can be used when it is known that the miniflow stores
a value at the given index.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
flow.c: Improve minimask_equal() and minimask_has_extra().

minimask_equal() and minimask_has_extra() can take benefit from the
fact that minimasks have no zero data.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
lib: Use MAP_FOR_EACH_INDEX to improve readability.

Use MAP_FOR_EACH_INDEX to improve readability when there is no
apparent cost for it.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
classifier: Silence sparse warning (sparse bug)

This silences the following sparse warning which appears to be a bug
in sparse:

	lib/classifier-private.h:210:45: warning: call with no type!
	lib/classifier-private.h:179:45: warning: call with no type!

Can be reverted when sparse has been fixed.

Cc: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
iVXLAN support

 * iVXLAN protocol parsing
 * iVXLAN sEPG and bitmask fields

    Basically extend the source policy applied bit, so the field a u8
    reflects a bitmask of all the flags.

    enum ivxlan_extension_flags {
        IVXLAN_SPA    = 1 << 0, /* Source Policy Applied */
        IVXLAN_DPA    = 1 << 1, /* Destination Policy Applied */
        IVXLAN_LB     = 1 << 2, /* Load Balancing Enabled */
        IVXLAN_DL     = 1 << 3, /* Don't Learn inner source addr to TEP */
        IVXLAN_FE     = 1 << 4, /* Forwarding exception seen */
        IVXLAN_MCAST  = 1 << 5, /* Multicast Routing Enabled */
        IVXLAN_MARK   = 1 << 6  /* Marker for atomic counters */
    };
lib: Move compiler.h to <openvswitch/compiler.h>

Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
lib: Expose token-bucket as <openvswitch/token-bucket.h>

The API is properly prefixed and can be exposes as-is.

Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
lib: Factor out definition of ofputil_protocol.

Compiling ofp-util.h with a C++ compiler fails because
meta-flow.h (included from ofp-util.h) uses this enum
prior to its definition in ofp-util.h. This is mainly
due to differences in enum handling between C and C++.
This change moves the definition of the enum to its
own file.

Signed-off-by: Amit Bose <bose@noironetworks.com>
lib: testcase