diff options
author | Bert Kenward <bkenward@solarflare.com> | 2018-01-25 17:24:20 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-01-25 16:05:13 -0500 |
commit | 5227ecccea2d645d253d243ad287169335a4ae64 (patch) | |
tree | bd8a3e1833aa56bdc5b6252ac60dee25d2cda079 /drivers/net/ethernet/sfc/ef10.c | |
parent | fb07a820fe3fedabffc57863e0f823c912d81bad (diff) | |
download | linux-5227ecccea2d645d253d243ad287169335a4ae64.tar.gz linux-5227ecccea2d645d253d243ad287169335a4ae64.tar.bz2 linux-5227ecccea2d645d253d243ad287169335a4ae64.zip |
sfc: remove tx and MCDI handling from NAPI budget consideration
The NAPI budget is only for RX processing work, not other work such as
TX or MCDI completion handling.
Signed-off-by: Bert Kenward <bkenward@solarflare.com>
Signed-off-by: Edward Cree <ecree@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sfc/ef10.c')
-rw-r--r-- | drivers/net/ethernet/sfc/ef10.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/drivers/net/ethernet/sfc/ef10.c b/drivers/net/ethernet/sfc/ef10.c index 8ae467db9162..03ec2cc1eab4 100644 --- a/drivers/net/ethernet/sfc/ef10.c +++ b/drivers/net/ethernet/sfc/ef10.c @@ -3572,31 +3572,26 @@ static int efx_ef10_handle_rx_event(struct efx_channel *channel, return n_packets; } -static int +static void efx_ef10_handle_tx_event(struct efx_channel *channel, efx_qword_t *event) { struct efx_nic *efx = channel->efx; struct efx_tx_queue *tx_queue; unsigned int tx_ev_desc_ptr; unsigned int tx_ev_q_label; - int tx_descs = 0; if (unlikely(READ_ONCE(efx->reset_pending))) - return 0; + return; if (unlikely(EFX_QWORD_FIELD(*event, ESF_DZ_TX_DROP_EVENT))) - return 0; + return; /* Transmit completion */ tx_ev_desc_ptr = EFX_QWORD_FIELD(*event, ESF_DZ_TX_DESCR_INDX); tx_ev_q_label = EFX_QWORD_FIELD(*event, ESF_DZ_TX_QLABEL); tx_queue = efx_channel_get_tx_queue(channel, tx_ev_q_label % EFX_TXQ_TYPES); - tx_descs = ((tx_ev_desc_ptr + 1 - tx_queue->read_count) & - tx_queue->ptr_mask); efx_xmit_done(tx_queue, tx_ev_desc_ptr & tx_queue->ptr_mask); - - return tx_descs; } static void @@ -3658,7 +3653,6 @@ static int efx_ef10_ev_process(struct efx_channel *channel, int quota) efx_qword_t event, *p_event; unsigned int read_ptr; int ev_code; - int tx_descs = 0; int spent = 0; if (quota <= 0) @@ -3698,13 +3692,7 @@ static int efx_ef10_ev_process(struct efx_channel *channel, int quota) } break; case ESE_DZ_EV_CODE_TX_EV: - tx_descs += efx_ef10_handle_tx_event(channel, &event); - if (tx_descs > efx->txq_entries) { - spent = quota; - goto out; - } else if (++spent == quota) { - goto out; - } + efx_ef10_handle_tx_event(channel, &event); break; case ESE_DZ_EV_CODE_DRIVER_EV: efx_ef10_handle_driver_event(channel, &event); |