Like transmit packets, before update receive descriptor's tail pointer, 
rte_wmb() should be added after writing recv descriptor.

Signed-off-by: Dong Wang <dong.wang.pro at hotmail.com>
---
 lib/librte_pmd_ixgbe/ixgbe_rxtx.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c 
b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
index 9da2c7e..d504688 100644
--- a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
+++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
@@ -1338,6 +1338,9 @@ ixgbe_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
                 */
                rx_pkts[nb_rx++] = rxm;
        }
+
+       rte_wmb();
+
        rxq->rx_tail = rx_id;

        /*
@@ -1595,6 +1598,8 @@ ixgbe_recv_scattered_pkts(void *rx_queue, struct rte_mbuf 
**rx_pkts,
                first_seg = NULL;
        }

+       rte_wmb();
+
        /*
         * Record index of the next RX descriptor to probe.
         */
-- 
1.9.1

Reply via email to