netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Schmidt <mschmidt@redhat.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: netdev@vger.kernel.org, Eric Dumazet <edumazet@google.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jerry Chu <hkchu@google.com>
Subject: Re: [PATCH net-next] net-gro: restore frag0 optimization
Date: Tue, 01 Apr 2014 18:40:11 +0200	[thread overview]
Message-ID: <533AEBEB.5020400@redhat.com> (raw)
In-Reply-To: <1396153701.29410.27.camel@edumazet-glaptop2.roam.corp.google.com>

On 03/30/2014 06:28 AM, Eric Dumazet wrote:
> Main difference between napi_frags_skb() and napi_gro_receive() is that
> the later is called while ethernet header was already pulled by the NIC
> driver (eth_type_trans() was called before napi_gro_receive())
> 
> Jerry Chu in commit 299603e8370a ("net-gro: Prepare GRO stack for the
> upcoming tunneling support") tried to remove this difference by calling
> eth_type_trans() from napi_frags_skb() instead of doing this later from
> napi_frags_finish()
> 
> Goal was that napi_gro_complete() could call 
> ptype->callbacks.gro_complete(skb, 0)  (offset of first network header =
> 0)
> 
> Also, xxx_gro_receive() handlers all use off = skb_gro_offset(skb) to
> point to their own header, for the current skb and ones held in gro_list
> 
> Problem is this cleanup work defeated the frag0 optimization:
> It turns out the consecutive pskb_may_pull() calls are too expensive.
> 
> This patch brings back the frag0 stuff in napi_frags_skb().
> 
> As all skb have their mac header in skb head, we no longer need
> skb_gro_mac_header()

Eric,
thank you. The patch improves the performance. Though it's still not as
fast as it was before the commit "net-gro: Prepare GRO stack for the
upcoming tunneling support". In repeated netperf runs my reporter now
sees occasional results above 9 Gb/s, but on average it's only 7 Gb/s.

With your patch only Ethernet headers (and not other headers) are copied
into skbs' heads, but this is done for all skbs. Previously (before
Jerry's patch) no copying was needed for skbs that were GRO_MERGED.
Is this correct?

Regards,
Michal

  parent reply	other threads:[~2014-04-01 17:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-27 16:39 significant napi_gro_frags() slowdown Michal Schmidt
2014-03-27 16:47 ` Eric Dumazet
2014-03-27 17:05   ` Michal Schmidt
2014-03-27 17:21     ` Eric Dumazet
2014-03-30  4:28       ` [PATCH net-next] net-gro: restore frag0 optimization Eric Dumazet
2014-03-31 20:27         ` David Miller
2014-03-31 21:01           ` Eric Dumazet
2014-03-31 21:19             ` Eric Dumazet
2014-04-01 16:40         ` Michal Schmidt [this message]
2014-04-01 17:16           ` Eric Dumazet

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=533AEBEB.5020400@redhat.com \
    --to=mschmidt@redhat.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=hkchu@google.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;
as well as URLs for NNTP newsgroup(s).