lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YpBsKz3BD5ABcRxn@gmail.com>
Date:   Fri, 27 May 2022 07:14:03 +0100
From:   Martin Habets <habetsm.xilinx@...il.com>
To:     Íñigo Huguet <ihuguet@...hat.com>
Cc:     Tianhao Zhao <tizhao@...hat.com>,
        Edward Cree <ecree.xilinx@...il.com>, amaftei@...arflare.com,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org
Subject: Re: [PATCH net 2/2] sfc: do not initialize non existing queues with
 efx_separate_tx_channels

On Tue, May 24, 2022 at 05:36:49PM +0200, Íñigo Huguet wrote:
> On Fri, May 13, 2022 at 2:37 PM Martin Habets <habetsm.xilinx@...il.com> wrote:
> >
> > On Fri, May 13, 2022 at 12:07:23PM +0100, Martin Habets wrote:
> > > On Wed, May 11, 2022 at 02:59:41PM +0200, Íñigo Huguet wrote:
> > > > If efx_separate_tx_channels is used, some error messages and backtraces
> > > > are shown in the logs (see below). This is because during channels
> > > > start, all queues in the channels are init asumming that they exist, but
> > > > they might not if efx_separate_tx_channels is used: some channels only
> > > > have RX queues and others only have TX queues.
> > >
> > > Thanks for reporting this. At first glance I suspect there may be more callers
> > > of efx_for_each_channel_tx_queue() which is why it is not yet working for you
> > > even with this fix.
> > > Probably we need to fix those macros themselves.
> > >
> > > I'm having a closer look, but it will take some time.
> >
> > It was easier than I thought. With the patch below I do not get any errors,
> > and ping works. I did not have to touch efx_for_each_channel_rx_queue().
> > Can you give this a try and report if it works for you?
> 
> Martin, this is working fine for me. Module loads and unloads without
> errors, and I can ping and run an iperf3 test also without errors.
> 
> How do you want to do it? Should I send this patch on your behalf
> within my patch series? Or do you want to send it yourself first?

IMO you did the hard work so I did not want to steal your thunder.
Please send it as part of your series, I'll Ack it.

Martin

> >
> > Martin
> > ---
> >  drivers/net/ethernet/sfc/net_driver.h |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/ethernet/sfc/net_driver.h b/drivers/net/ethernet/sfc/net_driver.h
> > index 318db906a154..723bbeea5d0c 100644
> > --- a/drivers/net/ethernet/sfc/net_driver.h
> > +++ b/drivers/net/ethernet/sfc/net_driver.h
> > @@ -1530,7 +1530,7 @@ static inline bool efx_channel_is_xdp_tx(struct efx_channel *channel)
> >
> >  static inline bool efx_channel_has_tx_queues(struct efx_channel *channel)
> >  {
> > -       return true;
> > +       return channel && channel->channel >= channel->efx->tx_channel_offset;
> >  }
> >
> >  static inline unsigned int efx_channel_num_tx_queues(struct efx_channel *channel)
> >
> 
> 
> -- 
> Íñigo Huguet

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