Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 50f444aa authored by Robert Stonehouse's avatar Robert Stonehouse Committed by David S. Miller
Browse files

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: default avatarRobert Stonehouse <rstonehouse@solarflare.com>
Signed-off-by: default avatarBert Kenward <bkenward@solarflare.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e772261b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -915,7 +915,7 @@ efx_realloc_channels(struct efx_nic *efx, u32 rxq_entries, u32 txq_entries)

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)
+1 −2
Original line number Diff line number Diff line
@@ -360,7 +360,6 @@ 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);
			goto out;
		}