]> git.baikalelectronics.ru Git - kernel.git/commit
octeontx2-pf: Fix SQE threshold checking
authorRatheesh Kannoth <rkannoth@marvell.com>
Mon, 7 Nov 2022 03:35:05 +0000 (09:05 +0530)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 8 Nov 2022 12:43:46 +0000 (13:43 +0100)
commit42a88e6e84788a90b6b286f343d23da445a83456
treecd03f12f8d4d0b93374d9529b173bea1e8e1fd8b
parentf5e35a4fb1a103948073333e424b9a0a03947fa7
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: 471374d4883b ("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>
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.h