[dpdk-dev] rte_ring_sc_dequeue returns 0 but sets packet to NULL

Richardson, Bruce bruce.richardson at intel.com
Fri Nov 22 10:54:43 CET 2013


> IMHO, adding NULL objects is likely an error not a legitimate use case for
> adding ring elements.
> 
> Can anyone think of a use case where adding NULL pointer objects makes
> sense?
> 
[BR] As well as the use case already mentioned of passing using NULLs, there is also the scenario where we want to use the rings to pass integers e.g. uintptr_t values as array indexes, instead of pointers. While NULL may not be a valid pointer value, zero is a very common integer value.



More information about the dev mailing list