From: Alexander Lobakin <aleksander.lobakin@intel.com>
To: Joshua Hay <joshua.a.hay@intel.com>
Cc: <intel-wired-lan@lists.osuosl.org>, <sridhar.samudrala@intel.com>,
"Madhu Chittim" <madhu.chittim@intel.com>
Subject: Re: [Intel-wired-lan] [PATCH iwl-net v2] idpf: call set_real_num_queues in idpf_open
Date: Mon, 10 Feb 2025 16:01:40 +0100 [thread overview]
Message-ID: <4c522f0f-ffda-4b0d-8b83-96d652c4abe0@intel.com> (raw)
In-Reply-To: <20250205020811.2839702-1-joshua.a.hay@intel.com>
From: Joshua Hay <joshua.a.hay@intel.com>
Date: Tue, 4 Feb 2025 18:08:11 -0800
> On initial driver load, alloc_etherdev_mqs is called with whatever max
> queue values are provided by the control plane. However, if the driver
> is loaded on a system where num_online_cpus() returns less than the max
> queues, the netdev will think there are more queues than are actually
> available. Only num_online_cpus() will be allocated, but
> skb_get_queue_mapping(skb) could possibly return an index beyond the
> range of allocated queues. Consequently, the packet is silently dropped
> and it appears as if TX is broken.
>
> Set the real number of queues during open so the netdev knows how many
> queues will be allocated.
>
> v2:
> - call set_real_num_queues in idpf_open. Previous change called
> set_real_num_queues function in idpf_up_complete, but it is possible
> for up_complete to be called without holding the RTNL lock. If user
> brings up interface, then issues a reset, the init_task will call
> idpf_vport_open->idpf_up_complete. Since this is initiated by the
> driver, the RTNL lock is not taken.
> - adjust title to reflect new changes.
>
> Signed-off-by: Joshua Hay <joshua.a.hay@intel.com>
> Fixes: 1c325aac10a8 ("idpf: configure resources for TX queues")
> Reviewed-by: Madhu Chittim <madhu.chittim@intel.com>
> ---
> drivers/net/ethernet/intel/idpf/idpf_lib.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/net/ethernet/intel/idpf/idpf_lib.c b/drivers/net/ethernet/intel/idpf/idpf_lib.c
> index 6df7f125ebde..9dc806411002 100644
> --- a/drivers/net/ethernet/intel/idpf/idpf_lib.c
> +++ b/drivers/net/ethernet/intel/idpf/idpf_lib.c
> @@ -2159,8 +2159,13 @@ static int idpf_open(struct net_device *netdev)
> idpf_vport_ctrl_lock(netdev);
> vport = idpf_netdev_to_vport(netdev);
>
> + err = idpf_set_real_num_queues(vport);
> + if (err)
> + goto unlock;
Why wasn't it removed from the soft reset flow now, although you did
that in v1?
> +
> err = idpf_vport_open(vport);
>
> +unlock:
> idpf_vport_ctrl_unlock(netdev);
>
> return err;
Thanks,
Olek
next prev parent reply other threads:[~2025-02-10 15:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-05 2:08 [Intel-wired-lan] [PATCH iwl-net v2] idpf: call set_real_num_queues in idpf_open Joshua Hay
2025-02-08 0:09 ` Salin, Samuel
2025-02-10 15:01 ` Alexander Lobakin [this message]
2025-02-10 19:36 ` Hay, Joshua A
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=4c522f0f-ffda-4b0d-8b83-96d652c4abe0@intel.com \
--to=aleksander.lobakin@intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=joshua.a.hay@intel.com \
--cc=madhu.chittim@intel.com \
--cc=sridhar.samudrala@intel.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