octeontx2-af: Fix CQ enable state tracking after AQ writes
PATCH 1/1 octeontx2-af: Fix CQ enable state tracking after AQ writes
Use the CQ context's ena field when updating the CQ enable bitmap. The current code reads rq.ena, which overlaps bit 0 of the CQ base address and can leave the bitmap out of sync with the hardware context. This can cause enabled CQs to be skipped during teardown.
Use sq.ena for the SQ bitmap update as well, so each queue type reads its own context.
--- drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c +2 -2
@@ -1231,7 +1231,7 @@ static int rvu_nix_blk_aq_enq_inst(struct rvu *rvu, struct nix_hw *nix_hw,__clear_bit (req->qidx, pfvf->rq_bmap); }if (req->ctype ==NIX_AQ_CTYPE_SQ ) { - ena = (req->rq.ena & req->sq_mask.ena) | + ena = (req->sq.ena & req->sq_mask.ena) | (test_bit (req->qidx, pfvf->sq_bmap) & ~req->sq_mask.ena);if (ena)
@@ -1240,7 +1240,7 @@ static int rvu_nix_blk_aq_enq_inst(struct rvu *rvu, struct nix_hw *nix_hw,__clear_bit (req->qidx, pfvf->sq_bmap); }if (req->ctype ==NIX_AQ_CTYPE_CQ ) { - ena = (req->rq.ena & req->cq_mask.ena) | + ena = (req->cq.ena & req->cq_mask.ena) | (test_bit (req->qidx, pfvf->cq_bmap) & ~req->cq_mask.ena);if (ena)
Signature · 1 line
2.52.0
[email protected]
AI reviewThis is an automated message. This series looks like a fix, but its commit messages seem to be missing some information:
Hi!
This is an automated message. This series looks like a fix, but its commit messages seem to be missing some information:
- How the issue was discovered, e.g. hit in production, hit during development, syzbot report, manual code inspection, LLM or static analysis tool scan.
- Whether the issue was actually triggered, or is only theoretical (e.g. found by code inspection). If it was triggered please include the symptoms, like the stack trace or error messages.
- What hardware the change was tested on. For driver fixes please mention the device (and if relevant firmware version) used for testing, or say that the change was not tested on real hardware.
Please do not repost the series just to address the above. Instead, reply to this email with the missing information, so that reviewers can take it into account. If the series needs another revision for other reasons, please include the information in the commit messages then.
The evaluation is done by an LLM so it may be wrong, if you think that is the case please reply and explain.
Quoted 10 lines · Alok Tiwari
Use the CQ context's ena field when updating the CQ enable bitmap. The current code reads rq.ena, which overlaps bit 0 of the CQ base address and can leave the bitmap out of sync with the hardware context. This can cause enabled CQs to be skipped during teardown.
Use sq.ena for the SQ bitmap update as well, so each queue type reads its own context.
Fixes 557dd485eaeb ("octeontx2-af: Support for disabling NIX RQ/SQ/CQ contexts")Signed-off-by Alok Tiwari <[email protected]>
Thanks.
Quoted 66 lines
-----Original Message-----
From: Alok Tiwari <[email protected]>
Sent: Sunday, October 11, 2026 6:25 PM
To: Subbaraya Sundeep Bhatta <[email protected]>; Geethasowjanya Akula <[email protected]>; Sunil Kovvuri Goutham <[email protected]>; Ratheesh Kannoth <[email protected]>; Stanislaw Kardach [C] <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Cc: [email protected]; [email protected]
Subject: [EXTERNAL] [PATCH net] octeontx2-af: Fix CQ enable state tracking after AQ writesUse the CQ context's ena field when updating the CQ enable bitmap. The current code reads rq. ena, which overlaps bit 0 of the CQ base address and can leave the bitmap out of sync with the hardware context. This can cause enabled CQs to be skipped ZjQcmQRYFpfptBannerStart Prioritize security for external emails:
Confirm sender and content safety before clicking links or opening attachments
<https://us-phishalarm-
ewt.proofpoint.com/EWT/v1/CRVmXkqW!tm3Z1f8UYlXa1C-c-X36bxwVD1OhHyxbwwx9i6A7wWiuLiOrgVQt2uzITcavucr4YyipG3xqVrah_PDs1uraOG3LbVd2IAqzqPp3$>
Report SuspiciousZjQcmQRYFpfptBannerEnd
Use the CQ context's ena field when updating the CQ enable bitmap. The current code reads rq.ena, which overlaps bit 0 of the CQ base address and can leave the bitmap out of sync with the hardware context. This can cause enabled CQs to be skipped during teardown.Use sq.ena for the SQ bitmap update as well, so each queue type reads its own context.
Fixes 557dd485eaeb ("octeontx2-af: Support for disabling NIX RQ/SQ/CQcontexts")
Signed-off-by Alok Tiwari <[email protected]>---
drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c| 4 ++--1 file changed, 2 insertions(+), 2 deletions(-)drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c +1
-1@@ -1231,7 +1231,7 @@ static int rvu_nix_blk_aq_enq_inst(struct rvu *rvu,struct nix_hw *nix_hw, __clear_bit(req->qidx, pfvf->rq_bmap); }if (req->ctype ==NIX_AQ_CTYPE_SQ ) { - ena = (req->rq.ena & req->sq_mask.ena) | + ena = (req->sq.ena & req->sq_mask.ena) | (test_bit (req->qidx, pfvf->sq_bmap) & ~req->sq_mask.ena);if (ena)
drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c +1
-1@@ -1240,7 +1240,7 @@ static int rvu_nix_blk_aq_enq_inst(struct rvu *rvu,struct nix_hw *nix_hw, __clear_bit(req->qidx, pfvf->sq_bmap); }if (req->ctype ==NIX_AQ_CTYPE_CQ ) { - ena = (req->rq.ena & req->cq_mask.ena) | + ena = (req->cq.ena & req->cq_mask.ena) | (test_bit (req->qidx, pfvf->cq_bmap) & ~req->cq_mask.ena);
Quoted 3 lines
if (ena)
--
2.52.0
Thanks for the patch.
This patch was applied to netdev/net.git (main) by Paolo Abeni <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Paolo Abeni <[email protected]>:
Quoted 9 lines · On Sun, 11 Oct 2026 05:54:59 -0700 you wrote:
Use the CQ context's ena field when updating the CQ enable bitmap. The current code reads rq.ena, which overlaps bit 0 of the CQ base address and can leave the bitmap out of sync with the hardware context. This can cause enabled CQs to be skipped during teardown.
Use sq.ena for the SQ bitmap update as well, so each queue type reads its own context.
[...]
Here is the summary with links:
- [net] octeontx2-af: Fix CQ enable state tracking after AQ writes
https://git.kernel.org/netdev/net/c/07bd391eb957
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html