ring: return remaining entry count when dequeuing
authorBruce Richardson <bruce.richardson@intel.com>
Wed, 29 Mar 2017 15:21:25 +0000 (16:21 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 29 Mar 2017 20:32:20 +0000 (22:32 +0200)
commitecaed092b677d09b4b8645a3ddc38aac0ea929f7
tree588653029d369f3c421f270504a567f091570432
parent14fbffb0aac971fd96718d292701645779597a7a
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>
35 files changed:
app/pdump/main.c
doc/guides/prog_guide/writing_efficient_code.rst
doc/guides/rel_notes/release_17_05.rst
drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
drivers/crypto/armv8/rte_armv8_pmd.c
drivers/crypto/kasumi/rte_kasumi_pmd.c
drivers/crypto/null/null_crypto_pmd.c
drivers/crypto/openssl/rte_openssl_pmd.c
drivers/crypto/snow3g/rte_snow3g_pmd.c
drivers/crypto/zuc/rte_zuc_pmd.c
drivers/net/bonding/rte_eth_bond_pmd.c
drivers/net/ring/rte_eth_ring.c
examples/distributor/main.c
examples/load_balancer/runtime.c
examples/multi_process/client_server_mp/mp_client/client.c
examples/packet_ordering/main.c
examples/performance-thread/l3fwd-thread/main.c
examples/qos_sched/app_thread.c
examples/quota_watermark/qw/main.c
examples/server_node_efd/node/node.c
lib/librte_hash/rte_cuckoo_hash.c
lib/librte_mempool/rte_mempool_ring.c
lib/librte_port/rte_port_frag.c
lib/librte_port/rte_port_ring.c
lib/librte_ring/rte_ring.h
test/test-pipeline/runtime.c
test/test/test_link_bonding_mode4.c
test/test/test_pmd_ring_perf.c
test/test/test_ring.c
test/test/test_ring_perf.c
test/test/test_table_acl.c
test/test/test_table_pipeline.c
test/test/test_table_ports.c
test/test/virtual_pmd.c