Skip to contentSkip to conversation

octeontx2-af: nix: Log TX scheduler queue validation failures

PATCH Applied Ratheesh Kannoth 3 participants 3 messages Sep 23 – Sep 26

Subsystems (3)
lore
Share & tools
lore

Ratheesh Kannoth

author maintainer
#0 lore raw

PATCH v2 1/1 octeontx2-af: nix: Log TX scheduler queue validation failures

From: Subbaraya Sundeep <[email protected]>

Emit logs when is_valid_txschq() rejects a scheduler queue mapping so misconfigured TX scheduler allocations are easier to diagnose.

---
v1 -> v2:

- Switch dev_err() to dev_err_ratelimited() on PF/VF-driven paths
- Add schq and lvl to both rejection messages
- Clarify PF/link mismatch wording instead of "Invalid tx link"
- Stop logging another function's map_func pcifunc

---
 .../net/ethernet/marvell/octeontx2/af/rvu_nix.c  | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)
drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c +12 -4
index 153eb57bad06..b0551559dacb 100644
@@ -324,15 +324,23 @@ static bool is_valid_txschq(struct rvu *rvu, int blkaddr,
 	if (lvl >= hw->cap.nix_tx_aggr_lvl) {
 		if ((nix_get_tx_link(rvu, map_func) !=
 		     nix_get_tx_link(rvu, pcifunc)) &&
-		     (rvu_get_pf(rvu->pdev, map_func) !=
-				rvu_get_pf(rvu->pdev, pcifunc)))
+		    (rvu_get_pf(rvu->pdev, map_func) !=
+		     rvu_get_pf(rvu->pdev, pcifunc))) {
+			dev_err_ratelimited(rvu->dev,
+					    "NIX TX schq %u lvl %d: pcifunc %x PF/link mismatch\n",
+					    schq, lvl, pcifunc);
 			return false;
-		else
+		} else {
 			return true;
+		}
 	}
 
-	if (map_func != pcifunc)
+	if (map_func != pcifunc) {
+		dev_err_ratelimited(rvu->dev,
+				    "NIX TX schq %u lvl %d: not owned by pcifunc %x\n",
+				    schq, lvl, pcifunc);
 		return false;
+	}
 
 	return true;
 }
Signature · 1 line
2.43.0
reviewer Reviewed-by on v2 1/1
#1 lore raw
Quoted 9 lines · Ratheesh Kannoth

From: Subbaraya Sundeep <[email protected]>

Emit logs when is_valid_txschq() rejects a scheduler queue mapping so misconfigured TX scheduler allocations are easier to diagnose.

Quoted 7 lines

---
v1 -> v2:

- Switch dev_err() to dev_err_ratelimited() on PF/VF-driven paths
- Add schq and lvl to both rejection messages
- Clarify PF/link mismatch wording instead of "Invalid tx link"
- Stop logging another function's map_func pcifunc

#2 lore raw
In reply to Ratheesh Kannoth
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 10 lines · On Wed, 23 Sep 2026 09:05:00 +0530 you wrote:

From: Subbaraya Sundeep <[email protected]>

Emit logs when is_valid_txschq() rejects a scheduler queue mapping so misconfigured TX scheduler allocations are easier to diagnose.

[...]

Here is the summary with links:
- [v2,net-next] octeontx2-af: nix: Log TX scheduler queue validation failures

    https://git.kernel.org/netdev/net-next/c/3c21842f999a

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html