DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Zhang, Qi Z" <qi.z.zhang@intel.com>
To: "Wang, Haiyue" <haiyue.wang@intel.com>,
	"Meunier, Julien" <julien.meunier@nokia.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: "stable@dpdk.org" <stable@dpdk.org>,
	"Richardson, Bruce" <bruce.richardson@intel.com>
Subject: Re: [dpdk-dev] [PATCH v2] net/ixgbe: fix RxQ/TxQ release
Date: Sat, 9 Oct 2021 04:43:08 +0000	[thread overview]
Message-ID: <aad3e1d8ce404285b1b982c13f6cd3af@intel.com> (raw)
In-Reply-To: <DM4PR11MB55187B3DAF8BC42671C20BBAF7A89@DM4PR11MB5518.namprd11.prod.outlook.com>



> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Wang, Haiyue
> Sent: Tuesday, September 28, 2021 8:19 PM
> To: Meunier, Julien <julien.meunier@nokia.com>; dev@dpdk.org
> Cc: stable@dpdk.org; Richardson, Bruce <bruce.richardson@intel.com>
> Subject: Re: [dpdk-dev] [PATCH v2] net/ixgbe: fix RxQ/TxQ release
> 
> > -----Original Message-----
> > From: Julien Meunier <julien.meunier@nokia.com>
> > Sent: Tuesday, September 28, 2021 16:13
> > To: dev@dpdk.org
> > Cc: stable@dpdk.org; Richardson, Bruce <bruce.richardson@intel.com>;
> > Wang, Haiyue <haiyue.wang@intel.com>
> > Subject: [PATCH v2] net/ixgbe: fix RxQ/TxQ release
> >
> > On the vector implementation, during the tear-down, the mbufs not
> > drained in the RxQ and TxQ are freed based on an algorithm which
> > supposed that the number of descriptors is a power of 2 (max_desc).
> > Based on this hypothesis, this algorithm uses a bitmask in order to
> > detect an index overflow during the iteration, and to restart the loop
> > from 0.
> >
> > However, there is no such power of 2 requirement in the ixgbe for the
> > number of descriptors in the RxQ / TxQ. The only requirement is to
> > have a number correctly aligned.
> >
> > If a user requested to configure a number of descriptors which is not
> > a power of 2, as a consequence, during the tear-down, it was possible
> > to be in an infinite loop, and to never reach the exit loop condition.
> >
> > By removing the bitmask and changing the loop method, we can avoid
> > this issue, and allow the user to configure a RxQ / TxQ which is not a
> > power of 2.
> >
> > Fixes: c95584dc2b18 ("ixgbe: new vectorized functions for Rx/Tx")
> > Cc: bruce.richardson@intel.com
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Julien Meunier <julien.meunier@nokia.com>
> > ---
> >  drivers/net/ixgbe/ixgbe_rxtx_vec_common.h | 5 ++---
> >  1 file changed, 2 insertions(+), 3 deletions(-)
> >
> 
> Acked-by: Haiyue Wang <haiyue.wang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi
> 
> > --
> > 2.17.1


      reply	other threads:[~2021-10-09  4:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-27 17:18 [dpdk-dev] [PATCH] " Julien Meunier
2021-09-28  3:06 ` Wang, Haiyue
2021-09-28  3:21   ` Wang, Haiyue
2021-09-28  7:46     ` Julien Meunier
2021-09-28  8:12 ` [dpdk-dev] [PATCH v2] " Julien Meunier
2021-09-28 12:18   ` Wang, Haiyue
2021-10-09  4:43     ` Zhang, Qi Z [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=aad3e1d8ce404285b1b982c13f6cd3af@intel.com \
    --to=qi.z.zhang@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=haiyue.wang@intel.com \
    --cc=julien.meunier@nokia.com \
    --cc=stable@dpdk.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 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).