[dpdk-users] rte_mempool_get returning null
Filip Janiszewski
contact at filipjaniszewski.com
Wed Jun 30 19:04:47 CEST 2021
Alright, I found the issue, was a bug introduced while moving to 21.02
(pushing a null pointer to the pool), sorry for wasting your time.
Thanks
Il 6/30/21 4:48 PM, Muhammad Zain-ul-Abideen ha scritto:
> I am thinking you are also freeing the objects allocated after their use?
>
> On Wed, Jun 30, 2021, 6:51 PM Filip Janiszewski
> <contact at filipjaniszewski.com <mailto:contact at filipjaniszewski.com>> wrote:
>
> Hi,
>
> What would be the reason for rte_mempool_get returning null even if
> rte_mempool_avail_count returns a big positive number? I know is
> positive since I've added a print in my code to test that..
>
> I've a strange issue where once I extract N items from the pool (where N
> is the exact size of the pool) then the rte_mempool_get fails even if in
> between the N extraction I've replenished the pool with rte_mempool_put
> so that rte_mempool_avail_count is always positive.
>
> The pool is created like this:
>
> data_pool_ = rte_mempool_create(
> fdo_str_name,
> config_->chunk_count,
> chunk_size,
> 0, // cache_size
> 0, // private_data_size
> nullptr, // mp_init
> nullptr, // mp_init_arg
> nullptr, // obj_init
> nullptr, // obj_init_arg
> config_->host_socket_id,
> 0 );
>
> Producer and consumer are running on separate threads, but that should
> not be the issue since the creation flag is 0 (Multi producer/Multi
> consumer). So in my scenario is chunk_count is say 128, then after 128
> GET operations I get null even if I PUT back 128 items before this last
> GET (and again, rte_mempool_avail_count is 128...)
>
> Is weird, since this is happening since I've upgraded to 21.02 from
> 20.02.1, may I have messed up the compilation of the new DPDK? How can I
> investigate this issue?
>
> Thanks
>
> --
> BR, Filip
> +48 666 369 823
>
--
BR, Filip
+48 666 369 823
More information about the users
mailing list