Re: [PATCH 3/3] ehea: Improve driver behaviour in low memconditions

From: David Miller
Date: Wed Jan 21 2009 - 17:47:32 EST


From: Thomas Klein <tklein@xxxxxxxxxx>
Date: Wed, 21 Jan 2009 15:49:41 +0100

> Reworked receive queue fill policies to make the driver more tolerant
> in low memory conditions.
>
> Signed-off-by: Thomas Klein <tklein@xxxxxxxxxx>

Applied, but there is an even better way to handle this.

You should be allocating replacement RX skbs at receive time. And if
the RX allocation fails, you simply give the RX skb back to the chip
and do not pass it up into the stack.

This is what many ethernet drivers do to ensure that the chip never
can reach a situation where the free RX packet queue becomes empty.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/