[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1363804952.3333.29.camel@edumazet-glaptop>
Date: Wed, 20 Mar 2013 11:42:32 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: Stephen Hemminger <stephen@...workplumber.org>
Cc: David Miller <davem@...emloft.net>, netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH] chelsio: use netdev_alloc_skb
On Wed, 2013-03-20 at 11:30 -0700, Stephen Hemminger wrote:
> This extends on Eric's patch. It uses netdev_alloc_skb which fixes a couple of
> other issues.
> * driver was never setting skb->dev on the received buffer
> * copybreak allocation wasn't padding buffer
> * copybreak assumed that ip alignment padding was always 2 (it is platform dependent)
>
> Compile tested only, don't have this hardware.
>
> Signed-off-by: Stephen Hemminger <stephen@...workplumber.org>
>
>
> --- a/drivers/net/ethernet/chelsio/cxgb/sge.c 2013-03-20 11:13:47.950986878 -0700
> +++ b/drivers/net/ethernet/chelsio/cxgb/sge.c 2013-03-20 11:24:26.942722757 -0700
> @@ -835,7 +835,7 @@ static void refill_free_list(struct sge
> struct sk_buff *skb;
> dma_addr_t mapping;
>
> - skb = dev_alloc_skb(q->rx_buffer_size);
> + skb = netdev_alloc_skb(sge->netdev, q->rx_buffer_size);
> if (!skb)
> break;
Well, this (skb->dev = dev) is done in eth_type_trans()
Many drivers use dev_alloc_skb(), I am not sure we really want to change
them.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists