18 Jun, 2016

4 commits

  • The fact is VXLAN with Generic Protocol Extensions cannot be supported by
    the same hardware parsers that support VXLAN. The protocol extensions
    allow for things like a Next Protocol field which in turn allows for things
    other than Ethernet to be passed over the tunnel. Most existing parsers
    will not know how to interpret this.

    To resolve this I am giving VXLAN-GPE its own UDP encapsulation offload
    type. This way hardware that does support GPE can simply add this type to
    the switch statement for VXLAN, and if they don't support it then this will
    fix any issues where headers might be interpreted incorrectly.

    Signed-off-by: Alexander Duyck
    Acked-by: Hannes Frederic Sowa
    Signed-off-by: David S. Miller

    Alexander Duyck
     
  • This patch merges the notifiers for VXLAN and GENEVE into a single UDP
    tunnel notifier. The idea is that we will want to only have to make one
    notifier call to receive the list of ports for VXLAN and GENEVE tunnels
    that need to be offloaded.

    In addition we add a new set of ndo functions named ndo_udp_tunnel_add and
    ndo_udp_tunnel_del that are meant to allow us to track the tunnel meta-data
    such as port and address family as tunnels are added and removed. The
    tunnel meta-data is now transported in a structure named udp_tunnel_info
    which for now carries the type, address family, and port number. In the
    future this could be updated so that we can include a tuple of values
    including things such as the destination IP address and other fields.

    I also ended up going with a naming scheme that consisted of using the
    prefix udp_tunnel on function names. I applied this to the notifier and
    ndo ops as well so that it hopefully points to the fact that these are
    primarily used in the udp_tunnel functions.

    Signed-off-by: Alexander Duyck
    Acked-by: Hannes Frederic Sowa
    Signed-off-by: David S. Miller

    Alexander Duyck
     
  • This patch merges the GENEVE and VXLAN code so that both functions pass
    through a shared code path. This way we can start the effort of using a
    single function on the network device drivers to handle both of these
    tunnel types.

    Signed-off-by: Alexander Duyck
    Acked-by: Hannes Frederic Sowa
    Signed-off-by: David S. Miller

    Alexander Duyck
     
  • This patch makes it so that we add udp_tunnel.h to vxlan.h and geneve.h
    header files. This is useful as I plan to move the generic handlers for
    the port offloads into the udp_tunnel header file and leave the vxlan and
    geneve headers to be a bit more protocol specific.

    I also went through and cleaned out a number of redundant includes that
    where in the .h and .c files for these drivers.

    Signed-off-by: Alexander Duyck
    Acked-by: Hannes Frederic Sowa
    Signed-off-by: David S. Miller

    Alexander Duyck
     

10 May, 2016

1 commit


07 May, 2016

1 commit


17 Apr, 2016

1 commit

  • This patch updates the IP tunnel core function iptunnel_handle_offloads so
    that we return an int and do not free the skb inside the function. This
    actually allows us to clean up several paths in several tunnels so that we
    can free the skb at one point in the path without having to have a
    secondary path if we are supporting tunnel offloads.

    In addition it should resolve some double-free issues I have found in the
    tunnels paths as I believe it is possible for us to end up triggering such
    an event in the case of fou or gue.

    Signed-off-by: Alexander Duyck
    Signed-off-by: David S. Miller

    Alexander Duyck
     

08 Apr, 2016

1 commit


12 Mar, 2016

1 commit

  • This patch extends udp_tunnel6_xmit_skb() to pass in the IPv6 flow label
    from call sites. Currently, there's no such option and it's always set to
    zero when writing ip6_flow_hdr(). Add a label member to ip_tunnel_key, so
    that flow-based tunnels via collect metadata frontends can make use of it.
    vxlan and geneve will be converted to add flow label support separately.

    Signed-off-by: Daniel Borkmann
    Signed-off-by: David S. Miller

    Daniel Borkmann
     

12 Feb, 2016

2 commits


26 Dec, 2015

1 commit


30 Aug, 2015

1 commit

  • By default (subject to the sysctl settings), IPv6 sockets listen also for
    IPv4 traffic. Vxlan is not prepared for that and expects IPv6 header in
    packets received through an IPv6 socket.

    In addition, it's currently not possible to have both IPv4 and IPv6 vxlan
    tunnel on the same port (unless bindv6only sysctl is enabled), as it's not
    possible to create and bind both IPv4 and IPv6 vxlan interfaces and there's
    no way to specify both IPv4 and IPv6 remote/group IP addresses.

    Set IPV6_V6ONLY on vxlan sockets to fix both of these issues. This is not
    done globally in udp_tunnel, as l2tp and tipc seems to work okay when
    receiving IPv4 packets on IPv6 socket and people may rely on this behavior.
    The other tunnels (geneve and fou) do not support IPv6.

    Signed-off-by: Jiri Benc
    Signed-off-by: David S. Miller

    Jiri Benc
     

28 Aug, 2015

1 commit


08 Apr, 2015

1 commit


25 Jan, 2015

1 commit

  • The UDP tunnel transmit functions udp_tunnel_xmit_skb and
    udp_tunnel6_xmit_skb include a socket argument. The socket being
    passed to the functions (from VXLAN) is a UDP created for receive
    side. The only thing that the socket is used for in the transmit
    functions is to get the setting for checksum (enabled or zero).
    This patch removes the argument and and adds a nocheck argument
    for checksum setting. This eliminates the unnecessary dependency
    on a UDP socket for UDP tunnel transmit.

    Signed-off-by: Tom Herbert
    Signed-off-by: David S. Miller

    Tom Herbert
     

11 Nov, 2014

1 commit

  • When doing GRO processing for UDP tunnels, we never add
    SKB_GSO_UDP_TUNNEL to gso_type - only the type of the inner protocol
    is added (such as SKB_GSO_TCPV4). The result is that if the packet is
    later resegmented we will do GSO but not treat it as a tunnel. This
    results in UDP fragmentation of the outer header instead of (i.e.) TCP
    segmentation of the inner header as was originally on the wire.

    Signed-off-by: Jesse Gross
    Signed-off-by: David S. Miller

    Jesse Gross
     

20 Sep, 2014

2 commits

  • Added a few more UDP tunnel APIs that can be shared by UDP based
    tunnel protocol implementation. The main ones are highlighted below.

    setup_udp_tunnel_sock() configures UDP listener socket for
    receiving UDP encapsulated packets.

    udp_tunnel_xmit_skb() and upd_tunnel6_xmit_skb() transmit skb
    using UDP encapsulation.

    udp_tunnel_sock_release() closes the UDP tunnel listener socket.

    Signed-off-by: Andy Zhou
    Signed-off-by: David S. Miller

    Andy Zhou
     
  • Add ip6_udp_tunnel.c for ipv6 UDP tunnel functions to avoid ifdefs
    in udp_tunnel.c

    Signed-off-by: Andy Zhou
    Signed-off-by: David S. Miller

    Andy Zhou
     

15 Jul, 2014

1 commit