summaryrefslogtreecommitdiff
path: root/examples/multi_process/client_server_mp
diff options
context:
space:
mode:
authorBruce Richardson <bruce.richardson@intel.com>2017-03-29 16:21:25 +0100
committerThomas Monjalon <thomas.monjalon@6wind.com>2017-03-29 22:32:20 +0200
commitecaed092b677d09b4b8645a3ddc38aac0ea929f7 (patch)
tree588653029d369f3c421f270504a567f091570432 /examples/multi_process/client_server_mp
parent14fbffb0aac971fd96718d292701645779597a7a (diff)
downloaddpdk-ecaed092b677d09b4b8645a3ddc38aac0ea929f7.zip
dpdk-ecaed092b677d09b4b8645a3ddc38aac0ea929f7.tar.gz
dpdk-ecaed092b677d09b4b8645a3ddc38aac0ea929f7.tar.xz
ring: return remaining entry count when dequeuing
Add an extra parameter to the ring dequeue burst/bulk functions so that those functions can optionally return the amount of remaining objs in the ring. This information can be used by applications in a number of ways, for instance, with single-consumer queues, it provides a max dequeue size which is guaranteed to work. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com> Acked-by: Olivier Matz <olivier.matz@6wind.com>
Diffstat (limited to 'examples/multi_process/client_server_mp')
-rw-r--r--examples/multi_process/client_server_mp/mp_client/client.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/multi_process/client_server_mp/mp_client/client.c b/examples/multi_process/client_server_mp/mp_client/client.c
index dca9eb9..01b535c 100644
--- a/examples/multi_process/client_server_mp/mp_client/client.c
+++ b/examples/multi_process/client_server_mp/mp_client/client.c
@@ -279,7 +279,8 @@ main(int argc, char *argv[])
uint16_t i, rx_pkts;
uint8_t port;
- rx_pkts = rte_ring_dequeue_burst(rx_ring, pkts, PKT_READ_SIZE);
+ rx_pkts = rte_ring_dequeue_burst(rx_ring, pkts,
+ PKT_READ_SIZE, NULL);
if (unlikely(rx_pkts == 0)){
if (need_flush)