Skip to contentSkip to conversation

octeontx2-af: Wait for TX link idle for credits change

PATCH Applied Geetha sowjanya 2 participants 2 messages Aug 25, 2021

Subsystems (3)
lore
Share & tools
lore

Geetha sowjanya

author maintainer
#0 lore raw

PATCH 1/1 octeontx2-af: Wait for TX link idle for credits change

From: Nithin Dabilpuram <[email protected]>

NIX_AF_TX_LINKX_NORM_CREDIT holds running counter of tx credits available per link. But, tx credits should be configured based on MTU config. So MTU change needs tx credit count update.

An issue exists whereby when both PF & VF are enabled and PF traffic is flowing, if VF requests for MTU update, updating the NORM_CREDIT register will lead to corruption of credit count and subsequent deadlock of tx link as the NORM_CREDIT register holds running count.

This patch provides workaround by pausing link traffic using NIX_AF_TL1X_SW_XOFF, waiting for existing packets to drain, and used credits be returned before updating new credit count.

---
 .../net/ethernet/marvell/octeontx2/af/rvu.h   |   1 +
 .../ethernet/marvell/octeontx2/af/rvu_nix.c   | 102 ++++++++++++++++--
 2 files changed, 92 insertions(+), 11 deletions(-)
drivers/net/ethernet/marvell/octeontx2/af/rvu.h +1 -0
index d88f595e63b0..d86c6b366547 100644
@@ -314,6 +314,7 @@ struct nix_hw {
 	struct nix_lso lso;
 	struct nix_txvlan txvlan;
 	struct nix_ipolicer *ipolicer;
+	u64    *tx_credits;
 };
 
 /* RVU block's capabilities or functionality,
drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c +91 -11

155 lines not on this page · raw message

Signature · 1 line
2.17.1
#1 lore raw
This patch was applied to netdev/net-next.git (refs/heads/master):

Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

Quoted 8 lines · On Wed, 25 Aug 2021 11:16:21 +0530 you wrote:

From: Nithin Dabilpuram <[email protected]>

NIX_AF_TX_LINKX_NORM_CREDIT holds running counter of tx credits available per link. But, tx credits should be configured based on MTU config. So MTU change needs tx credit count update.

[...]

Here is the summary with links:
- octeontx2-af: Wait for TX link idle for credits change

    https://git.kernel.org/netdev/net-next/c/1c74b89171c3

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html