[dpdk-dev] [PATCH v5 07/14] ring: make bulk and burst fn return vals consistent
Bruce Richardson
bruce.richardson at intel.com
Thu Apr 13 10:33:09 CEST 2017
On Thu, Apr 13, 2017 at 07:42:39AM +0100, Wang, Zhihong wrote:
> Hi Bruce,
>
> This patch changes the behavior and causes some existing code to
> malfunction, e.g. bond_ethdev_stop() will get stuck here:
>
> while (rte_ring_dequeue(port->rx_ring, &pkt) != -ENOENT)
> rte_pktmbuf_free(pkt);
>
> Another example in test/test/virtual_pmd.c: virtual_ethdev_stop().
>
>
> Thanks
> Zhihong
>
Actually, the behaviour of dequeue function should not be changing, so
this error initially confused me. However, it looks like a typo in my
patchset, compare function API comment, vs implementation:
* @return
* - 0: Success, objects dequeued.
* - -ENOENT: Not enough entries in the ring to dequeue, no object is
* dequeued.
rte_ring_dequeue_bulk(r, obj_p, 1, NULL) ? 0 : -ENOBUFS;
So it looks like I put in ENOBUFS instead of ENOENT when modifying the
line. I'll do up a patch to fix that.
/Bruce
More information about the dev
mailing list