Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: GTP-U tunnel support #1560

Merged
merged 14 commits into from
Nov 4, 2019
Merged

Conversation

mtirpak
Copy link
Contributor

@mtirpak mtirpak commented Nov 1, 2019

Issue #1546

This pull request adds GTP-U tunnel support to the interface plugin, the related part of the proto file change is as follows. The implementation is based on the VxLan and GRE tunnels.

message GtpuLink {
    enum NextNode {
        // The default next node is l2-input
        DEFAULT = 0;
        // l2-input
        L2 = 1;
        // ip4-input
        IP4 = 2;
        // ip6-input
        IP6 = 3;
    };
    // Source VTEP address
    string src_addr = 1;
    // Destination VTEP address
    string dst_addr = 2;
    // Name of multicast interface
    string multicast = 3;
    // Tunnel endpoint identifier
    uint32 teid = 4;
    // VRF id for the encapsulated packets
    uint32 encap_vrf_id = 5;
    // Next VPP node after decapsulation
    NextNode decap_next = 6;
}

There is a VPP bug in the dump gtpu interface api, which breaks the functionality currently. With VPP 20.01, the minimal version to use this feature is ligato/vpp-base:20.01-rc0.496-g00b2d74d1. (https://gerrit.fd.io/r/c/vpp/+/22904)
The latest VPP 19.08 docker image already includes the fix. (https://gerrit.fd.io/r/c/vpp/+/23054)

Initial implementation of GTP-U tunnel interface configuration added.
Currently VPP 20.01-324 and 20.01-379 are supported only.
- GTPU tunnel src/dst addresses are validated before writing into
the kvs

- if-else in dump interface call is restructured.
The encapsulated (outer) VRF id can be explicitly set to a different
value than the interface VRF id. This allows the tunneled traffic
to be routed by a separate FIB table.
This is necessary because the VPP gtpu plugin implements a check
to verify whether the ingress interface vrf assignment matches
the encap vrf id of the tunnel. If not, the packet is dropped.
Without a different VRF value, it would not be possible to implement
an overlay network with separate routing tables.

Dependencies for the GTPU VRF id and multicast interface are added.

The VRF id is inherited from the unnumbered interface only if
the value is not explicitly set to non-0. This allows the tunnel
interface to re-use the IP address of another interface from a different
VRF table.
IP address conversion fixed: an IPv4 address was successfully
parsed as IPv6 by mistake.
These tests depend on the VPP bugfix bd0a00a45637c1dde533ef6c3798418c2ab15009
This change could affect other interfaces as well, better to revert,
even if VPP supports this case.

The scenario can be made work with configuring a loopback interface
with the desired VRF id and using that interface as the tunnel
unnumbered int.
Disable the dump gtpu interface API call in the gtpu integration
test with some of the VPP versions that do not include the fix yet.
- updated imports to modules
- fixed remaining conflicts
- regenerated proto files
@codecov
Copy link

codecov bot commented Nov 1, 2019

Codecov Report

Merging #1560 into dev will increase coverage by 2.68%.
The diff coverage is 73.41%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev    #1560      +/-   ##
==========================================
+ Coverage   53.06%   55.74%   +2.68%     
==========================================
  Files         640      352     -288     
  Lines       77563    30280   -47283     
==========================================
- Hits        41156    16880   -24276     
+ Misses      33913    12075   -21838     
+ Partials     2494     1325    -1169
Flag Coverage Δ
#e2e ?
#unittests 55.74% <73.41%> (+0.27%) ⬆️

@ondrej-fabry ondrej-fabry added this to the v3.0.0 milestone Nov 4, 2019
@ondrej-fabry ondrej-fabry merged commit 6ebd4de into ligato:dev Nov 4, 2019
@mejedi mejedi deleted the gtpu-tunnel-support-dev branch January 22, 2020 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants