ring: make bulk and burst return values consistent
authorBruce Richardson <bruce.richardson@intel.com>
Wed, 29 Mar 2017 15:21:23 +0000 (16:21 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 29 Mar 2017 20:25:37 +0000 (22:25 +0200)
commitcfa7c9e6fc1f7b248d8f250966851bdd19d7b9c2
tree7a90acd3cde39e289628d6d4993216b7513f2981
parent77dd3064270c1fbb930aaecec70492c9e96ec404
ring: make bulk and burst return values consistent

The bulk fns for rings returns 0 for all elements enqueued and negative
for no space. Change that to make them consistent with the burst functions
in returning the number of elements enqueued/dequeued, i.e. 0 or N.
This change also allows the return value from enq/deq to be used directly
without a branch for error checking.

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>
14 files changed:
doc/guides/rel_notes/release_17_05.rst
doc/guides/sample_app_ug/server_node_efd.rst
examples/load_balancer/runtime.c
examples/multi_process/client_server_mp/mp_client/client.c
examples/multi_process/client_server_mp/mp_server/main.c
examples/qos_sched/app_thread.c
examples/server_node_efd/node/node.c
examples/server_node_efd/server/main.c
lib/librte_mempool/rte_mempool_ring.c
lib/librte_ring/rte_ring.h
test/test-pipeline/pipeline_hash.c
test/test-pipeline/runtime.c
test/test/test_ring.c
test/test/test_ring_perf.c