From 15ab612f6bc72ef625ced2e3888a0f120a13f772 Mon Sep 17 00:00:00 2001 From: Venkat Duvvuru Date: Thu, 23 Jul 2020 17:26:25 +0530 Subject: [PATCH] net/bnxt: fix mark id update to mbuf When a packet is looped back from VF to VFR, it is marked to identify the VFR interface. However, this mark_id shouldn't be percolated up to the OVS as it is internal to pmd. This patch fixes it by skipping mark injection into mbuf if the packet is received on VFR interface. Fixes: 6dc83230b43b ("net/bnxt: support port representor data path") Signed-off-by: Venkat Duvvuru Signed-off-by: Sriharsha Basavapatna Reviewed-by: Somnath Kotur --- drivers/net/bnxt/bnxt_rxr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c index baf73cb251..43b1256dcc 100644 --- a/drivers/net/bnxt/bnxt_rxr.c +++ b/drivers/net/bnxt/bnxt_rxr.c @@ -485,6 +485,9 @@ bnxt_ulp_set_mark_in_mbuf(struct bnxt *bp, struct rx_pkt_cmpl_hi *rxcmp1, rc = ulp_mark_db_mark_get(bp->ulp_ctx, gfid, cfa_code, vfr_flag, &mark_id); if (!rc) { + /* VF to VFR Rx path. So, skip mark_id injection in mbuf */ + if (vfr_flag && *vfr_flag) + return mark_id; /* Got the mark, write it to the mbuf and return */ mbuf->hash.fdir.hi = mark_id; mbuf->udata64 = (cfa_code & 0xffffffffull) << 32; -- 2.20.1