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
> -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
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
3 matches
Mail list logo