Commit 7709b4c1 authored by Alexander Duyck's avatar Alexander Duyck Committed by Jeff Kirsher

i40evf: Add support for netpoll

Signed-off-by: default avatarAlexander Duyck <aduyck@mirantis.com>
Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 8b650359
...@@ -444,6 +444,29 @@ static int i40evf_map_rings_to_vectors(struct i40evf_adapter *adapter) ...@@ -444,6 +444,29 @@ static int i40evf_map_rings_to_vectors(struct i40evf_adapter *adapter)
return err; return err;
} }
#ifdef CONFIG_NET_POLL_CONTROLLER
/**
* i40evf_netpoll - A Polling 'interrupt' handler
* @netdev: network interface device structure
*
* This is used by netconsole to send skbs without having to re-enable
* interrupts. It's not called while the normal interrupt routine is executing.
**/
static void i40evf_netpoll(struct net_device *netdev)
{
struct i40evf_adapter *adapter = netdev_priv(netdev);
int q_vectors = adapter->num_msix_vectors - NONQ_VECS;
int i;
/* if interface is down do nothing */
if (test_bit(__I40E_DOWN, &adapter->vsi.state))
return;
for (i = 0; i < q_vectors; i++)
i40evf_msix_clean_rings(0, adapter->q_vector[i]);
}
#endif
/** /**
* i40evf_request_traffic_irqs - Initialize MSI-X interrupts * i40evf_request_traffic_irqs - Initialize MSI-X interrupts
* @adapter: board private structure * @adapter: board private structure
...@@ -2049,6 +2072,9 @@ static const struct net_device_ops i40evf_netdev_ops = { ...@@ -2049,6 +2072,9 @@ static const struct net_device_ops i40evf_netdev_ops = {
.ndo_tx_timeout = i40evf_tx_timeout, .ndo_tx_timeout = i40evf_tx_timeout,
.ndo_vlan_rx_add_vid = i40evf_vlan_rx_add_vid, .ndo_vlan_rx_add_vid = i40evf_vlan_rx_add_vid,
.ndo_vlan_rx_kill_vid = i40evf_vlan_rx_kill_vid, .ndo_vlan_rx_kill_vid = i40evf_vlan_rx_kill_vid,
#ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = i40evf_netpoll,
#endif
}; };
/** /**
......
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