public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Andrew Gallatin <gallatin@myri•com>
To: netdev <netdev@vger•kernel.org>
Subject: gro vs vlan in myri10ge
Date: Thu, 08 Nov 2012 21:20:08 -0500	[thread overview]
Message-ID: <509C6858.6010105@myri.com> (raw)

Hi,

I've wanted to convert myri10ge from LRO to GRO for quite a while.
The problem I'm facing is that the NIC cannot perform hardware vlan
tag offload, so GRO performance is far below LRO performance when
receiving vlan tagged TCP traffic.

If a vlan tagged frame is passed to lro_receive_frags(), inet_lro will
look at the encapsulated IPv4 frame and TCP aggregation will succeed.
However, it appears that GRO will not do this.  When I patch the
driver to use GRO, and configure a vlan interface, I see high CPU
utilization and poor bandwidth when I'm receiving a netperf TCP stream
on the vlan interface.  If I use LRO in an unpatched driver, then I
see good receive performance in the same scenario.

What is the best way to "fix" this?

Unless I'm just using GRO wrong, it seems that the simplest thing for
me to do is to claim NETIF_F_HW_VLAN_RX, but pop the tags in the
driver so as to allow myri10ge to pass up a non-encapsulated frame the
same way that (nearly?) every other 10GbE NIC does.  I've got a quick
and dirty patch that confirms doing the vtag pop in the driver gives
me roughly the same performance with GRO as I used to have with LRO.

Is this (popping vlan tags in the driver) acceptable, or is it
too much of a layering violation?

Thanks,

Drew

             reply	other threads:[~2012-11-09  2:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-09  2:20 Andrew Gallatin [this message]
2012-11-09  2:41 ` gro vs vlan in myri10ge Eric Dumazet
2012-11-09 12:47   ` Andrew Gallatin
2012-11-15 20:39   ` Ben Hutchings

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=509C6858.6010105@myri.com \
    --to=gallatin@myri$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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