[Intel-wired-lan] [PATCH iwl-net v2] idpf: call set_real_num_queues in idpf_open
Salin, Samuel
samuel.salin at intel.com
Sat Feb 8 00:09:06 UTC 2025
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces at osuosl.org> On Behalf Of
> Joshua Hay
> Sent: Tuesday, February 4, 2025 6:08 PM
> To: intel-wired-lan at lists.osuosl.org
> Cc: Samudrala, Sridhar <sridhar.samudrala at intel.com>; Hay, Joshua A
> <joshua.a.hay at intel.com>; Chittim, Madhu <madhu.chittim at intel.com>
> Subject: [Intel-wired-lan] [PATCH iwl-net v2] idpf: call set_real_num_queues in
> idpf_open
>
> 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 at intel.com>
> Fixes: 1c325aac10a8 ("idpf: configure resources for TX queues")
> Reviewed-by: Madhu Chittim <madhu.chittim at intel.com>
Tested-by: Samuel Salin <Samuel.salin at intel.com>
More information about the Intel-wired-lan
mailing list