ring: return free space when enqueuing
authorBruce Richardson <bruce.richardson@intel.com>
Wed, 29 Mar 2017 15:21:24 +0000 (16:21 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 29 Mar 2017 20:32:04 +0000 (22:32 +0200)
commit14fbffb0aac971fd96718d292701645779597a7a
tree1e5870418f69264cbbedb43b5f50fa8277947de6
parentcfa7c9e6fc1f7b248d8f250966851bdd19d7b9c2
ring: return free space when enqueuing

Add an extra parameter to the ring enqueue burst/bulk functions so that
those functions can optionally return the amount of free space in the
ring. This information can be used by applications in a number of ways,
for instance, with single-producer queues, it provides a max
enqueue size which is guaranteed to work. It can also be used to
implement watermark functionality in apps, replacing the older
functionality with a more flexible version, which enables apps to
implement multiple watermark thresholds, rather than just one.

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>
28 files changed:
doc/guides/rel_notes/release_17_05.rst
doc/guides/sample_app_ug/server_node_efd.rst
drivers/crypto/armv8/rte_armv8_pmd.c
drivers/crypto/kasumi/rte_kasumi_pmd.c
drivers/crypto/snow3g/rte_snow3g_pmd.c
drivers/crypto/zuc/rte_zuc_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_server/main.c
examples/packet_ordering/main.c
examples/performance-thread/l3fwd-thread/main.c
examples/qos_sched/app_thread.c
examples/server_node_efd/server/main.c
lib/librte_hash/rte_cuckoo_hash.c
lib/librte_mempool/rte_mempool_ring.c
lib/librte_pdump/rte_pdump.c
lib/librte_port/rte_port_ras.c
lib/librte_port/rte_port_ring.c
lib/librte_ring/rte_ring.h
test/test-pipeline/pipeline_hash.c
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_ports.c
test/test/virtual_pmd.c