datapath: Check if nla_is_last() is available in <net/netlink.h>

nla_is_last() is not available in 3.18, it's only in net-next.
Convert to grep based to check to account for distribution backports.

Fixes: 684b5f ("datapath: Rename last_action() as nla_is_last() and move to netlink.h")
Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
datapath: Mark compatible with kernels up to 3.18.x

Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
datapath: Account for rename to vlan_insert_tag_set_proto()

__vlan_put_tag() was renamed to vlan_insert_tag_set_proto() with
the argument list kept intact.

Relates-to: 62749e ("vlan: rename __vlan_put_tag to vlan_insert_tag_set_proto")
Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
datapath: Account for already defined NETIF_F_GSO_ENCAP_ALL

Relates-to: f6eec614 ("openvswitch: Enable tunnel GSO for OVS bridge.")
Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
datapath: Use central function to free sw_flow_actions

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 */
    };