DPDK patches and discussions
 help / color / mirror / Atom feed
From: Olivier Matz <olivier.matz@6wind.com>
To: Jerin Jacob <jerin.jacob@caviumnetworks.com>, dev@dpdk.org
Cc: thomas.monjalon@6wind.com
Subject: Re: [dpdk-dev] [PATCH] app/test: fix refcnt_mbuf_ring size
Date: Thu, 21 Jul 2016 15:41:06 +0200	[thread overview]
Message-ID: <1b08ca23-42ab-a7f5-0f45-6512388da275@6wind.com> (raw)
In-Reply-To: <1468821354-23612-1-git-send-email-jerin.jacob@caviumnetworks.com>

Hi Jerin,

On 07/18/2016 07:55 AM, Jerin Jacob wrote:
> rte_ring_create expects the size of the ring to
> be a power of 2. REFCNT_RING_SIZE value is not
> power of 2 in-case if RTE_MAX_LCORE == 96.
> Fix it by aligning the size to next power of 2 value.
> 
> Fixes: af75078f ("first public release")
> 
> Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> ---
>  app/test/test_mbuf.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c
> index 684ad80..c0823ea 100644
> --- a/app/test/test_mbuf.c
> +++ b/app/test/test_mbuf.c
> @@ -809,7 +809,7 @@ test_refcnt_mbuf(void)
>  
>  	if (refcnt_mbuf_ring == NULL &&
>  			(refcnt_mbuf_ring = rte_ring_create("refcnt_mbuf_ring",
> -			REFCNT_RING_SIZE, SOCKET_ID_ANY,
> +			rte_align32pow2(REFCNT_RING_SIZE), SOCKET_ID_ANY,
>  			RING_F_SP_ENQ)) == NULL) {
>  		printf("%s: cannot allocate " MAKE_STRING(refcnt_mbuf_ring)
>  		    "\n", __func__);
> 

Acked-by: Olivier Matz <olivier.matz@6wind.com>

  reply	other threads:[~2016-07-21 13:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-18  5:55 Jerin Jacob
2016-07-21 13:41 ` Olivier Matz [this message]
2016-07-21 21:51   ` Thomas Monjalon

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=1b08ca23-42ab-a7f5-0f45-6512388da275@6wind.com \
    --to=olivier.matz@6wind.com \
    --cc=dev@dpdk.org \
    --cc=jerin.jacob@caviumnetworks.com \
    --cc=thomas.monjalon@6wind.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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).