diff options
author | Kumar Sanghvi <kumaras@chelsio.com> | 2017-11-01 08:53:04 +0530 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-11-01 22:06:03 +0900 |
commit | 79e6d46a65abfd721de378bf496833a04ea10afe (patch) | |
tree | d2b9ae96fc8c2700bbd31dfe227362c1f699830f /drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.h | |
parent | cxgb4: add support to retrieve stats for hash filters (diff) | |
download | linux-dev-79e6d46a65abfd721de378bf496833a04ea10afe.tar.xz linux-dev-79e6d46a65abfd721de378bf496833a04ea10afe.zip |
cxgb4: convert flower table to use rhashtable
T6 supports ~500K hash filters and can theoretically climb up to
~1 million hash filters. Preallocated hash table is not efficient
in terms of memory usage. So, use rhashtable instead which gives
the flexibility to grow based on usage.
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.h')
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.h b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.h index 202d5c9ec303..050c8a50ae41 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.h +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.h @@ -48,7 +48,7 @@ struct ch_tc_flower_entry { struct ch_filter_specification fs; struct ch_tc_flower_stats stats; unsigned long tc_flower_cookie; - struct hlist_node link; + struct rhash_head node; struct rcu_head rcu; spinlock_t lock; /* lock for stats */ u32 filter_id; @@ -115,6 +115,6 @@ int cxgb4_tc_flower_destroy(struct net_device *dev, int cxgb4_tc_flower_stats(struct net_device *dev, struct tc_cls_flower_offload *cls); -void cxgb4_init_tc_flower(struct adapter *adap); +int cxgb4_init_tc_flower(struct adapter *adap); void cxgb4_cleanup_tc_flower(struct adapter *adap); #endif /* __CXGB4_TC_FLOWER_H */ |