summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.h
diff options
context:
space:
mode:
authorRatheesh Kannoth <rkannoth@marvell.com>2022-11-07 06:35:05 +0300
committerPaolo Abeni <pabeni@redhat.com>2022-11-08 15:43:46 +0300
commitf0dfc4c88ef39be0ba736aa0ce6119263fc19aeb (patch)
treecd03f12f8d4d0b93374d9529b173bea1e8e1fd8b /drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.h
parentb0c09c7f08c2467b2089bdf4adb2fbbc2464f4a8 (diff)
downloadlinux-f0dfc4c88ef39be0ba736aa0ce6119263fc19aeb.tar.xz
octeontx2-pf: Fix SQE threshold checking
Current way of checking available SQE count which is based on HW updated SQB count could result in driver submitting an SQE even before CQE for the previously transmitted SQE at the same index is processed in NAPI resulting losing SKB pointers, hence a leak. Fix this by checking a consumer index which is updated once CQE is processed. Fixes: 3ca6c4c882a7 ("octeontx2-pf: Add packet transmission support") Signed-off-by: Ratheesh Kannoth <rkannoth@marvell.com> Reviewed-by: Sunil Kovvuri Goutham <sgoutham@marvell.com> Link: https://lore.kernel.org/r/20221107033505.2491464-1-rkannoth@marvell.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.h')
-rw-r--r--drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.h b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.h
index fbe62bbfb789..93cac2c2664c 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.h
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.h
@@ -79,6 +79,7 @@ struct sg_list {
struct otx2_snd_queue {
u8 aura_id;
u16 head;
+ u16 cons_head;
u16 sqe_size;
u32 sqe_cnt;
u16 num_sqbs;