All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
To: Dmitry Vyal <dmitryvyal-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: dev-VfR2kkLFssw@public.gmane.org
Subject: Re: Looks like rte_mempool_free_count() and rte_mempool_count() are swapped
Date: Thu, 2 Jan 2014 14:32:22 +0100	[thread overview]
Message-ID: <201401021432.22215.thomas.monjalon@6wind.com> (raw)
In-Reply-To: <523172C3.2040309-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

12/09/2013 09:52, Dmitry Vyal :
> If I understand it correctly, the ring contains free buffers and
> rte_ring_count() returns a number of entries inside a ring. So this
> function actually calculates the number of free entries, not busy.

Yes, you're right. mempool's objects are free mbufs.
So mempool_count is the number of free mbufs,
and mempool_free_count is the number of free slots to store more free mbufs.
I agree that the naming is confusing but I'm not sure we should change it.

-- 
Thomas

      parent reply	other threads:[~2014-01-02 13:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-12  7:52 Looks like rte_mempool_free_count() and rte_mempool_count() are swapped Dmitry Vyal
     [not found] ` <523172C3.2040309-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-01-02 13:32   ` Thomas Monjalon [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=201401021432.22215.thomas.monjalon@6wind.com \
    --to=thomas.monjalon-pdr9zngts4eavxtiumwx3w@public.gmane.org \
    --cc=dev-VfR2kkLFssw@public.gmane.org \
    --cc=dmitryvyal-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.