From: Subbaraya Sundeep 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 Signed-off-by: Ratheesh Kannoth --- 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