Skip to content

Commit

Permalink
octeontx2-af: Fix SDP MAC link credits configuration
Browse files Browse the repository at this point in the history
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: 2f7f33a ("octeontx2-pf: Add representors for sdp MAC")
Signed-off-by: Geetha sowjanya <[email protected]>
Signed-off-by: NipaLocal <nipa@local>
  • Loading branch information
Geetha sowjanya authored and NipaLocal committed Dec 2, 2024
1 parent 2b159ed commit 541f593
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/ethernet/marvell/octeontx2/af/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 541f593

Please sign in to comment.