From: Ratheesh Kannoth <rkannoth@marvell.com>
To: <davem@davemloft.net>, <gakula@marvell.com>, <horms@kernel.org>,
<linux-kernel@vger.kernel.org>, <netdev@vger.kernel.org>
Cc: <andrew+netdev@lunn.ch>, <edumazet@google.com>, <kuba@kernel.org>,
<pabeni@redhat.com>, <sgoutham@marvell.com>,
Subbaraya Sundeep <sbhatta@marvell.com>,
Ratheesh Kannoth <rkannoth@marvell.com>
Subject: [PATCH net] octeontx2-af: nix: Fix NIX LF allocation for representor devices
Date: Tue, 15 Sep 2026 12:57:11 +0530 [thread overview]
Message-ID: <20260915072711.985075-1-rkannoth@marvell.com> (raw)
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
next reply other threads:[~2026-09-15 7:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-15 7:27 Ratheesh Kannoth [this message]
2026-09-18 7:29 ` netdev-bot+sashiko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260915072711.985075-1-rkannoth@marvell.com \
--to=rkannoth@marvell.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gakula@marvell.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sbhatta@marvell.com \
--cc=sgoutham@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®