Re: [PATCH] 2.6.9 Use skb_padto() in drivers/net/8390.c

From: Alan Cox
Date: Fri Jan 07 2005 - 11:56:35 EST


On Llu, 2004-12-27 at 20:18, Linux Kernel Mailing List wrote:
> ChangeSet 1.1938.455.1, 2004/12/27 15:18:56-05:00, penguin@xxxxxxxxxxx
>
> [PATCH] 2.6.9 Use skb_padto() in drivers/net/8390.c
>
> The 8390 driver had been fixed for leaking information in short packets
> prior to skb_padto() existing. This change gets rid of the scratch area on
> the stack and makes it use skb_padto(). Thanks to Mark Smith for bringing
> this to my attention.
>
> Signed-off-by: Paul Gortmaker <p_gortmaker@xxxxxxxxx>
> Signed-off-by: Jeff Garzik <jgarzik@xxxxxxxxx>

This was done because it benchmarked materially faster than the
skb_padto version you just reverted. Its only 64 bytes on the stack and
its cached.

ie the old 8390 code was quite intentional and done because it commonly
occurs on very old machines where clock count matters. Because of its
commonness I actually hand optimised this one when I did the original
fixes to avoid doing extra memory allocations.

Summary: Please revert.

Alan

-
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/