summaryrefslogtreecommitdiffstats
path: root/net/openvswitch/flow.h
diff options
context:
space:
mode:
authorPravin B Shelar <pshelar@nicira.com>2013-06-17 17:50:28 -0700
committerDavid S. Miller <davem@davemloft.net>2013-06-19 18:07:41 -0700
commita3e82996a8874c4cfe8c7f1be4d552018d8cba7e (patch)
treef476c0df25d3076a67594bc15e0cd5190ce18351 /net/openvswitch/flow.h
parentffe3f4321745e743dd179ec2b12180c01ba0d3aa (diff)
downloadlinux-a3e82996a8874c4cfe8c7f1be4d552018d8cba7e.tar.bz2
openvswitch: Optimize flow key match for non tunnel flows.
Following patch adds start offset for sw_flow-key, so that we can skip tunneling information in key for non-tunnel flows. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/openvswitch/flow.h')
-rw-r--r--net/openvswitch/flow.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/openvswitch/flow.h b/net/openvswitch/flow.h
index bfe80b960759..999842f247a0 100644
--- a/net/openvswitch/flow.h
+++ b/net/openvswitch/flow.h
@@ -156,7 +156,7 @@ u64 ovs_flow_used_time(unsigned long flow_jiffies);
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 ovs_flow_metadata_from_nlattrs(struct sw_flow *flow, int key_len,
const struct nlattr *attr);
#define MAX_ACTIONS_BUFSIZE (32 * 1024)
@@ -188,9 +188,9 @@ void ovs_flow_tbl_deferred_destroy(struct flow_table *table);
struct flow_table *ovs_flow_tbl_alloc(int new_size);
struct flow_table *ovs_flow_tbl_expand(struct flow_table *table);
struct flow_table *ovs_flow_tbl_rehash(struct flow_table *table);
-void ovs_flow_tbl_insert(struct flow_table *table, struct sw_flow *flow);
+void ovs_flow_tbl_insert(struct flow_table *table, struct sw_flow *flow,
+ struct sw_flow_key *key, int key_len);
void ovs_flow_tbl_remove(struct flow_table *table, struct sw_flow *flow);
-u32 ovs_flow_hash(const struct sw_flow_key *key, int key_len);
struct sw_flow *ovs_flow_tbl_next(struct flow_table *table, u32 *bucket, u32 *idx);
extern const int ovs_key_lens[OVS_KEY_ATTR_MAX + 1];