2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-19 14:37:21 +00:00
Commit Graph

8 Commits

Author SHA1 Message Date
Pravin B Shelar
73daf51a45 datapath: compat: backport LCO optimization.
This basically backport commit:

    commit 179bc67f69b6cb53ad68cfdec5a917c2a2248355
    Author: Edward Cree <ecree@solarflare.com>
    Date:   Thu Feb 11 20:48:04 2016 +0000

    net: local checksum offload for encapsulation

    The arithmetic properties of the ones-complement checksum mean that a
    correctly checksummed inner packet, including its checksum, has a ones
    complement sum depending only on whatever value was used to initialise
    the checksum field before checksumming (in the case of TCP and UDP,
    this is the ones complement sum of the pseudo header, complemented).
    Consequently, if we are going to offload the inner checksum with
    CHECKSUM_PARTIAL, we can compute the outer checksum based only on the
    packed data not covered by the inner checksum, and the initial value of
    the inner checksum field.

    Signed-off-by: Edward Cree <ecree@solarflare.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

Signed-off-by: Pravin B Shelar <pshelar@ovn.org>
Acked-by: Jesse Gross <jesse@kernel.org>
2016-08-18 16:34:11 -07:00
Pravin B Shelar
aad4ff6a40 datapath: compat: Use checksum offload for outer header.
Following patch simplifies UDP-checksum routine by unconditionally
using checksum offload for non GSO packets. We might get some
performance improvement due to code simplification.

Signed-off-by: Pravin B Shelar <pshelar@ovn.org>
Acked-by: Jesse Gross <jesse@kernel.org>
2016-08-03 15:18:58 -07:00
Pravin B Shelar
06478ca06a datapath: compat: Use udp-checksum function for compat case.
udp_set_csum() has bug fix that is not relevant for upstream
(commit c77d947191).
So OVS need to use compat function. This function is also
used from UDP xmit path so we have to check USE_UPSTREAM_TUNNEL.
Following patch couple this function to USE_UPSTREAM_TUNNEL symbol
rather than kernel version.
This is not bug, This patch help in code readability.

Signed-off-by: Pravin B Shelar <pshelar@ovn.org>
Acked-by: Jesse Gross <jesse@kernel.org>
2016-08-03 15:18:58 -07:00
Pravin B Shelar
c77d947191 datapath: compat: fix udp checksum calculation
In upstream linux kernel networking stack udp_set_csum() is called
with only udp header applied but in case of compat layer it can
be called with IP header. So following patch take the offset into
account.

Signed-off-by: Pravin B Shelar <pshelar@ovn.org>
Acked-by: Jesse Gross <jesse@kernel.org>
2016-07-26 16:55:27 -07:00
Pravin B Shelar
b7ebebcdd7 datapath: compat: Update udp_sock_create
Update udp-socket-create to create ipv6 socket currectly.

Partially backports commit fd384412e199b ("udp_tunnel: Seperate ipv6
functions into its own file.")

Signed-off-by: Pravin B Shelar <pshelar@ovn.org>
Acked-by: Jesse Gross <jesse@kernel.org>
2016-07-08 19:27:49 -07:00
Alex Wang
bedf02f45b datapath: Prevent linker error of unknown symbol.
With the latest change of separating vports into their own modules,
it is necessary to export all public functions in linux/compat/
directory.  Also, we should prefix functions which replace the
upstream ones with 'rpl_' and others with 'ovs_'.  This will prevent
the linker error when vport modules use those functions in the future.
e.g., the to be merged vport-stt module will use the flex_array_*
functions which are not currently exported.

Co-authored-by: Tuan Nguyen <tuan.nguyen@veriksystems.com>
Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
2015-04-26 09:56:58 -07:00
Joe Stringer
13dd4a9738 compat: Fix RHEL7 build.
Tested against 3.10.0-229.el7.x86_64.

Signed-off-by: Joe Stringer <joestringer@nicira.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
2015-03-25 17:07:01 -07:00
Jesse Gross
beabb77598 datapath: Account for "udp: Generic functions to set checksum"
Upstream commit:
    udp: Generic functions to set checksum

    Added udp_set_csum and udp6_set_csum functions to set UDP checksums
    in packets. These are for simple UDP packets such as those that might
    be created in UDP tunnels.

    Signed-off-by: Tom Herbert <therbert@google.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

Upstream: af5fcba7 ("udp: Generic functions to set checksum")
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Thomas Graf <tgraf@noironetworks.com>
2015-02-20 11:00:31 -08:00