summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c
diff options
context:
space:
mode:
authorKumar Sanghvi <kumaras@chelsio.com>2017-11-01 08:53:03 +0530
committerDavid S. Miller <davem@davemloft.net>2017-11-01 22:06:03 +0900
commit9d922d4b016d3d7908dd70112aaf46a38313d866 (patch)
treec8e6ab827d6c662b94348e5b30aad7a87c2ba404 /drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c
parent3b0b3bee56dd4e5cd1976a046f391a1435d727b2 (diff)
cxgb4: add support to retrieve stats for hash filters
Add support to retrieve packet-count and byte-count for hash-filters by retrieving filter-entry appropriately based on whether the request is for hash-filter or not. Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com> Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com> Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c')
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c
index ed377e2e9f8a..a26acd183eef 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c
@@ -755,7 +755,8 @@ static void ch_flower_stats_cb(struct timer_list *t)
hash_for_each_rcu(adap->flower_anymatch_tbl, i, flower_entry, link) {
ret = cxgb4_get_filter_counters(adap->port[0],
flower_entry->filter_id,
- &packets, &bytes);
+ &packets, &bytes,
+ flower_entry->fs.hash);
if (!ret) {
spin_lock(&flower_entry->lock);
ofld_stats = &flower_entry->stats;
@@ -788,7 +789,8 @@ int cxgb4_tc_flower_stats(struct net_device *dev,
}
ret = cxgb4_get_filter_counters(dev, ch_flower->filter_id,
- &packets, &bytes);
+ &packets, &bytes,
+ ch_flower->fs.hash);
if (ret < 0)
goto err;