X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Flinux%2Fopenvswitch.h;h=b12bf0c830f7a2226a80aa7f2eadcd1ab92622b0;hb=305b76debf72120672a8ba81d3356b6dccb1da9a;hp=e3e41919ffd0c9cd5c6396e1cbbc9ba7a00edb91;hpb=3f30071d5ae2532d8902ae4f2afa7076cfbfa070;p=sliver-openvswitch.git diff --git a/include/linux/openvswitch.h b/include/linux/openvswitch.h index e3e41919f..b12bf0c83 100644 --- a/include/linux/openvswitch.h +++ b/include/linux/openvswitch.h @@ -115,7 +115,7 @@ struct ovs_vport_stats { }; /* Fixed logical ports. */ -#define OVSP_LOCAL ((__u16)0) +#define OVSP_LOCAL ((__u32)0) /* Packet transfer. */ @@ -182,10 +182,9 @@ enum ovs_vport_type { OVS_VPORT_TYPE_UNSPEC, OVS_VPORT_TYPE_NETDEV, /* network device */ OVS_VPORT_TYPE_INTERNAL, /* network device implemented by datapath */ - OVS_VPORT_TYPE_FT_GRE, /* Flow based GRE tunnel. */ - OVS_VPORT_TYPE_PATCH = 100, /* virtual tunnel connecting two vports */ - OVS_VPORT_TYPE_GRE, /* GRE tunnel */ - OVS_VPORT_TYPE_CAPWAP, /* CAPWAP tunnel */ + OVS_VPORT_TYPE_GRE, /* GRE tunnel. */ + OVS_VPORT_TYPE_VXLAN, /* VXLAN tunnel */ + OVS_VPORT_TYPE_CAPWAP = 102, /* CAPWAP tunnel */ OVS_VPORT_TYPE_GRE64 = 104, /* GRE tunnel with 64-bit keys */ __OVS_VPORT_TYPE_MAX }; @@ -206,7 +205,6 @@ enum ovs_vport_type { * this port. A value of zero indicates that upcalls should not be sent. * @OVS_VPORT_ATTR_STATS: A &struct ovs_vport_stats giving statistics for * packets sent or received through the vport. - * @OVS_VPORT_ATTR_ADDRESS: A 6-byte Ethernet address for the vport. * * These attributes follow the &struct ovs_header within the Generic Netlink * payload for %OVS_VPORT_* commands. @@ -215,8 +213,8 @@ enum ovs_vport_type { * %OVS_VPORT_ATTR_NAME attributes are required. %OVS_VPORT_ATTR_PORT_NO is * optional; if not specified a free port number is automatically selected. * Whether %OVS_VPORT_ATTR_OPTIONS is required or optional depends on the type - * of vport. %OVS_VPORT_ATTR_STATS and %OVS_VPORT_ATTR_ADDRESS are optional, - * and other attributes are ignored. + * of vport. %OVS_VPORT_ATTR_STATS is optional and other attributes are + * ignored. * * For other requests, if %OVS_VPORT_ATTR_NAME is specified then it is used to * look up the vport to operate on; otherwise dp_idx from the &struct @@ -230,7 +228,6 @@ enum ovs_vport_attr { OVS_VPORT_ATTR_OPTIONS, /* nested attributes, varies by vport type */ OVS_VPORT_ATTR_UPCALL_PID, /* u32 Netlink PID to receive upcalls */ OVS_VPORT_ATTR_STATS, /* struct ovs_vport_stats */ - OVS_VPORT_ATTR_ADDRESS = 100, /* hardware address */ __OVS_VPORT_ATTR_MAX }; @@ -280,13 +277,31 @@ enum ovs_key_attr { OVS_KEY_ATTR_ICMPV6, /* struct ovs_key_icmpv6 */ OVS_KEY_ATTR_ARP, /* struct ovs_key_arp */ OVS_KEY_ATTR_ND, /* struct ovs_key_nd */ + OVS_KEY_ATTR_SKB_MARK, /* u32 skb mark */ + OVS_KEY_ATTR_TUNNEL, /* Nested set of ovs_tunnel attributes */ + +#ifdef __KERNEL__ OVS_KEY_ATTR_IPV4_TUNNEL, /* struct ovs_key_ipv4_tunnel */ +#endif OVS_KEY_ATTR_TUN_ID = 63, /* be64 tunnel ID */ __OVS_KEY_ATTR_MAX }; #define OVS_KEY_ATTR_MAX (__OVS_KEY_ATTR_MAX - 1) +enum ovs_tunnel_key_attr { + OVS_TUNNEL_KEY_ATTR_ID, /* be64 Tunnel ID */ + OVS_TUNNEL_KEY_ATTR_IPV4_SRC, /* be32 src IP address. */ + OVS_TUNNEL_KEY_ATTR_IPV4_DST, /* be32 dst IP address. */ + OVS_TUNNEL_KEY_ATTR_TOS, /* u8 Tunnel IP ToS. */ + OVS_TUNNEL_KEY_ATTR_TTL, /* u8 Tunnel IP TTL. */ + OVS_TUNNEL_KEY_ATTR_DONT_FRAGMENT, /* No argument, set DF. */ + OVS_TUNNEL_KEY_ATTR_CSUM, /* No argument. CSUM packet. */ + __OVS_TUNNEL_KEY_ATTR_MAX +}; + +#define OVS_TUNNEL_KEY_ATTR_MAX (__OVS_TUNNEL_KEY_ATTR_MAX - 1) + /** * enum ovs_frag_type - IPv4 and IPv6 fragment type * @OVS_FRAG_TYPE_NONE: Packet is not a fragment. @@ -363,21 +378,6 @@ struct ovs_key_nd { __u8 nd_tll[6]; }; -/* Values for ovs_key_ipv4_tunnel->tun_flags */ -#define OVS_FLOW_TNL_F_DONT_FRAGMENT (1 << 0) -#define OVS_FLOW_TNL_F_CSUM (1 << 1) -#define OVS_FLOW_TNL_F_KEY (1 << 2) - -struct ovs_key_ipv4_tunnel { - __be64 tun_id; - __u32 tun_flags; - __be32 ipv4_src; - __be32 ipv4_dst; - __u8 ipv4_tos; - __u8 ipv4_ttl; - __u8 pad[2]; -}; - /** * enum ovs_flow_attr - attributes for %OVS_FLOW_* commands. * @OVS_FLOW_ATTR_KEY: Nested %OVS_KEY_ATTR_* attributes specifying the flow