28 Mar, 2016

1 commit

  • The openvswitch code has gained support for calling into the
    nf-nat-ipv4/ipv6 modules, however those can be loadable modules
    in a configuration in which openvswitch is built-in, leading
    to link errors:

    net/built-in.o: In function `__ovs_ct_lookup':
    :(.text+0x2cc2c8): undefined reference to `nf_nat_icmp_reply_translation'
    :(.text+0x2cc66c): undefined reference to `nf_nat_icmpv6_reply_translation'

    The dependency on (!NF_NAT || NF_NAT) prevents similar issues,
    but NF_NAT is set to 'y' if any of the symbols selecting
    it are built-in, but the link error happens when any of them
    are modular.

    A second issue is that even if CONFIG_NF_NAT_IPV6 is built-in,
    CONFIG_NF_NAT_IPV4 might be completely disabled. This is unlikely
    to be useful in practice, but the driver currently only handles
    IPv6 being optional.

    This patch improves the Kconfig dependency so that openvswitch
    cannot be built-in if either of the two other symbols are set
    to 'm', and it replaces the incorrect #ifdef in ovs_ct_nat_execute()
    with two "if (IS_ENABLED())" checks that should catch all corner
    cases also make the code more readable.

    The same #ifdef exists ovs_ct_nat_to_attr(), where it does not
    cause a link error, but for consistency I'm changing it the same
    way.

    Signed-off-by: Arnd Bergmann
    Fixes: 05752523e565 ("openvswitch: Interface with NAT.")
    Acked-by: Joe Stringer
    Signed-off-by: Pablo Neira Ayuso

    Arnd Bergmann
     

15 Mar, 2016

1 commit

  • Extend OVS conntrack interface to cover NAT. New nested
    OVS_CT_ATTR_NAT attribute may be used to include NAT with a CT action.
    A bare OVS_CT_ATTR_NAT only mangles existing and expected connections.
    If OVS_NAT_ATTR_SRC or OVS_NAT_ATTR_DST is included within the nested
    attributes, new (non-committed/non-confirmed) connections are mangled
    according to the rest of the nested attributes.

    The corresponding OVS userspace patch series includes test cases (in
    tests/system-traffic.at) that also serve as example uses.

    This work extends on a branch by Thomas Graf at
    https://github.com/tgraf/ovs/tree/nat.

    Signed-off-by: Jarno Rajahalme
    Acked-by: Thomas Graf
    Acked-by: Joe Stringer
    Signed-off-by: Pablo Neira Ayuso

    Jarno Rajahalme
     

17 Feb, 2016

1 commit

  • In case of UDP traffic with datagram length
    below MTU this give about 2% performance increase
    when tunneling over ipv4 and about 60% when tunneling
    over ipv6

    Signed-off-by: Paolo Abeni
    Suggested-and-acked-by: Hannes Frederic Sowa
    Signed-off-by: David S. Miller

    Paolo Abeni
     

12 Sep, 2015

1 commit

  • When NF_CONNTRACK is built-in, NF_DEFRAG_IPV6 is a module, and
    OPENVSWITCH is built-in, the following build error would occur:

    net/built-in.o: In function `ovs_ct_execute':
    (.text+0x10f587): undefined reference to `nf_ct_frag6_gather'

    Fixes: 7f8a436eaa2c ("openvswitch: Add conntrack action")
    Reported-by: Jim Davis
    Signed-off-by: Joe Stringer
    Acked-by: Pravin B Shelar
    Signed-off-by: David S. Miller

    Joe Stringer
     

07 Sep, 2015

1 commit

  • There's no particular desire to have conntrack action support in Open
    vSwitch as an independently configurable bit, rather just to ensure
    there is not a hard dependency. This exposed option doesn't accurately
    reflect the conntrack dependency when enabled, so simplify this by
    removing the option. Compile the support if NF_CONNTRACK is enabled.

    Fixes: 7f8a436eaa2c ("openvswitch: Add conntrack action")
    Signed-off-by: Joe Stringer
    Acked-by: Pravin B Shelar
    Signed-off-by: David S. Miller

    Joe Stringer
     

28 Aug, 2015

2 commits

  • With help of tunnel metadata mode OVS can directly use
    Geneve devices to implement Geneve tunnels.
    This patch removes all of the OVS specific Geneve code
    and make OVS use a Geneve net_device. Basic geneve vport
    is still there to handle compatibility with current
    userspace application.

    Signed-off-by: Pravin B Shelar
    Reviewed-by: Jesse Gross
    Acked-by: Thomas Graf
    Signed-off-by: David S. Miller

    Pravin B Shelar
     
  • Expose the kernel connection tracker via OVS. Userspace components can
    make use of the CT action to populate the connection state (ct_state)
    field for a flow. This state can be subsequently matched.

    Exposed connection states are OVS_CS_F_*:
    - NEW (0x01) - Beginning of a new connection.
    - ESTABLISHED (0x02) - Part of an existing connection.
    - RELATED (0x04) - Related to an established connection.
    - INVALID (0x20) - Could not track the connection for this packet.
    - REPLY_DIR (0x40) - This packet is in the reply direction for the flow.
    - TRACKED (0x80) - This packet has been sent through conntrack.

    When the CT action is executed by itself, it will send the packet
    through the connection tracker and populate the ct_state field with one
    or more of the connection state flags above. The CT action will always
    set the TRACKED bit.

    When the COMMIT flag is passed to the conntrack action, this specifies
    that information about the connection should be stored. This allows
    subsequent packets for the same (or related) connections to be
    correlated with this connection. Sending subsequent packets for the
    connection through conntrack allows the connection tracker to consider
    the packets as ESTABLISHED, RELATED, and/or REPLY_DIR.

    The CT action may optionally take a zone to track the flow within. This
    allows connections with the same 5-tuple to be kept logically separate
    from connections in other zones. If the zone is specified, then the
    "ct_zone" match field will be subsequently populated with the zone id.

    IP fragments are handled by transparently assembling them as part of the
    CT action. The maximum received unit (MRU) size is tracked so that
    refragmentation can occur during output.

    IP frag handling contributed by Andy Zhou.

    Based on original design by Justin Pettit.

    Signed-off-by: Joe Stringer
    Signed-off-by: Justin Pettit
    Signed-off-by: Andy Zhou
    Acked-by: Thomas Graf
    Acked-by: Pravin B Shelar
    Signed-off-by: David S. Miller

    Joe Stringer
     

11 Aug, 2015

1 commit

  • Using GRE tunnel meta data collection feature, we can implement
    OVS GRE vport. This patch removes all of the OVS
    specific GRE code and make OVS use a ip_gre net_device.
    Minimal GRE vport is kept to handle compatibility with
    current userspace application.

    Signed-off-by: Pravin B Shelar
    Acked-by: Thomas Graf
    Signed-off-by: David S. Miller

    Pravin B Shelar
     

30 Jul, 2015

1 commit

  • This readds the config option CONFIG_OPENVSWITCH_VXLAN to avoid a
    hard dependency of OVS on VXLAN. It moves the VXLAN config compat
    code to vport-vxlan.c and allows compliation as a module.

    Fixes: 614732eaa12d ("openvswitch: Use regular VXLAN net_device device")
    Fixes: 2661371ace96 ("openvswitch: fix compilation when vxlan is a module")
    Cc: Pravin B Shelar
    Cc: Nicolas Dichtel
    Signed-off-by: Thomas Graf
    Acked-by: Pravin B Shelar
    Signed-off-by: David S. Miller

    Thomas Graf
     

27 Jul, 2015

1 commit

  • With CONFIG_VXLAN=m and CONFIG_OPENVSWITCH=y, there was the following
    compilation error:
    LD init/built-in.o
    net/built-in.o: In function `vxlan_tnl_create':
    .../net/openvswitch/vport-netdev.c:322: undefined reference to `vxlan_dev_create'
    make: *** [vmlinux] Error 1

    CC: Thomas Graf
    Fixes: 614732eaa12d ("openvswitch: Use regular VXLAN net_device device")
    Signed-off-by: Nicolas Dichtel
    Acked-by: Thomas Graf
    Signed-off-by: David S. Miller

    Nicolas Dichtel
     

22 Jul, 2015

1 commit

  • This gets rid of all OVS specific VXLAN code in the receive and
    transmit path by using a VXLAN net_device to represent the vport.
    Only a small shim layer remains which takes care of handling the
    VXLAN specific OVS Netlink configuration.

    Unexports vxlan_sock_add(), vxlan_sock_release(), vxlan_xmit_skb()
    since they are no longer needed.

    Signed-off-by: Thomas Graf
    Signed-off-by: Pravin B Shelar
    Signed-off-by: David S. Miller

    Thomas Graf
     

14 May, 2015

1 commit


09 Mar, 2015

1 commit

  • Fix the OPENVSWITCH Kconfig option and old Kconfigs by having
    OPENVSWITCH select both NET_MPLS_GSO and MPLSO.

    A Kbuild test robot reported that when NET_MPLS_GSO is selected by
    OPENVSWITCH the generated .config is broken because MPLS is not
    selected.

    Cc: Simon Horman
    Fixes: cec9166ca4e mpls: Refactor how the mpls module is built
    Reported-by: kbuild test robot
    Signed-off-by: "Eric W. Biederman"
    Reviewed-by: Simon Horman
    Signed-off-by: David S. Miller

    Eric W. Biederman
     

14 Nov, 2014

1 commit

  • Add dependency on INET to fix following build error. I have also
    fixed MPLS dependency.

    ERROR: "ip_route_output_flow" [net/openvswitch/openvswitch.ko]
    undefined!
    make[1]: *** [__modpost] Error 1

    Reported-by: Jim Davis
    Signed-off-by: Pravin B Shelar
    Signed-off-by: David S. Miller

    Pravin B Shelar
     

06 Nov, 2014

1 commit

  • Allow datapath to recognize and extract MPLS labels into flow keys
    and execute actions which push, pop, and set labels on packets.

    Based heavily on work by Leo Alterman, Ravi K, Isaku Yamahata and Joe Stringer.

    Cc: Ravi K
    Cc: Leo Alterman
    Cc: Isaku Yamahata
    Cc: Joe Stringer
    Signed-off-by: Simon Horman
    Signed-off-by: Jesse Gross
    Signed-off-by: Pravin B Shelar

    Simon Horman
     

29 Oct, 2014

1 commit

  • The internal and netdev vport remain part of openvswitch.ko. Encap
    vports including vxlan, gre, and geneve can be built as separate
    modules and are loaded on demand. Modules can be unloaded after use.
    Datapath ports keep a reference to the vport module during their
    lifetime.

    Allows to remove the error prone maintenance of the global list
    vport_ops_list.

    Signed-off-by: Thomas Graf
    Signed-off-by: David S. Miller

    Thomas Graf
     

06 Oct, 2014

1 commit

  • The Openvswitch implementation is completely agnostic to the options
    that are in use and can handle newly defined options without
    further work. It does this by simply matching on a byte array
    of options and allowing userspace to setup flows on this array.

    Signed-off-by: Jesse Gross
    Singed-off-by: Ansis Atteka
    Signed-off-by: Andy Zhou
    Acked-by: Thomas Graf
    Acked-by: Pravin B Shelar
    Signed-off-by: David S. Miller

    Jesse Gross
     

27 Aug, 2013

1 commit

  • This patch adds support for rewriting SCTP src,dst ports similar to the
    functionality already available for TCP/UDP.

    Rewriting SCTP ports is expensive due to double-recalculation of the
    SCTP checksums; this is performed to ensure that packets traversing OVS
    with invalid checksums will continue to the destination with any
    checksum corruption intact.

    Reviewed-by: Simon Horman
    Signed-off-by: Joe Stringer
    Signed-off-by: Ben Pfaff
    Signed-off-by: Jesse Gross

    Joe Stringer
     

20 Aug, 2013

1 commit


02 Jul, 2013

1 commit

  • Openvswitch uses function from NET_IPGRE_DEMUX module.
    Add Kconfig dependency to fix following compilation errors:
    http://marc.info/?l=linux-netdev&m=137244035226634

    CC: Jesse Gross
    Reported-by: Randy Dunlap
    Signed-off-by: Pravin Shelar
    Acked-by: Randy Dunlap
    Acked-by: Jesse Gross
    Signed-off-by: David S. Miller

    Pravin B Shelar
     

20 Jun, 2013

1 commit

  • Add gre vport implementation. Most of gre protocol processing
    is pushed to gre module. It make use of gre demultiplexer
    therefore it can co-exist with linux device based gre tunnels.

    Signed-off-by: Pravin B Shelar
    Acked-by: Jesse Gross
    Signed-off-by: David S. Miller

    Pravin B Shelar
     

04 Dec, 2011

1 commit

  • Open vSwitch is a multilayer Ethernet switch targeted at virtualized
    environments. In addition to supporting a variety of features
    expected in a traditional hardware switch, it enables fine-grained
    programmatic extension and flow-based control of the network.
    This control is useful in a wide variety of applications but is
    particularly important in multi-server virtualization deployments,
    which are often characterized by highly dynamic endpoints and the need
    to maintain logical abstractions for multiple tenants.

    The Open vSwitch datapath provides an in-kernel fast path for packet
    forwarding. It is complemented by a userspace daemon, ovs-vswitchd,
    which is able to accept configuration from a variety of sources and
    translate it into packet processing rules.

    See http://openvswitch.org for more information and userspace
    utilities.

    Signed-off-by: Jesse Gross

    Jesse Gross