Re: [PATCH 1/1] netdev/ethernet: dev_alloc_skb to netdev_alloc_skb

From: Eric Dumazet
Date: Sat Jan 21 2012 - 10:54:09 EST


Le samedi 21 janvier 2012 Ã 20:13 +0530, Pradeep A. Dalvi a Ãcrit :
> Replaced deprecating dev_alloc_skb with netdev_alloc_skb in drivers/net/ethernet
>
> Signed-off-by: Pradeep A. Dalvi <netdev@xxxxxxxxxxxxxxxx>
> ---

...

> 114 files changed, 257 insertions(+), 203 deletions(-)
>
> diff --git a/drivers/net/ethernet/3com/3c501.c b/drivers/net/ethernet/3com/3c501.c
> index 68da81d..9ebc739 100644
> --- a/drivers/net/ethernet/3com/3c501.c
> +++ b/drivers/net/ethernet/3com/3c501.c
> @@ -702,7 +702,7 @@ static void el_receive(struct net_device *dev)
> */
>
> outb(AX_SYS, AX_CMD);
> - skb = dev_alloc_skb(pkt_len+2);
> + skb = netdev_alloc_skb(dev, pkt_len + NET_IP_ALIGN);
>
> /*
> * Start of frame
> diff --git a/drivers/net/ethernet/3com/3c509.c b/drivers/net/ethernet/3com/3c509.c


So the very first chunk of this huge patch is wrong, since it adds a
true bug. (You dont change the skb_reserve(skb, 2); later)

I stopped my review at this first chunk.

Please dont add NET_IP_ALIGN on drivers if you cant test the change
yourself.

Some hardware really need the hardcoded 2 value.



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