Patch "idpf: call set_real_num_queues in idpf_open" has been added to the 6.13-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    idpf: call set_real_num_queues in idpf_open

to the 6.13-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     idpf-call-set_real_num_queues-in-idpf_open.patch
and it can be found in the queue-6.13 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 9aa068eb2ac9913984e5b7e6a11b29d47db624ed
Author: Joshua Hay <joshua.a.hay@xxxxxxxxx>
Date:   Tue Feb 4 18:08:11 2025 -0800

    idpf: call set_real_num_queues in idpf_open
    
    [ Upstream commit 52c11d31b5a1d1c747bb5f36cc4808e93e2348f4 ]
    
    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.
    
    Fixes: 1c325aac10a8 ("idpf: configure resources for TX queues")
    Signed-off-by: Joshua Hay <joshua.a.hay@xxxxxxxxx>
    Reviewed-by: Madhu Chittim <madhu.chittim@xxxxxxxxx>
    Tested-by: Samuel Salin <Samuel.salin@xxxxxxxxx>
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/intel/idpf/idpf_lib.c b/drivers/net/ethernet/intel/idpf/idpf_lib.c
index b4fbb99bfad20..a3d6b8f198a86 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;
+
 	err = idpf_vport_open(vport);
 
+unlock:
 	idpf_vport_ctrl_unlock(netdev);
 
 	return err;




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux