From: Long Wu <long.wu@corigine.com>
[ upstream commit ddc84b53f38281ff2c15f7feb7e3a0b556dd92b2 ]
Meta data parsing should be controlled by meta data flag. So use
flag to determine if receive function can use 'port_id' meta data.
Fixes: 580ea0b09a7c ("net/nfp: fix Rx descriptor")
Signed-off-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
---
drivers/net/nfp/nfp_rxtx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/nfp/nfp_rxtx.c b/drivers/net/nfp/nfp_rxtx.c
index 8ca651ba55..5033d659d3 100644
--- a/drivers/net/nfp/nfp_rxtx.c
+++ b/drivers/net/nfp/nfp_rxtx.c
@@ -760,7 +760,7 @@ nfp_net_recv_pkts(void *rx_queue,
if (unlikely(rxq->rd_p == rxq->rx_count)) /* Wrapping */
rxq->rd_p = 0;
- if (meta.port_id == 0) {
+ if (((meta.flags >> NFP_NET_META_PORTID) & 0x1) == 0) {
rx_pkts[avail++] = mb;
} else if (nfp_flower_pf_dispatch_pkts(hw, mb, meta.port_id)) {
avail_multiplexed++;
--
2.27.0