commit a2bcb3d18a21c0ad39f47548a690f926ef2ec448
Author: Yi Yang <email address hidden>
Date: Tue Jun 19 08:21:08 2018 +0800
Fix nombufs issue in DPDK 17.11
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 <email address hidden>
Reviewed: https:/ /review. opencontrail. org/43943 github. com/Juniper/ contrail- vrouter/ commit/ a2bcb3d18a21c0a d39f47548a690f9 26ef2ec448
Committed: http://
Submitter: Zuul v3 CI (<email address hidden>)
Branch: R5.0
commit a2bcb3d18a21c0a d39f47548a690f9 26ef2ec448
Author: Yi Yang <email address hidden>
Date: Tue Jun 19 08:21:08 2018 +0800
Fix nombufs issue in DPDK 17.11
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:
/** mp_enqueue_ bulk(struct rte_ring *r, void * const *obj_table,
* 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_
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 a8127d4dbaf33b9 99a181e09f7
Change-Id: Ieb48e216ca8136
Signed-off-by: Yi Yang <email address hidden>