|
@@ -308,9 +308,6 @@ static int efx_poll(struct napi_struct *napi, int budget)
|
|
struct efx_nic *efx = channel->efx;
|
|
struct efx_nic *efx = channel->efx;
|
|
int spent;
|
|
int spent;
|
|
|
|
|
|
- if (!efx_channel_lock_napi(channel))
|
|
|
|
- return budget;
|
|
|
|
-
|
|
|
|
netif_vdbg(efx, intr, efx->net_dev,
|
|
netif_vdbg(efx, intr, efx->net_dev,
|
|
"channel %d NAPI poll executing on CPU %d\n",
|
|
"channel %d NAPI poll executing on CPU %d\n",
|
|
channel->channel, raw_smp_processor_id());
|
|
channel->channel, raw_smp_processor_id());
|
|
@@ -335,7 +332,6 @@ static int efx_poll(struct napi_struct *napi, int budget)
|
|
efx_nic_eventq_read_ack(channel);
|
|
efx_nic_eventq_read_ack(channel);
|
|
}
|
|
}
|
|
|
|
|
|
- efx_channel_unlock_napi(channel);
|
|
|
|
return spent;
|
|
return spent;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -391,7 +387,6 @@ void efx_start_eventq(struct efx_channel *channel)
|
|
channel->enabled = true;
|
|
channel->enabled = true;
|
|
smp_wmb();
|
|
smp_wmb();
|
|
|
|
|
|
- efx_channel_enable(channel);
|
|
|
|
napi_enable(&channel->napi_str);
|
|
napi_enable(&channel->napi_str);
|
|
efx_nic_eventq_read_ack(channel);
|
|
efx_nic_eventq_read_ack(channel);
|
|
}
|
|
}
|
|
@@ -403,8 +398,6 @@ void efx_stop_eventq(struct efx_channel *channel)
|
|
return;
|
|
return;
|
|
|
|
|
|
napi_disable(&channel->napi_str);
|
|
napi_disable(&channel->napi_str);
|
|
- while (!efx_channel_disable(channel))
|
|
|
|
- usleep_range(1000, 20000);
|
|
|
|
channel->enabled = false;
|
|
channel->enabled = false;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -2088,7 +2081,6 @@ static void efx_init_napi_channel(struct efx_channel *channel)
|
|
channel->napi_dev = efx->net_dev;
|
|
channel->napi_dev = efx->net_dev;
|
|
netif_napi_add(channel->napi_dev, &channel->napi_str,
|
|
netif_napi_add(channel->napi_dev, &channel->napi_str,
|
|
efx_poll, napi_weight);
|
|
efx_poll, napi_weight);
|
|
- efx_channel_busy_poll_init(channel);
|
|
|
|
}
|
|
}
|
|
|
|
|
|
static void efx_init_napi(struct efx_nic *efx)
|
|
static void efx_init_napi(struct efx_nic *efx)
|
|
@@ -2138,37 +2130,6 @@ static void efx_netpoll(struct net_device *net_dev)
|
|
|
|
|
|
#endif
|
|
#endif
|
|
|
|
|
|
-#ifdef CONFIG_NET_RX_BUSY_POLL
|
|
|
|
-static int efx_busy_poll(struct napi_struct *napi)
|
|
|
|
-{
|
|
|
|
- struct efx_channel *channel =
|
|
|
|
- container_of(napi, struct efx_channel, napi_str);
|
|
|
|
- struct efx_nic *efx = channel->efx;
|
|
|
|
- int budget = 4;
|
|
|
|
- int old_rx_packets, rx_packets;
|
|
|
|
-
|
|
|
|
- if (!netif_running(efx->net_dev))
|
|
|
|
- return LL_FLUSH_FAILED;
|
|
|
|
-
|
|
|
|
- if (!efx_channel_try_lock_poll(channel))
|
|
|
|
- return LL_FLUSH_BUSY;
|
|
|
|
-
|
|
|
|
- old_rx_packets = channel->rx_queue.rx_packets;
|
|
|
|
- efx_process_channel(channel, budget);
|
|
|
|
-
|
|
|
|
- rx_packets = channel->rx_queue.rx_packets - old_rx_packets;
|
|
|
|
-
|
|
|
|
- /* There is no race condition with NAPI here.
|
|
|
|
- * NAPI will automatically be rescheduled if it yielded during busy
|
|
|
|
- * polling, because it was not able to take the lock and thus returned
|
|
|
|
- * the full budget.
|
|
|
|
- */
|
|
|
|
- efx_channel_unlock_poll(channel);
|
|
|
|
-
|
|
|
|
- return rx_packets;
|
|
|
|
-}
|
|
|
|
-#endif
|
|
|
|
-
|
|
|
|
/**************************************************************************
|
|
/**************************************************************************
|
|
*
|
|
*
|
|
* Kernel net device interface
|
|
* Kernel net device interface
|
|
@@ -2402,9 +2363,6 @@ static const struct net_device_ops efx_netdev_ops = {
|
|
.ndo_poll_controller = efx_netpoll,
|
|
.ndo_poll_controller = efx_netpoll,
|
|
#endif
|
|
#endif
|
|
.ndo_setup_tc = efx_setup_tc,
|
|
.ndo_setup_tc = efx_setup_tc,
|
|
-#ifdef CONFIG_NET_RX_BUSY_POLL
|
|
|
|
- .ndo_busy_poll = efx_busy_poll,
|
|
|
|
-#endif
|
|
|
|
#ifdef CONFIG_RFS_ACCEL
|
|
#ifdef CONFIG_RFS_ACCEL
|
|
.ndo_rx_flow_steer = efx_filter_rfs,
|
|
.ndo_rx_flow_steer = efx_filter_rfs,
|
|
#endif
|
|
#endif
|