mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net] octeontx2-af: nix: Fix NIX LF allocation for representor devices
@ 2026-09-15  7:27 Ratheesh Kannoth
  2026-09-18  7:29 ` netdev-bot+sashiko
  0 siblings, 1 reply; 2+ messages in thread
From: Ratheesh Kannoth @ 2026-09-15  7:27 UTC (permalink / raw)
  To: davem, gakula, horms, linux-kernel, netdev
  Cc: andrew+netdev, edumazet, kuba, pabeni, sgoutham,
	Subbaraya Sundeep, Ratheesh Kannoth

From: Subbaraya Sundeep <sbhatta@marvell.com>

Representor NIX LFs need the LBK TX link and PKIND configured so
packets can traverse the switch path between representor and VF.
Also skip copying the MAC address into the alloc response since
representors do not have a valid netdev MAC.

Fixes: 683645a2317e ("octeontx2-af: Add packet path between representor and VF")
Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
Signed-off-by: Ratheesh Kannoth <rkannoth@marvell.com>
---
 drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
index 153eb57bad06..ed62ef336a73 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
@@ -1713,6 +1713,9 @@ int rvu_mbox_handler_nix_lf_alloc(struct rvu *rvu,
 	if (is_rep_dev(rvu, pcifunc)) {
 		pfvf->tx_chan_base = RVU_SWITCH_LBK_CHAN;
 		pfvf->tx_chan_cnt = 1;
+		/* Setting the TX link as that of LBK */
+		rsp->tx_link = hw->cgx_links;
+		rvu_npc_set_pkind(rvu, NPC_RX_LBK_PKIND, pfvf);
 		goto exit;
 	}
 
@@ -1755,8 +1758,9 @@ int rvu_mbox_handler_nix_lf_alloc(struct rvu *rvu,
 	nix_ctx_free(rvu, pfvf);
 
 exit:
-	/* Set macaddr of this PF/VF */
-	ether_addr_copy(rsp->mac_addr, pfvf->mac_addr);
+	if (!is_rep_dev(rvu, pcifunc))
+		/* Set macaddr of this PF/VF */
+		ether_addr_copy(rsp->mac_addr, pfvf->mac_addr);
 
 	/* set SQB size info */
 	cfg = rvu_read64(rvu, blkaddr, NIX_AF_SQ_CONST);
-- 
2.43.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-09-18  7:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-15  7:27 [PATCH net] octeontx2-af: nix: Fix NIX LF allocation for representor devices Ratheesh Kannoth
2026-09-18  7:29 ` netdev-bot+sashiko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®