diff options
| author | James Morris <james.l.morris@oracle.com> | 2014-10-01 00:44:04 +1000 |
|---|---|---|
| committer | James Morris <james.l.morris@oracle.com> | 2014-10-01 00:44:04 +1000 |
| commit | 6c8ff877cdf13cd5287ed9d700cfb6cb70e2bfa1 (patch) | |
| tree | 2ab49b7d19fb69cdae5b6be9e7ba44f6cf3d45ef /net/openvswitch/flow_table.c | |
| parent | 35e1efd25a9e7d5cf2884fa23441ab87353849bb (diff) | |
| parent | 19583ca584d6f574384e17fe7613dfaeadcdc4a6 (diff) | |
Merge commit 'v3.16' into next
Diffstat (limited to 'net/openvswitch/flow_table.c')
| -rw-r--r-- | net/openvswitch/flow_table.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/net/openvswitch/flow_table.c b/net/openvswitch/flow_table.c index 574c3abc9b30..cf2d853646f0 100644 --- a/net/openvswitch/flow_table.c +++ b/net/openvswitch/flow_table.c @@ -456,6 +456,22 @@ struct sw_flow *ovs_flow_tbl_lookup(struct flow_table *tbl, return ovs_flow_tbl_lookup_stats(tbl, key, &n_mask_hit); } +struct sw_flow *ovs_flow_tbl_lookup_exact(struct flow_table *tbl, + struct sw_flow_match *match) +{ + struct table_instance *ti = rcu_dereference_ovsl(tbl->ti); + struct sw_flow_mask *mask; + struct sw_flow *flow; + + /* Always called under ovs-mutex. */ + list_for_each_entry(mask, &tbl->mask_list, list) { + flow = masked_flow_lookup(ti, match->key, mask); + if (flow && ovs_flow_cmp_unmasked_key(flow, match)) /* Found */ + return flow; + } + return NULL; +} + int ovs_flow_tbl_num_masks(const struct flow_table *table) { struct sw_flow_mask *mask; |
