Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ring: fix error code when creating ring
[ upstream commit 074717be3ef9e7a8868b5af078b0ca7b61bcc44b ] The error value returned by rte_ring_create_elem() should be positive integers. However, if the rte_ring_get_memsize_elem() function fails, a negative number is returned and is directly used as the return value. As a result, this will cause the external call to check the return value to fail(like called by rte_mempool_create()). Fixes: a182620 ("ring: get size in memory") Reported-by: Nan Zhou <zhounan14@huawei.com> Signed-off-by: Yunjian Wang <wangyunjian@huawei.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
- Loading branch information