[dpdk-dev] [PATCH 1/2] mempool: fix returned value on 64 bit after counting objects

2015-05-29 Thread Thomas Monjalon
2015-05-27 00:43, Ananyev, Konstantin: > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Adrien Mazarguil > > rte_mempool_xmem_usage()'s return type is ssize_t which has the same > > architecture-dependent width as size_t but is signed. > > > > On 64-bit architectures, returning a negative

[dpdk-dev] [PATCH 1/2] mempool: fix returned value on 64 bit after counting objects

2015-05-27 Thread Ananyev, Konstantin
> -Original Message- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Adrien Mazarguil > Sent: Monday, May 25, 2015 5:28 PM > To: dev at dpdk.org > Subject: [dpdk-dev] [PATCH 1/2] mempool: fix returned value on 64 bit after > counting objects > > rt

[dpdk-dev] [PATCH 1/2] mempool: fix returned value on 64 bit after counting objects

2015-05-25 Thread Adrien Mazarguil
rte_mempool_xmem_usage()'s return type is ssize_t which has the same architecture-dependent width as size_t but is signed. On 64-bit architectures, returning a negative uint32_t value without casting to ssize_t first does not work as intended, the sign bit is lost and the returned value is garbage