netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ian Campbell <Ian.Campbell@citrix.com>
To: David Vrabel <david.vrabel@citrix.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>,
	David Miller <davem@davemloft.net>, <zoltan.kiss@linaro.org>,
	<netdev@vger.kernel.org>, <malcolm.crossley@citrix.com>,
	<wei.liu2@citrix.com>, <xen-devel@lists.xenproject.org>
Subject: Re: [Xen-devel] [PATCHv1 net-next] xen-netback: remove unconditional pull_skb_tail in guest Tx path
Date: Wed, 5 Nov 2014 10:53:28 +0000	[thread overview]
Message-ID: <1415184808.11486.82.camel@citrix.com> (raw)
In-Reply-To: <545A000D.8070808@citrix.com>

On Wed, 2014-11-05 at 10:46 +0000, David Vrabel wrote:
> On 04/11/14 21:43, Eric Dumazet wrote:
> > On Tue, 2014-11-04 at 16:17 -0500, David Miller wrote:
> > 
> > 
> >>
> >> Every protocol demux starts with pskb_may_pull() to pull frag data
> >> into the linear area, if necessary, before looking at headers.
> > 
> > eth_get_headlen() might be relevant as well, to perform a single copy of
> > exactly all headers.
> 
> In netback's case we need an estimate of the header length before
> reading any of the packet, since peeking at any frag would prevent any
> TLB flush avoidance.
> 
> It might be useful to use eth_get_headlen() to adjust the estimate at
> runtime, but for now the fixed amount of 128 bytes is simple and seems
> good enough.

I think what Eric meant was that having done the 128 copy you could call
eth_get_headlen which in the common case should be a nop but would
ensure you always had the headers in the linear area for the uncommon
case.

It looks like the difference compared with skb_checksum_setup is that
eth_get_headlen deals with L4 too whereas skb_checksum_setup only goes
to L3 (and then only for some subset of protocols with checksums).

Ian.

  reply	other threads:[~2014-11-05 10:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-03 17:23 [PATCHv1 net-next] xen-netback: remove unconditional pull_skb_tail in guest Tx path David Vrabel
2014-11-03 17:39 ` Ian Campbell
2014-11-03 17:46   ` David Vrabel
2014-11-03 17:55     ` Ian Campbell
2014-11-03 18:23     ` [Xen-devel] " Zoltan Kiss
2014-11-04 21:17       ` David Miller
2014-11-04 21:43         ` Eric Dumazet
2014-11-05 10:46           ` David Vrabel
2014-11-05 10:53             ` Ian Campbell [this message]
2014-11-05  9:51         ` Ian Campbell
2014-11-05 17:15           ` David Miller
2014-11-04 21:41 ` David Miller
2014-11-05  9:53   ` Ian Campbell
2014-11-05 17:16     ` David Miller

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=1415184808.11486.82.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=davem@davemloft.net \
    --cc=david.vrabel@citrix.com \
    --cc=eric.dumazet@gmail.com \
    --cc=malcolm.crossley@citrix.com \
    --cc=netdev@vger.kernel.org \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    --cc=zoltan.kiss@linaro.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;
as well as URLs for NNTP newsgroup(s).