X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=datapath%2Fflow.h;h=dba66cf1e19f5df901cd2e866c78fa671fc948f4;hb=c68cc3ef3fa0ee3ade3c86035e5c3d7eb066a605;hp=dab69809563f13ede789a12231e97ce1b77a8542;hpb=d1673b006d53fdea72c0744e835362ed1917f879;p=sliver-openvswitch.git diff --git a/datapath/flow.h b/datapath/flow.h index dab698095..dba66cf1e 100644 --- a/datapath/flow.h +++ b/datapath/flow.h @@ -45,6 +45,11 @@ struct sw_flow_actions { #define OVS_TNL_F_CSUM (1 << 1) #define OVS_TNL_F_KEY (1 << 2) +/* Used to memset ovs_key_ipv4_tunnel padding. */ +#define OVS_TUNNEL_KEY_SIZE \ + (offsetof(struct ovs_key_ipv4_tunnel, ipv4_ttl) + \ + FIELD_SIZEOF(struct ovs_key_ipv4_tunnel, ipv4_ttl)) + struct ovs_key_ipv4_tunnel { __be64 tun_id; __be32 ipv4_src; @@ -153,43 +158,13 @@ int ovs_flow_extract(struct sk_buff *, u16 in_port, struct sw_flow_key *, void ovs_flow_used(struct sw_flow *, struct sk_buff *); u64 ovs_flow_used_time(unsigned long flow_jiffies); -/* Upper bound on the length of a nlattr-formatted flow key. The longest - * nlattr-formatted flow key would be: - * - * struct pad nl hdr total - * ------ --- ------ ----- - * OVS_KEY_ATTR_PRIORITY 4 -- 4 8 - * OVS_KEY_ATTR_TUN_ID 8 -- 4 12 - * OVS_KEY_ATTR_TUNNEL 0 -- 4 4 - * - OVS_TUNNEL_KEY_ATTR_ID 8 -- 4 12 - * - OVS_TUNNEL_KEY_ATTR_IPV4_SRC 4 -- 4 8 - * - OVS_TUNNEL_KEY_ATTR_IPV4_DST 4 -- 4 8 - * - OVS_TUNNEL_KEY_ATTR_TOS 1 3 4 8 - * - OVS_TUNNEL_KEY_ATTR_TTL 1 3 4 8 - * - OVS_TUNNEL_KEY_ATTR_DONT_FRAGMENT 0 -- 4 4 - * - OVS_TUNNEL_KEY_ATTR_CSUM 0 -- 4 4 - * OVS_KEY_ATTR_IN_PORT 4 -- 4 8 - * OVS_KEY_ATTR_SKB_MARK 4 -- 4 8 - * OVS_KEY_ATTR_ETHERNET 12 -- 4 16 - * OVS_KEY_ATTR_ETHERTYPE 2 2 4 8 (outer VLAN ethertype) - * OVS_KEY_ATTR_8021Q 4 -- 4 8 - * OVS_KEY_ATTR_ENCAP 0 -- 4 4 (VLAN encapsulation) - * OVS_KEY_ATTR_ETHERTYPE 2 2 4 8 (inner VLAN ethertype) - * OVS_KEY_ATTR_IPV6 40 -- 4 44 - * OVS_KEY_ATTR_ICMPV6 2 2 4 8 - * OVS_KEY_ATTR_ND 28 -- 4 32 - * ---------------------------------------------------------- - * total 220 - */ -#define FLOW_BUFSIZE 220 - int ovs_flow_to_nlattrs(const struct sw_flow_key *, struct sk_buff *); int ovs_flow_from_nlattrs(struct sw_flow_key *swkey, int *key_lenp, const struct nlattr *); int ovs_flow_metadata_from_nlattrs(struct sw_flow *flow, int key_len, const struct nlattr *attr); -#define MAX_ACTIONS_BUFSIZE (16 * 1024) +#define MAX_ACTIONS_BUFSIZE (32 * 1024) #define TBL_MIN_BUCKETS 1024 struct flow_table {