public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Alexander Duyck <alexander.duyck@gmail.com>
Cc: Alexander Duyck <alexander.h.duyck@intel.com>,
	netdev@vger.kernel.org, davem@davemloft.net,
	Eric Dumazet <edumazet@google.com>,
	Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: Re: [PATCH 2/2] tcp: cleanup tcp_try_coalesce
Date: Thu, 03 May 2012 07:19:33 +0200	[thread overview]
Message-ID: <1336022373.12425.24.camel@edumazet-glaptop> (raw)
In-Reply-To: <4FA21087.1080801@gmail.com>

On Wed, 2012-05-02 at 21:58 -0700, Alexander Duyck wrote:
> The question I have is how can you get into a case where the ksize is 
> different from the end offset plus the aligned size of skb_shared_info?  
> From what I can tell it looks like the only place we can lie is if we 
> use build_skb with the frag_size option, and in that case we are using a 
> page, not kmalloc memory.  Otherwise in all other cases __alloc_skb or 
> build_skb is using ksize(skb->head) - SKB_DATA_ALIGN(struct 
> skb_shared_info) to set the end pointer, so reversing that should give 
> us the same value as ksize(skb->head).


Right after skb is allocated (build_skb() or other skb_alloc...
variants), truesize is correct by construction.

Then drivers add fragments and can make truesize smaller than reality.

And Intel drivers are known to abuse truesize.

My last patch against iwlwifi is still waiting to make its way into
official tree.

http://www.spinics.net/lists/netdev/msg192629.html

  reply	other threads:[~2012-05-03  5:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-03  3:38 [PATCH 0/2] Cleanups for head_frag usage and tcp_try_coalese Alexander Duyck
2012-05-03  3:38 ` [PATCH 1/2] net: Stop decapitating clones that have a head_frag Alexander Duyck
2012-05-03  3:56   ` Eric Dumazet
2012-05-03  3:39 ` [PATCH 2/2] tcp: cleanup tcp_try_coalesce Alexander Duyck
2012-05-03  4:06   ` Eric Dumazet
2012-05-03  4:58     ` Alexander Duyck
2012-05-03  5:19       ` Eric Dumazet [this message]
2012-05-03  5:25         ` David Miller
     [not found]           ` <20120503.012502.44731688706812861.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2012-05-03 15:14             ` John W. Linville
2012-05-03 15:24               ` Guy, Wey-Yi
2012-05-03 17:07                 ` John W. Linville
     [not found]                   ` <20120503170727.GM9285-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>
2012-05-03 20:21                     ` Guy, Wey-Yi
2012-05-03  5:41         ` Alexander Duyck
2012-05-03  5:50           ` David Miller
2012-05-03  7:08             ` Alexander Duyck

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=1336022373.12425.24.camel@edumazet-glaptop \
    --to=eric.dumazet@gmail.com \
    --cc=alexander.duyck@gmail.com \
    --cc=alexander.h.duyck@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jeffrey.t.kirsher@intel.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