Skip to content

Commit 076c02f

Browse files
committed
idpf: call set_real_num_queues in idpf_open
jira LE-12345 Rebuild_History Non-Buildable kernel-5.14.0-570.12.1.el9_6 commit-author Joshua Hay <[email protected]> commit 52c11d3 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: 1c325aa ("idpf: configure resources for TX queues") Signed-off-by: Joshua Hay <[email protected]> Reviewed-by: Madhu Chittim <[email protected]> Tested-by: Samuel Salin <[email protected]> Signed-off-by: Tony Nguyen <[email protected]> (cherry picked from commit 52c11d3) Signed-off-by: Jonathan Maple <[email protected]>
1 parent 3d2e889 commit 076c02f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/net/ethernet/intel/idpf/idpf_lib.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2159,8 +2159,13 @@ static int idpf_open(struct net_device *netdev)
21592159
idpf_vport_ctrl_lock(netdev);
21602160
vport = idpf_netdev_to_vport(netdev);
21612161

2162+
err = idpf_set_real_num_queues(vport);
2163+
if (err)
2164+
goto unlock;
2165+
21622166
err = idpf_vport_open(vport);
21632167

2168+
unlock:
21642169
idpf_vport_ctrl_unlock(netdev);
21652170

21662171
return err;

0 commit comments

Comments
 (0)