summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/sfc
diff options
context:
space:
mode:
authorRobert Stonehouse <rstonehouse@solarflare.com>2019-02-14 20:27:43 +0300
committerDavid S. Miller <davem@davemloft.net>2019-02-14 20:47:16 +0300
commit50f444aa50a4f3fab35a04f56d6bb83dc1e8c875 (patch)
tree327e50657842ed8c78f5629c23e1c4fd445f9cf9 /drivers/net/ethernet/sfc
parente772261b53bc45f53693ae4514658cd376da9e56 (diff)
downloadlinux-50f444aa50a4f3fab35a04f56d6bb83dc1e8c875.tar.xz
sfc: ensure recovery after allocation failures
After failing to allocate a receive buffer the driver may fail to ever request additional allocations. EF10 NICs require new receive buffers to be pushed in batches of eight or more. The test for whether a slow fill should be scheduled failed to take account of this. There is little downside to *always* requesting a slow fill if we failed to allocate a buffer, so the condition has been removed completely. The timer that triggers the request for a refill has also been shortened. Signed-off-by: Robert Stonehouse <rstonehouse@solarflare.com> Signed-off-by: Bert Kenward <bkenward@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sfc')
-rw-r--r--drivers/net/ethernet/sfc/efx.c2
-rw-r--r--drivers/net/ethernet/sfc/rx.c3
2 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c
index 3643015a55cf..bc655ffc9e02 100644
--- a/drivers/net/ethernet/sfc/efx.c
+++ b/drivers/net/ethernet/sfc/efx.c
@@ -915,7 +915,7 @@ rollback:
void efx_schedule_slow_fill(struct efx_rx_queue *rx_queue)
{
- mod_timer(&rx_queue->slow_fill, jiffies + msecs_to_jiffies(100));
+ mod_timer(&rx_queue->slow_fill, jiffies + msecs_to_jiffies(10));
}
static bool efx_default_channel_want_txqs(struct efx_channel *channel)
diff --git a/drivers/net/ethernet/sfc/rx.c b/drivers/net/ethernet/sfc/rx.c
index 396ff01298cd..8702ab44d80b 100644
--- a/drivers/net/ethernet/sfc/rx.c
+++ b/drivers/net/ethernet/sfc/rx.c
@@ -360,8 +360,7 @@ void efx_fast_push_rx_descriptors(struct efx_rx_queue *rx_queue, bool atomic)
rc = efx_init_rx_buffers(rx_queue, atomic);
if (unlikely(rc)) {
/* Ensure that we don't leave the rx queue empty */
- if (rx_queue->added_count == rx_queue->removed_count)
- efx_schedule_slow_fill(rx_queue);
+ efx_schedule_slow_fill(rx_queue);
goto out;
}
} while ((space -= batch_size) >= batch_size);