net/af_xdp: revert to MP/MC ring for copy mode
authorCiara Loftus <ciara.loftus@intel.com>
Thu, 25 Jun 2020 13:39:50 +0000 (13:39 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 30 Jun 2020 14:24:37 +0000 (16:24 +0200)
This reverts commit 489e0b5b33209d929dc490cc591abd840dcefdfc.

The ring used in copy mode should be multi-producer multi-consumer
because enqueues and dequeues to the ring are performed on both the rx
and tx paths, which can be running on different threads.

Fixes: 489e0b5b3320 ("net/af_xdp: use single producer/consumer ring")
Cc: stable@dpdk.org
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
drivers/net/af_xdp/rte_eth_af_xdp.c

index 2d69221..d4a421e 100644 (file)
@@ -824,7 +824,7 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,
        umem->buf_ring = rte_ring_create(ring_name,
                                         ETH_AF_XDP_NUM_BUFFERS,
                                         rte_socket_id(),
-                                        RING_F_SP_ENQ | RING_F_SC_DEQ);
+                                        0x0);
        if (umem->buf_ring == NULL) {
                AF_XDP_LOG(ERR, "Failed to create rte_ring\n");
                goto err;