On Thu, May 26, 2016 at 4:19 PM, Alexander Duyck <adu...@mirantis.com> wrote:
> Change the checksum default for UDP based tunnels from true to false and
> allow for csum=false to be used to clear the checksum value on such
> tunnels.
>
> This enables us to use GRO and Rx checksum offloads on incoming frames even
> when the NIC itself is unable to recognize the tunnel based on the UDP port
> number.  For example GENEVE was only recently introduced.  As a result most
> NICs in Linux still don't have support for it.  However, due to the fact
> that we can convert an outer checksum to CHECKSUM_COMPLETE we can get the
> advantage of checksum offload and GRO just based on the outer UDP checksum
> being validated.  As a result we can see throughput significantly increase
> for most cases.
>
> The one case where this might cause performance regression is an
> environment in which a device only supports offloading of UDP tunnels
> without checksums.  This is addressed in kernels 4.7 and newer with the
> introduction of GSO_PARTIAL which will allow most NICs that support
> UDP_TUNNEL segmentation to also support UDP_TUNNEL_CSUM segmentation.  As
> such there should only be a few cases where this can cause a performance
> regression while in the vast majority of cases this will allow for an
> improvement in performance for all NICs that can support UDP checksum
> offload.
>
> Signed-off-by: Alexander Duyck <adu...@mirantis.com>

My original plan was to do this at the controller level rather than in
OVS itself. I'm still somewhat uncomfortable changing behavior out
from underneath people, especially since we know that in some cases
there will be performance regressions. Within the context of the OVS
project, that would mean changing it in OVN.

I think there is one other thing that we need before this change,
which is backporting the following bug fix to the out of tree OVS
kernel module. Without it, tunnel GRO performs horribly when sending
traffic to VMs. Pravin is in the process of doing this as part of a
larger patch set.

commit a09a4c8dd1ec7f830e1fb9e59eb72bddc965d168
Author: Jesse Gross <je...@kernel.org>
Date:   Sat Mar 19 09:32:02 2016 -0700

    tunnels: Remove encapsulation offloads on decap.

    If a packet is either locally encapsulated or processed through GRO
    it is marked with the offloads that it requires. However, when it is
    decapsulated these tunnel offload indications are not removed. This
    means that if we receive an encapsulated TCP packet, aggregate it with
    GRO, decapsulate, and retransmit the resulting frame on a NIC that does
    not support encapsulation, we won't be able to take advantage of hardware
    offloads even though it is just a simple TCP packet at this point.

    This fixes the problem by stripping off encapsulation offload indications
    when packets are decapsulated.

    The performance impacts of this bug are significant. In a test where a
    Geneve encapsulated TCP stream is sent to a hypervisor, GRO'ed,
decapsulated,
    and bridged to a VM performance is improved by 60% (5Gbps->8Gbps) as a
    result of avoiding unnecessary segmentation at the VM tap interface.

    Reported-by: Ramu Ramamurthy <srama...@linux.vnet.ibm.com>
    Fixes: 68c33163 ("v4 GRE: Add TCP segmentation offload for GRE")
    Signed-off-by: Jesse Gross <je...@kernel.org>
    Signed-off-by: David S. Miller <da...@davemloft.net>
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to