From: Martin Habets <habetsm.xilinx@gmail•com>
To: "Íñigo Huguet" <ihuguet@redhat•com>, "Tianhao Zhao" <tizhao@redhat•com>
Cc: ecree.xilinx@gmail•com, amaftei@solarflare•com,
davem@davemloft•net, edumazet@google•com, kuba@kernel•org,
pabeni@redhat•com, netdev@vger•kernel.org
Subject: Re: [PATCH net 2/2] sfc: do not initialize non existing queues with efx_separate_tx_channels
Date: Fri, 13 May 2022 13:37:16 +0100 [thread overview]
Message-ID: <20220513123716.nuizgafnuanyj2na@gmail.com> (raw)
In-Reply-To: <20220513110723.dorpu2wgrutcske2@gmail.com>
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
---
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)
next prev parent reply other threads:[~2022-05-13 12:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-11 12:59 [PATCH net 0/2] sfc: fix some efx_separate_tx_channels errors Íñigo Huguet
2022-05-11 12:59 ` [PATCH net 1/2] sfc: fix wrong tx channel offset with efx_separate_tx_channels Íñigo Huguet
2022-05-12 17:01 ` Jakub Kicinski
2022-05-11 12:59 ` [PATCH net 2/2] sfc: do not initialize non existing queues " Íñigo Huguet
2022-05-13 11:07 ` Martin Habets
2022-05-13 12:37 ` Martin Habets [this message]
2022-05-24 15:36 ` Íñigo Huguet
2022-05-27 6:14 ` Martin Habets
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=20220513123716.nuizgafnuanyj2na@gmail.com \
--to=habetsm.xilinx@gmail$(echo .)com \
--cc=amaftei@solarflare$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=ecree.xilinx@gmail$(echo .)com \
--cc=edumazet@google$(echo .)com \
--cc=ihuguet@redhat$(echo .)com \
--cc=kuba@kernel$(echo .)org \
--cc=netdev@vger$(echo .)kernel.org \
--cc=pabeni@redhat$(echo .)com \
--cc=tizhao@redhat$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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