diff options
author | Rahul Lakkireddy <rahul.lakkireddy@chelsio.com> | 2020-05-15 22:41:05 +0530 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-05-15 10:54:07 -0700 |
commit | 5148e5950c675a26ab1f5eb4b291e9bd986116c9 (patch) | |
tree | dcc8837cbe53a9962875875c46f4a538c0950681 /drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h | |
parent | cxgb4: tune burst buffer size for TC-MQPRIO offload (diff) | |
download | wireguard-linux-5148e5950c675a26ab1f5eb4b291e9bd986116c9.tar.xz wireguard-linux-5148e5950c675a26ab1f5eb4b291e9bd986116c9.zip |
cxgb4: add EOTID tracking and software context dump
Rework and add support for dumping EOTID software context used by
TC-MQPRIO. Also track number of EOTIDs in use.
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h index be831317520a..16796785eea3 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h @@ -147,6 +147,9 @@ struct tid_info { /* TIDs in the HASH */ atomic_t hash_tids_in_use; atomic_t conns_in_use; + /* ETHOFLD TIDs used for rate limiting */ + atomic_t eotids_in_use; + /* lock for setting/clearing filter bitmap */ spinlock_t ftid_lock; @@ -221,12 +224,14 @@ static inline void cxgb4_alloc_eotid(struct tid_info *t, u32 eotid, void *data) { set_bit(eotid, t->eotid_bmap); t->eotid_tab[eotid].data = data; + atomic_inc(&t->eotids_in_use); } static inline void cxgb4_free_eotid(struct tid_info *t, u32 eotid) { clear_bit(eotid, t->eotid_bmap); t->eotid_tab[eotid].data = NULL; + atomic_dec(&t->eotids_in_use); } int cxgb4_alloc_atid(struct tid_info *t, void *data); |