[dpdk-dev] [PATCH v2] net/ixgbe: fix RxQ/TxQ release

Zhang, Qi Z qi.z.zhang at intel.com
Sat Oct 9 06:43:08 CEST 2021



> -----Original Message-----
> From: dev <dev-bounces at dpdk.org> On Behalf Of Wang, Haiyue
> Sent: Tuesday, September 28, 2021 8:19 PM
> To: Meunier, Julien <julien.meunier at nokia.com>; dev at dpdk.org
> Cc: stable at dpdk.org; Richardson, Bruce <bruce.richardson at intel.com>
> Subject: Re: [dpdk-dev] [PATCH v2] net/ixgbe: fix RxQ/TxQ release
> 
> > -----Original Message-----
> > From: Julien Meunier <julien.meunier at nokia.com>
> > Sent: Tuesday, September 28, 2021 16:13
> > To: dev at dpdk.org
> > Cc: stable at dpdk.org; Richardson, Bruce <bruce.richardson at intel.com>;
> > Wang, Haiyue <haiyue.wang at 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 at intel.com
> > Cc: stable at dpdk.org
> >
> > Signed-off-by: Julien Meunier <julien.meunier at nokia.com>
> > ---
> >  drivers/net/ixgbe/ixgbe_rxtx_vec_common.h | 5 ++---
> >  1 file changed, 2 insertions(+), 3 deletions(-)
> >
> 
> Acked-by: Haiyue Wang <haiyue.wang at intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi
> 
> > --
> > 2.17.1



More information about the dev mailing list