ring: fix deadlock in zero object multi enqueue or dequeue
ring: fix deadlock in zero object multi enqueue or dequeue

Issuing a zero objects dequeue with a single consumer has no effect.
Doing so with multiple consumers, can get more than one thread to succeed
the compare-and-set operation and observe starvation or even deadlock in
the while loop that checks for preceding dequeues.  The problematic piece
of code when n = 0:

    cons_next = cons_head + n;
    success = rte_atomic32_cmpset(&r->cons.head, cons_head, cons_next);

The same is possible on the enqueue path.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Lazaros Koromilas <07c342be6e560e7f43842e2e21b774e61d85f047@nofutznetworks.com>
Acked-by: Olivier Matz <dfcc1510895413197abb4336e39bb0a3906cba71@6wind.com>

john-mcnamara-intel/dpdk,john-mcnamara-intel/dpdk,john-mcnamara-intel/dpdk,john-mcnamara-intel/dpdk