Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DPDK API rte_ring_sp_enqueue_bulk and rte_ring_mp_enqueue_bulk have change against its return value, 0 and -ERRORNUM mean success and error respectively before DPDK 17.05, but return value is 0 or n after DPDK 17.05 (including 17.05), 0 and n mean error and success respectively. Details are as below: /** * Enqueue several objects on the ring (multi-producers safe). * * This function uses a "compare and set" instruction to move the * producer index atomically. * * @param r * A pointer to the ring structure. * @param obj_table * A pointer to a table of void * pointers (objects). * @param n * The number of objects to add in the ring from the obj_table. * @param free_space * if non-NULL, returns the amount of space in the ring after the * enqueue operation has finished. * @return * The number of objects enqueued, either 0 or n */ static __rte_always_inline unsigned int rte_ring_mp_enqueue_bulk(struct rte_ring *r, void * const *obj_table, unsigned int n, unsigned int *free_space) Previous code can work if no enqueue failure, this is why we can't reproduce nombufs issue. Closes-Bug: #1765162 Change-Id: Ieb48e216ca8136a8127d4dbaf33b999a181e09f7 Signed-off-by: Yi Yang <yi.y.yang@intel.com>
- Loading branch information