diff options
author | 2013-11-25 10:42:46 -0800 | |
---|---|---|
committer | 2014-01-06 15:51:41 -0800 | |
commit | 5bb506324d150578afadd10c3198ef5b29f5876b (patch) | |
tree | 5aed46c2280137986c2d59c4a0e43389a256331c /net/openvswitch/flow_table.c | |
parent | openvswitch: Shrink sw_flow_mask by 8 bytes (64-bit) or 4 bytes (32-bit). (diff) | |
download | linux-5bb506324d150578afadd10c3198ef5b29f5876b.tar.gz linux-5bb506324d150578afadd10c3198ef5b29f5876b.tar.bz2 linux-5bb506324d150578afadd10c3198ef5b29f5876b.zip |
openvswitch: Change ovs_flow_tbl_lookup_xx() APIs
API changes only for code readability. No functional chnages.
This patch removes the underscored version. Added a new API
ovs_flow_tbl_lookup_stats() that returns the n_mask_hits.
Reported by: Ben Pfaff <blp@nicira.com>
Reviewed-by: Thomas Graf <tgraf@redhat.com>
Signed-off-by: Andy Zhou <azhou@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Diffstat (limited to 'net/openvswitch/flow_table.c')
-rw-r--r-- | net/openvswitch/flow_table.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/net/openvswitch/flow_table.c b/net/openvswitch/flow_table.c index f96ebd53c2cf..261a54e77503 100644 --- a/net/openvswitch/flow_table.c +++ b/net/openvswitch/flow_table.c @@ -429,7 +429,7 @@ static struct sw_flow *masked_flow_lookup(struct table_instance *ti, return NULL; } -struct sw_flow *ovs_flow_tbl_lookup(struct flow_table *tbl, +struct sw_flow *ovs_flow_tbl_lookup_stats(struct flow_table *tbl, const struct sw_flow_key *key, u32 *n_mask_hit) { @@ -447,6 +447,14 @@ struct sw_flow *ovs_flow_tbl_lookup(struct flow_table *tbl, return NULL; } +struct sw_flow *ovs_flow_tbl_lookup(struct flow_table *tbl, + const struct sw_flow_key *key) +{ + u32 __always_unused n_mask_hit; + + return ovs_flow_tbl_lookup_stats(tbl, key, &n_mask_hit); +} + int ovs_flow_tbl_num_masks(const struct flow_table *table) { struct sw_flow_mask *mask; |