Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 25946ddb authored by Anjali Singhai Jain's avatar Anjali Singhai Jain Committed by Jeff Kirsher
Browse files

i40e: Tell the stack about our actual number of queues



Call the netif_set_real* functions in order to make sure
the stack knows about how many queues we have, in order
for RFS/RPS/XFS to work correctly.

Change-Id: Ib7a7b2792f80c5eef210dedf42cc6607d63953d2
Signed-off-by: default avatarAnjali Singhai Jain <anjali.singhai@intel.com>
Signed-off-by: default avatarJesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: default avatarKavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent f551b438
Loading
Loading
Loading
Loading
+10 −0
Original line number Original line Diff line number Diff line
@@ -3966,6 +3966,15 @@ static int i40e_open(struct net_device *netdev)
	if (err)
	if (err)
		goto err_setup_rx;
		goto err_setup_rx;


	/* Notify the stack of the actual queue counts. */
	err = netif_set_real_num_tx_queues(netdev, pf->num_tx_queues);
	if (err)
		goto err_set_queues;

	err = netif_set_real_num_rx_queues(netdev, pf->num_rx_queues);
	if (err)
		goto err_set_queues;

	err = i40e_up_complete(vsi);
	err = i40e_up_complete(vsi);
	if (err)
	if (err)
		goto err_up_complete;
		goto err_up_complete;
@@ -3982,6 +3991,7 @@ static int i40e_open(struct net_device *netdev)


err_up_complete:
err_up_complete:
	i40e_down(vsi);
	i40e_down(vsi);
err_set_queues:
	i40e_vsi_free_irq(vsi);
	i40e_vsi_free_irq(vsi);
err_setup_rx:
err_setup_rx:
	i40e_vsi_free_rx_resources(vsi);
	i40e_vsi_free_rx_resources(vsi);