diff options
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, | |||
456 | return ovs_flow_tbl_lookup_stats(tbl, key, &n_mask_hit); | 456 | return ovs_flow_tbl_lookup_stats(tbl, key, &n_mask_hit); |
457 | } | 457 | } |
458 | 458 | ||
459 | struct sw_flow *ovs_flow_tbl_lookup_exact(struct flow_table *tbl, | ||
460 | struct sw_flow_match *match) | ||
461 | { | ||
462 | struct table_instance *ti = rcu_dereference_ovsl(tbl->ti); | ||
463 | struct sw_flow_mask *mask; | ||
464 | struct sw_flow *flow; | ||
465 | |||
466 | /* Always called under ovs-mutex. */ | ||
467 | list_for_each_entry(mask, &tbl->mask_list, list) { | ||
468 | flow = masked_flow_lookup(ti, match->key, mask); | ||
469 | if (flow && ovs_flow_cmp_unmasked_key(flow, match)) /* Found */ | ||
470 | return flow; | ||
471 | } | ||
472 | return NULL; | ||
473 | } | ||
474 | |||
459 | int ovs_flow_tbl_num_masks(const struct flow_table *table) | 475 | int ovs_flow_tbl_num_masks(const struct flow_table *table) |
460 | { | 476 | { |
461 | struct sw_flow_mask *mask; | 477 | struct sw_flow_mask *mask; |