[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 06 Jun 2012 21:42:22 +0200
From: Eric Dumazet <eric.dumazet@...il.com>
To: David Miller <davem@...emloft.net>
Cc: grant.b.edwards@...il.com, netdev@...r.kernel.org
Subject: Re: Change in alloc_skb() behavior in 3.2+ kernels?
On Wed, 2012-06-06 at 11:51 -0700, David Miller wrote:
> From: Grant Edwards <grant.b.edwards@...il.com>
> Date: Wed, 6 Jun 2012 18:32:57 +0000 (UTC)
>
> > The kernel module that's started failing fills the allocated sk_buff
> > until tailroom() indicates it is full and then sends it. The problem
> > is that sending a packet with a length of 1850 won't work (it's a
> > MAC-layer Ethernet packet).
>
> The amount of tailroom an SKB has is implementation dependent.
>
> It's incredibly poor form to rely upon it to determine whether a fully
> sized frame has been constructed or not.
>
> Please fix the code that does this.
By the way, we had a similar problem, and the fix was :
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commitdiff;h=a21d45726acacc963d8baddf74607d9b74e2b723
Grant, depending on the context, you might use skb->avail_size and
skb_availroom() as well.
Beware skb->avail_size is unioned with skb->{mark|dropcount}
--
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