DPDK usage discussions
 help / color / mirror / Atom feed
From: Filip Janiszewski <contact@filipjaniszewski.com>
To: Muhammad Zain-ul-Abideen <zain2294@gmail.com>
Cc: users <users@dpdk.org>
Subject: Re: [dpdk-users] rte_mempool_get returning null
Date: Wed, 30 Jun 2021 19:04:47 +0200
Message-ID: <20c8879c-35a6-53e4-1998-8acab3f76251@filipjaniszewski.com> (raw)
In-Reply-To: <CAN7yQ2pEOMKaBrWtqN6BiLbAa9+aXqOH4eCmcNLAOXnBHgPUhQ@mail.gmail.com>

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@filipjaniszewski.com <mailto:contact@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

      reply	other threads:[~2021-06-30 17:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-30 13:50 Filip Janiszewski
2021-06-30 14:48 ` Muhammad Zain-ul-Abideen
2021-06-30 17:04   ` Filip Janiszewski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20c8879c-35a6-53e4-1998-8acab3f76251@filipjaniszewski.com \
    --to=contact@filipjaniszewski.com \
    --cc=users@dpdk.org \
    --cc=zain2294@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK usage discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.dpdk.org/users/0 users/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 users users/ http://inbox.dpdk.org/users \
		users@dpdk.org
	public-inbox-index users

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.users


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git