netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net-next PATCH v2 0/9] Fix Tunnel features and enable GSO partial for several drivers
@ 2016-04-29 22:43 Alexander Duyck
  2016-04-29 22:43 ` [net-next PATCH v2 1/9] net: Disable segmentation if checksumming is not supported Alexander Duyck
                   ` (8 more replies)
  0 siblings, 9 replies; 27+ messages in thread
From: Alexander Duyck @ 2016-04-29 22:43 UTC (permalink / raw)
  To: talal, netdev, michael.chan, davem, galp, ogerlitz, eranbe

This patch series is meant to allow us to get the best performance possible
for Mellanox ConnectX-3/4 and Broadcom NetXtreme-C/E adapters in terms of
VXLAN and GRE tunnels.

The first few patches address issues I found when just trying to collect
performance numbers.  Specifically I was unable to get rates of any more
than 1 or 2 Mb/s if I was using a tunnel that ran over IPv6.  In addition I
found a few other items related to GSO_PARTIAL and the TSO_MANGLEID that
needed to be addressed.

The next 4 patches go through and enable GSO_PARTIAL for VXLAN tunnels that
have an outer checksum enabled, and then enable IPv6 support where I can.
One outstanding issue is that I wasn't able to get offloads working with
outer IPv6 headers on mlx4.  However that wasn't a feature that was enabled
before so it isn't technically a regression, however I believe Engineers
from Mellanox said they would look into it since they thought it should be
supported.

The last patch enables GSO_PARTIAL for VXLAN and GRE tunnels on the bnxt
driver.  One piece of feedback I received on the patch was that the
hardware has globally set IPv6 UDP tunnels to always have the checksum
field computed.  I plan to work with Broadcom to get that addressed so that
we only populate the checksum field if it was requested by the network
stack.

v2: Rebased patches off of latest changes to the mlx4/mlx5 drivers.
    Added bnxt driver patch as I received feedback on the RFC.

    There are outstanding issues that need to be addressed, however they
    were present before these patches so it isn't as if they introduce a
    regression.  In addition gains can be easily seen so there should be no
    issue with applying the driver patches while the IPv6 mlx4 and bnxt
    issues are being researched.

---

Alexander Duyck (9):
      net: Disable segmentation if checksumming is not supported
      gso: Only allow GSO_PARTIAL if we can checksum the inner protocol
      net: Fix netdev_fix_features so that TSO_MANGLEID is only available with TSO
      vxlan: Add checksum check to the features check function
      mlx4: Add support for UDP tunnel segmentation with outer checksum offload
      mlx4: Add support for inner IPv6 checksum offloads and TSO
      mlx5e: Add support for UDP tunnel segmentation with outer checksum offload
      mlx5e: Fix IPv6 tunnel checksum offload
      bnxt: Add support for segmentation of tunnels with outer checksums


 drivers/net/ethernet/broadcom/bnxt/bnxt.c         |    9 ++++-
 drivers/net/ethernet/mellanox/mlx4/en_netdev.c    |   38 +++++++++++++++++----
 drivers/net/ethernet/mellanox/mlx4/en_tx.c        |   15 +++++++-
 drivers/net/ethernet/mellanox/mlx5/core/en_main.c |   10 ++++--
 include/linux/if_ether.h                          |    5 +++
 include/net/vxlan.h                               |    4 ++
 net/core/dev.c                                    |    6 +++
 net/core/skbuff.c                                 |    6 ++-
 8 files changed, 74 insertions(+), 19 deletions(-)

^ permalink raw reply	[flat|nested] 27+ messages in thread
* Re: [net-next PATCH v2 1/9] net: Disable segmentation if checksumming is not supported
@ 2016-05-02  7:28 Or Gerlitz
  0 siblings, 0 replies; 27+ messages in thread
From: Or Gerlitz @ 2016-05-02  7:28 UTC (permalink / raw)
  To: Alexander Duyck
  Cc: Alexander Duyck, talal, Linux Netdev List, Michael Chan,
	David Miller, Or Gerlitz, Eran Ben Elisha, Tariq Toukan

