X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=drivers%2Fmempool%2Fring%2Frte_mempool_ring.c;fp=lib%2Flibrte_mempool%2Frte_mempool_ring.c;h=5c132bf69e2e3f3c834f0cb347c982f75eecace8;hb=fca143f059a0bddd7d47b8dc2df646a891b0eb0f;hp=b9aa64dd59f3d0da055d4e93449bd1010fae36fc;hpb=ce3d555e43e3795b5d9507fcfc76b7a0a92fd0d6;p=deb_dpdk.git diff --git a/lib/librte_mempool/rte_mempool_ring.c b/drivers/mempool/ring/rte_mempool_ring.c similarity index 92% rename from lib/librte_mempool/rte_mempool_ring.c rename to drivers/mempool/ring/rte_mempool_ring.c index b9aa64dd..5c132bf6 100644 --- a/lib/librte_mempool/rte_mempool_ring.c +++ b/drivers/mempool/ring/rte_mempool_ring.c @@ -42,26 +42,30 @@ static int common_ring_mp_enqueue(struct rte_mempool *mp, void * const *obj_table, unsigned n) { - return rte_ring_mp_enqueue_bulk(mp->pool_data, obj_table, n); + return rte_ring_mp_enqueue_bulk(mp->pool_data, + obj_table, n, NULL) == 0 ? -ENOBUFS : 0; } static int common_ring_sp_enqueue(struct rte_mempool *mp, void * const *obj_table, unsigned n) { - return rte_ring_sp_enqueue_bulk(mp->pool_data, obj_table, n); + return rte_ring_sp_enqueue_bulk(mp->pool_data, + obj_table, n, NULL) == 0 ? -ENOBUFS : 0; } static int common_ring_mc_dequeue(struct rte_mempool *mp, void **obj_table, unsigned n) { - return rte_ring_mc_dequeue_bulk(mp->pool_data, obj_table, n); + return rte_ring_mc_dequeue_bulk(mp->pool_data, + obj_table, n, NULL) == 0 ? -ENOBUFS : 0; } static int common_ring_sc_dequeue(struct rte_mempool *mp, void **obj_table, unsigned n) { - return rte_ring_sc_dequeue_bulk(mp->pool_data, obj_table, n); + return rte_ring_sc_dequeue_bulk(mp->pool_data, + obj_table, n, NULL) == 0 ? -ENOBUFS : 0; } static unsigned