Skip to contentSkip to conversation

octeontx2-af: Fix SDP MAC link credits configuration

PATCH Applied Geetha sowjanya 2 participants 2 messages Nov 26, 2024 – Dec 2, 2024

Subsystems (3)
lore
Share & tools
lore

Geetha sowjanya

author maintainer
#0 lore raw

PATCH 1/1 octeontx2-af: Fix SDP MAC link credits configuration

Current driver allows only packet size < 512B as SDP_LINK_CREDIT register is set to default value.
This patch fixes this issue by configure the register with maximum HW supported value to allow packet size > 512B.

Fixes 2f7f33a09516 ("octeontx2-pf: Add representors for sdp MAC")
---
 drivers/net/ethernet/marvell/octeontx2/af/common.h  | 1 +
 drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c | 3 +++
 2 files changed, 4 insertions(+)
drivers/net/ethernet/marvell/octeontx2/af/common.h +1 -0
index 5d84386ed22d..406c59100a35 100644
@@ -159,6 +159,7 @@ enum nix_scheduler {
 #define	SDP_HW_MIN_FRS			16
 #define CN10K_LMAC_LINK_MAX_FRS		16380 /* 16k - FCS */
 #define CN10K_LBK_LINK_MAX_FRS		65535 /* 64k */
+#define SDP_LINK_CREDIT			0x320202
 
 /* NIX RX action operation*/
 #define NIX_RX_ACTIONOP_DROP		(0x0ull)
drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c +3 -0
index 5d5a01dbbca1..a5d1e2bddd58 100644
@@ -4672,6 +4672,9 @@ static void nix_link_config(struct rvu *rvu, int blkaddr,
 	rvu_get_lbk_link_max_frs(rvu, &lbk_max_frs);
 	rvu_get_lmac_link_max_frs(rvu, &lmac_max_frs);
 
+	/* Set SDP link credit */
+	rvu_write64(rvu, blkaddr, NIX_AF_SDP_LINK_CREDIT, SDP_LINK_CREDIT);
+
 	/* Set default min/max packet lengths allowed on NIX Rx links.
 	 *
 	 * With HW reset minlen value of 60byte, HW will treat ARP pkts
Signature · 1 line
2.25.1
#1 lore raw
This patch was applied to netdev/net.git (main) by David S. Miller <[email protected]>:

Hello:

This patch was applied to netdev/net.git (main)
by David S. Miller <[email protected]>:

Quoted 9 lines · On Tue, 26 Nov 2024 17:14:31 +0530 you wrote:

Current driver allows only packet size < 512B as SDP_LINK_CREDIT register is set to default value.
This patch fixes this issue by configure the register with maximum HW supported value to allow packet size > 512B.

Fixes 2f7f33a09516 ("octeontx2-pf: Add representors for sdp MAC")

[...]

Here is the summary with links:
- [net] octeontx2-af: Fix SDP MAC link credits configuration

    https://git.kernel.org/netdev/net/c/28866d6e84b8

You are awesome, thank you!

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