netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Hutchings <bhutchings@solarflare.com>
To: Patrick McHardy <kaber@trash.net>
Cc: Lennert Buytenhek <buytenh@wantstofly.org>, netdev@vger.kernel.org
Subject: Re: [PATCH 1/2][RFC] vlan: use pskb_copy() when inserting a vlan tag by hand
Date: Tue, 8 Jul 2008 23:10:17 +0100	[thread overview]
Message-ID: <20080708221016.GJ28029@solarflare.com> (raw)
In-Reply-To: <4873B6E1.9010702@trash.net>

Patrick McHardy wrote:
[...]
> Without checking if its actually needed, I would tend to agree because
> a caller can't rely on getting a linearized skb back except when its
> guaranteed to be cloned, in the case it could simply copy it always.
> 
> Anyway, the copy in __vlan_put_tag() is overkill since the header
> is usually writable. See the patch I sent in my second mail, it
> should reduce the overhead significantly.
> 
> Actually there was a small bug in the one I sent, so attached again
> to this mail.

This looks great.  Since our controller doesn't do VLAN tag insertion, I
ran some quick tests and it improved TCP throughput over VLAN devices
without TSO by about 50%.  (With TSO on, the change wasn't so great - I
think this was because the receive side couldn't do LRO on tagged
packets.)

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.

      parent reply	other threads:[~2008-07-08 22:10 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-07 20:56 [PATCH 1/2][RFC] vlan: use pskb_copy() when inserting a vlan tag by hand Lennert Buytenhek
2008-07-07 21:01 ` Patrick McHardy
2008-07-07 21:07   ` Lennert Buytenhek
2008-07-07 21:15     ` Patrick McHardy
2008-07-08 16:24       ` Patrick McHardy
2008-07-08 17:41         ` Patrick McHardy
2008-07-08 18:52         ` Lennert Buytenhek
2008-07-08 18:50           ` Patrick McHardy
2008-07-08 19:33             ` Lennert Buytenhek
2008-07-08 20:15               ` Patrick McHardy
2008-07-08 22:02                 ` David Miller
2008-07-08 22:18                   ` Patrick McHardy
2008-07-08 22:37                     ` David Miller
2008-07-08 22:10             ` Ben Hutchings [this message]

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=20080708221016.GJ28029@solarflare.com \
    --to=bhutchings@solarflare.com \
    --cc=buytenh@wantstofly.org \
    --cc=kaber@trash.net \
    --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;
as well as URLs for NNTP newsgroup(s).