Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: grant.b.edwards@gmail.com, netdev@vger.kernel.org
Subject: Re: Change in alloc_skb() behavior in 3.2+ kernels?
Date: Wed, 06 Jun 2012 21:42:22 +0200	[thread overview]
Message-ID: <1339011742.26966.44.camel@edumazet-glaptop> (raw)
In-Reply-To: <20120606.115130.1091814494251887552.davem@davemloft.net>

On Wed, 2012-06-06 at 11:51 -0700, David Miller wrote:
> From: Grant Edwards <grant.b.edwards@gmail.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}

  parent reply	other threads:[~2012-06-06 19:42 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-06 18:32 Change in alloc_skb() behavior in 3.2+ kernels? Grant Edwards
2012-06-06 18:42 ` Eric Dumazet
2012-06-06 18:59   ` Grant Edwards
2012-06-06 19:02     ` David Miller
2012-06-06 20:22       ` Grant Edwards
2012-06-07  1:23         ` [PATCH net-next] net: Update kernel-doc for __alloc_skb() Ben Hutchings
2012-06-07 20:19           ` David Miller
2012-06-07 13:23       ` Change in alloc_skb() behavior in 3.2+ kernels? Grant Edwards
2012-06-07 14:01         ` Eric Dumazet
2012-06-07 14:16           ` Grant Edwards
2012-06-07 14:25             ` Eric Dumazet
2012-06-06 18:51 ` David Miller
2012-06-06 19:01   ` Grant Edwards
2012-06-06 20:17     ` David Miller
2012-06-06 20:24       ` Grant Edwards
2012-06-06 20:31         ` Eric Dumazet
2012-06-06 20:35           ` Grant Edwards
2012-06-06 19:42   ` Eric Dumazet [this message]
2012-06-06 20:26     ` Grant Edwards

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1339011742.26966.44.camel@edumazet-glaptop \
    --to=eric.dumazet@gmail.com \
    --cc=davem@davemloft.net \
    --cc=grant.b.edwards@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox