Commit c22e3c6c authored by Shannon Nelson's avatar Shannon Nelson Committed by Jeff Kirsher

i40e: prep vsi_open logic for non-netdev cases

Rearrange the "if netdev" logic slightly to get ready for handling
non-netdev VSIs.

Change-ID: Ia0bfe13d4c994a2351a3c31fe725b75caeb397ee
Signed-off-by: default avatarShannon Nelson <shannon.nelson@intel.com>
Signed-off-by: default avatarCatherine Sullivan <catherine.sullivan@intel.com>
Tested-by: default avatarKavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent befc229c
...@@ -4306,24 +4306,27 @@ int i40e_vsi_open(struct i40e_vsi *vsi) ...@@ -4306,24 +4306,27 @@ int i40e_vsi_open(struct i40e_vsi *vsi)
if (err) if (err)
goto err_setup_rx; goto err_setup_rx;
if (!vsi->netdev) { if (vsi->netdev) {
snprintf(int_name, sizeof(int_name) - 1, "%s-%s",
dev_driver_string(&pf->pdev->dev), vsi->netdev->name);
err = i40e_vsi_request_irq(vsi, int_name);
if (err)
goto err_setup_rx;
/* Notify the stack of the actual queue counts. */
err = netif_set_real_num_tx_queues(vsi->netdev,
vsi->num_queue_pairs);
if (err)
goto err_set_queues;
err = netif_set_real_num_rx_queues(vsi->netdev,
vsi->num_queue_pairs);
if (err)
goto err_set_queues;
} else {
err = EINVAL; err = EINVAL;
goto err_setup_rx; goto err_setup_rx;
} }
snprintf(int_name, sizeof(int_name) - 1, "%s-%s",
dev_driver_string(&pf->pdev->dev), vsi->netdev->name);
err = i40e_vsi_request_irq(vsi, int_name);
if (err)
goto err_setup_rx;
/* Notify the stack of the actual queue counts. */
err = netif_set_real_num_tx_queues(vsi->netdev, vsi->num_queue_pairs);
if (err)
goto err_set_queues;
err = netif_set_real_num_rx_queues(vsi->netdev, vsi->num_queue_pairs);
if (err)
goto err_set_queues;
err = i40e_up_complete(vsi); err = i40e_up_complete(vsi);
if (err) if (err)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment