netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Duyck <aduyck@mirantis.com>
To: netdev@vger.kernel.org, davem@davemloft.net, alexander.duyck@gmail.com
Subject: [net-next PATCH 0/2] GENEVE/VXLAN: Enable outer Tx checksum by default
Date: Fri, 19 Feb 2016 11:26:17 -0800	[thread overview]
Message-ID: <20160219191806.15687.37621.stgit@localhost.localdomain> (raw)

This patch series makes it so that we enable the outer Tx checksum for IPv4
tunnels by default.  This makes the behavior consistent with how we were
handling this for IPv6.  In addition I have updated the internal flags for
these tunnels so that we use a ZERO_CSUM_TX flag for IPv4 which should
match up will with the ZERO_CSUM6_TX flag which was already in use for
IPv6.

For most network devices this should be a net gain in terms of performance
as having the outer header checksum present allows for devices to report
CHECKSUM_UNNECESSARY which we can then convert to CHECKSUM_COMPLETE in order
to determine if the inner header checksum is valid.

Below is some data I collected with ixgbe with an X540 that demonstrates
this.  I located two PFs connected back to back in two different name
spaces and then setup a pair of tunnels on each, one with checksum enabled
and one without.

Recv   Send    Send                          Utilization
Socket Socket  Message  Elapsed              Send
Size   Size    Size     Time     Throughput  local
bytes  bytes   bytes    secs.    10^6bits/s  % S

noudpcsum:
 87380  16384  16384    30.00      8898.67   12.80
udpcsum:
 87380  16384  16384    30.00      9088.47   5.69

The one spot where this may cause a performance regression is if the
environment contains devices that can parse the inner headers and a device
supports NETIF_F_GSO_UDP_TUNNEL but not NETIF_F_GSO_UDP_TUNNEL_CSUM.  In
the case of such a device we have to fall back to using GSO to segment the
tunnel instead of TSO and as a result we may take a performance hit as seen
below with i40e.

Recv   Send    Send                          Utilization
Socket Socket  Message  Elapsed              Send
Size   Size    Size     Time     Throughput  local
bytes  bytes   bytes    secs.    10^6bits/s  % S

noudpcsum:
 87380  16384  16384    30.00      9085.21   3.32
udpcsum:
 87380  16384  16384    30.00      9089.23   5.54

In addition it will be necessary to update iproute2 so that we don't
provide the checksum attribute unless specified.  This way on older kernels
which don't have local checksum offload we will default to disabling the
outer checksum, and on newer kernels that have LCO we can default to
enabling it.

I also haven't investigated the effect this will have on OVS.  However I
suspect the impact should be minimal as the worst case scenario should be
that Tx checksumming will become enabled by default which should be
consistent with the existing behavior for IPv6.

---

Alexander Duyck (2):
      GENEVE: Support outer IPv4 Tx checksums by default
      VXLAN: Support outer IPv4 Tx checksums by default


 drivers/net/geneve.c |   16 ++++++++--------
 drivers/net/vxlan.c  |   19 +++++++++----------
 include/net/vxlan.h  |    2 +-
 3 files changed, 18 insertions(+), 19 deletions(-)

             reply	other threads:[~2016-02-19 19:26 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-19 19:26 Alexander Duyck [this message]
2016-02-19 19:26 ` [net-next PATCH 1/2] GENEVE: Support outer IPv4 Tx checksums by default Alexander Duyck
2016-02-19 20:28   ` Tom Herbert
2016-02-19 19:26 ` [net-next PATCH 2/2] VXLAN: " Alexander Duyck
2016-02-19 20:27   ` Tom Herbert
2016-02-19 21:36     ` Jesse Gross
2016-02-19 21:53 ` [net-next PATCH 0/2] GENEVE/VXLAN: Enable outer Tx checksum " Jesse Gross
2016-02-19 23:10   ` Alex Duyck
2016-02-20  0:08     ` Jesse Gross
2016-02-20  0:14       ` Tom Herbert
2016-02-20  2:18         ` Jesse Gross
2016-02-20 19:51           ` Tom Herbert
2016-02-23  3:31             ` Jesse Gross
2016-02-23 15:18               ` Edward Cree
2016-02-23 16:47                 ` Tom Herbert
2016-02-23 17:20                   ` Rick Jones
2016-02-23 17:38                     ` Edward Cree
2016-02-23 18:08                       ` David Miller
2016-02-23 20:20                         ` Edward Cree
2016-02-23 23:11                           ` David Miller
2016-02-24  0:53                           ` Tom Herbert
2016-02-24 17:30                             ` Edward Cree
2016-02-23 18:11                       ` Tom Herbert
2016-02-23 17:31                   ` Jesse Gross
2016-02-23 17:42                     ` Tom Herbert
2016-02-23 18:18                       ` Alexander Duyck
2016-02-23 18:26                       ` David Miller
2016-02-23 18:32                         ` Tom Herbert
2016-02-23 18:24                     ` David Miller
2016-02-24  9:58                       ` David Laight
2016-02-24 15:41                         ` David Miller
2016-02-25 20:14                   ` David Miller
2016-03-11 19:20             ` Generic TSO (was Re: [net-next PATCH 0/2] GENEVE/VXLAN: Enable outer Tx checksum by default) Edward Cree
2016-03-11 19:57               ` Tom Herbert
2016-03-11 19:59                 ` Edward Cree
2016-03-11 20:16                   ` Tom Herbert
2016-03-11 20:24                     ` Edward Cree
2016-03-11 21:09                       ` Alexander Duyck
2016-03-11 21:29                         ` Edward Cree
2016-03-11 22:31                           ` Alexander Duyck
2016-03-11 22:55                             ` Tom Herbert
2016-03-12  5:40                               ` Alexander Duyck
2016-03-14 10:26                                 ` Generic TSO Edward Cree
2016-03-14 10:32                                   ` Edward Cree
2016-03-14 15:59                                     ` Alexander Duyck
2016-03-11 20:22               ` David Miller
2016-02-22  3:06 ` [net-next PATCH 0/2] GENEVE/VXLAN: Enable outer Tx checksum by default 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=20160219191806.15687.37621.stgit@localhost.localdomain \
    --to=aduyck@mirantis.com \
    --cc=alexander.duyck@gmail.com \
    --cc=davem@davemloft.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).