vtep: Use unicast MAC as an example for a unicast destination in README.

Until now, the example for a unicast MAC has been a multicast MAC.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
dpif-netdev: Fix a race.

On current master, the 'struct dp_netdev_port' is destroyed
immediately when the ref count reaches 0.  However, non-pmd
threads calling the dpif_netdev_execute() for sending packets
could hold pointer to 'port' that is not ref-counted.  Thusly
those threads could possibly access freed memory when the port
is deleted.

To fix this bug, this commit makes non-pmd threads acquiring
the 'port_mutex' before doing the actual execution in
dpif_netdev_execute().

Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Pravin B Shelar <pshelar@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>
datapath: Compatibility to 3.18 kernels

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