[dpdk-dev] [PATCH v5 5/8] doc/ring: add zero copy peek APIs
David Marchand
david.marchand at redhat.com
Thu Oct 29 11:52:48 CET 2020
On Sun, Oct 25, 2020 at 6:46 AM Honnappa Nagarahalli
<honnappa.nagarahalli at arm.com> wrote:
> +.. code-block:: c
> +
> + /* Reserve space on the ring */
> + n = rte_ring_enqueue_zc_burst_start(r, 32, &zcd, NULL);
> + /* Pkt I/O core polls packets from the NIC */
> + if (n != 0) {
> + nb_rx = rte_eth_rx_burst(portid, queueid, zcd->ptr1, zcd->n1);
> + if (nb_rx == zcd->n1 && n != zcd->n1)
> + nb_rx = rte_eth_rx_burst(portid, queueid, zcd->ptr2,
> + n - zcd->n1);
Should it be nb_rx += ?
> + /* Provide packets to the packet processing cores */
> + rte_ring_enqueue_zc_finish(r, nb_rx);
> + }
> +
> +Note that between ``_start_`` and ``_finish_`` no other thread can proceed
> +with enqueue(/dequeue) operation till ``_finish_`` completes.
--
David Marchand
More information about the dev
mailing list