From: Beilei Xing Date: Tue, 1 Jun 2021 05:09:51 +0000 (+0800) Subject: net/iavf: fix scalar Rx X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=33d2ee00102881a3366574e8051c2cb3be9309e3;p=dpdk.git net/iavf: fix scalar Rx The new allocated mbuf should be updated to the SW ring. Fixes: a2b29a7733ef ("net/avf: enable basic Rx Tx") Fixes: b8b4c54ef9b0 ("net/iavf: support flexible Rx descriptor in normal path") Cc: stable@dpdk.org Signed-off-by: Beilei Xing Acked-by: Jingjing Wu --- diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c index fdab80a79d..0361af0d85 100644 --- a/drivers/net/iavf/iavf_rxtx.c +++ b/drivers/net/iavf/iavf_rxtx.c @@ -1218,6 +1218,7 @@ iavf_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) rxd = *rxdp; nb_hold++; rxe = rxq->sw_ring[rx_id]; + rxq->sw_ring[rx_id] = nmb; rx_id++; if (unlikely(rx_id == rxq->nb_rx_desc)) rx_id = 0; @@ -1323,6 +1324,7 @@ iavf_recv_pkts_flex_rxd(void *rx_queue, rxd = *rxdp; nb_hold++; rxe = rxq->sw_ring[rx_id]; + rxq->sw_ring[rx_id] = nmb; rx_id++; if (unlikely(rx_id == rxq->nb_rx_desc)) rx_id = 0; @@ -1414,6 +1416,7 @@ iavf_recv_scattered_pkts_flex_rxd(void *rx_queue, struct rte_mbuf **rx_pkts, rxd = *rxdp; nb_hold++; rxe = rxq->sw_ring[rx_id]; + rxq->sw_ring[rx_id] = nmb; rx_id++; if (rx_id == rxq->nb_rx_desc) rx_id = 0; @@ -1567,6 +1570,7 @@ iavf_recv_scattered_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, rxd = *rxdp; nb_hold++; rxe = rxq->sw_ring[rx_id]; + rxq->sw_ring[rx_id] = nmb; rx_id++; if (rx_id == rxq->nb_rx_desc) rx_id = 0;