On Mon, May 2, 2016 at 5:16 AM, Alexander Duyck
<alexander.duyck@gmail.com> wrote:
> On Sun, May 1, 2016 at 1:30 PM, Or Gerlitz <gerlitz.or@gmail.com> wrote:
>> On Sat, Apr 30, 2016 at 1:43 AM, Alexander Duyck <aduyck@mirantis.com> wrote:
>>> In the case of the mlx4 and mlx5 driver they do not support IPv6 checksum
>>> offload for tunnels.
>>
>> Alex,
>>
>> To clarify, when you say "not support IPv6 checksum for tunnels", you
>> refer to the offloading of the outer or inner checksum?
>
> In the case of mlx4 it was an issue with both inner and outer due to
> IPv6 checksum.  The issue was that the feature was not exposed and yet
> the stack was attempting to make use of it in various ways.  The fixes
> that resolved the issues are in patches 1 and 4.  If we wanted to we
> could move those to net, but then it would be difficult to test the
> existing patches on the mlx4 until the net tree containing those
> patches was merged back in.
>
>> Still (me and I think also Tariq from our driver team) catching up on
>> the series, the primitives and conventions you are introducing using
>> and how this applies on mlx5. I saw that Saeed acked the the mlx5e
>> patches (7 and 8).
>
> The concept for all this is pretty simple.  What I am doing is
> restricting TSO so that we have a fixed size that is used for all
> outgoing frames.

excellent... how exactly this is done? I wasn't sure if this is
existing facility in the kernel and which or somehow introduced now
(where)? would appreciate if you can drop a note on that.

> Then we precompute the outer headers and use those
> values when performing GSO.  By doing this we can populate the UDP
> checksum field instead of forcing it to 0 which allows us to perform
> TSO for tunnels with outer checksums.

now.. understood.

>> Specifically, the mlx4 patches are practically fixes so if they don't
>> land in 4.7 via net-next we can get them there through net, lets give
>> us the few more days needed to catch up from our side.

> Actually the mlx4 specific portion of these patches are not really
> fixes, they are enabling features.  Specifically IPv6 checksum, TSOv6,
> and TSO for VXLAN tunnels with outer checksums.  It is patches 1 and 4
> that contain the fix and it likely applies to more than just the mlx4
> driver as I believe there is a qlogic driver with a similar feature
> flag layout.  If we want we could recommend those patches for stable

All makes sense, I will be able to ack the mlx4 patches tomorrow or
the latest Wed so we are just fine for 4.7 - I don't see urgency to
put them on 4.6

Or.

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2016-05-05 22:00 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-29 22:43 [net-next PATCH v2 0/9] Fix Tunnel features and enable GSO partial for several drivers Alexander Duyck
2016-04-29 22:43 ` [net-next PATCH v2 1/9] net: Disable segmentation if checksumming is not supported Alexander Duyck
2016-05-01 20:30   ` Or Gerlitz
2016-05-02  2:16     ` Alexander Duyck
2016-04-29 22:43 ` [net-next PATCH v2 2/9] gso: Only allow GSO_PARTIAL if we can checksum the inner protocol Alexander Duyck
2016-04-29 22:43 ` [net-next PATCH v2 3/9] net: Fix netdev_fix_features so that TSO_MANGLEID is only available with TSO Alexander Duyck
2016-04-29 22:43 ` [net-next PATCH v2 4/9] vxlan: Add checksum check to the features check function Alexander Duyck
2016-04-29 22:43 ` [net-next PATCH v2 5/9] mlx4: Add support for UDP tunnel segmentation with outer checksum offload Alexander Duyck
2016-05-01 20:28   ` Saeed Mahameed
2016-05-01 20:35   ` Or Gerlitz
2016-05-02  2:25     ` Alexander Duyck
2016-05-02  7:19       ` Or Gerlitz
2016-05-02 15:41         ` Alexander Duyck
2016-05-03 12:41           ` Or Gerlitz
2016-05-03 15:29             ` Alexander Duyck
2016-05-04 15:50               ` Or Gerlitz
2016-05-04 16:06                 ` Alex Duyck
2016-05-05 21:39                   ` Or Gerlitz
2016-05-05 22:00                     ` Alexander Duyck
2016-04-29 22:43 ` [net-next PATCH v2 6/9] mlx4: Add support for inner IPv6 checksum offloads and TSO Alexander Duyck
2016-05-01 20:21   ` Saeed Mahameed
2016-04-29 22:43 ` [net-next PATCH v2 7/9] mlx5e: Add support for UDP tunnel segmentation with outer checksum offload Alexander Duyck
2016-05-01 20:08   ` Saeed Mahameed
2016-04-29 22:43 ` [net-next PATCH v2 8/9] mlx5e: Fix IPv6 tunnel " Alexander Duyck
2016-05-01 20:09   ` Saeed Mahameed
2016-04-29 22:43 ` [net-next PATCH v2 9/9] bnxt: Add support for segmentation of tunnels with outer checksums Alexander Duyck
2016-05-02  7:28 [net-next PATCH v2 1/9] net: Disable segmentation if checksumming is not supported Or Gerlitz

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).