Skip to content

Bare UDP L3 Encapsulation Module

Martin Varghese netdev 8 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v8 Latest2 patches 2 repliesIn review
  2. v72 patches 8 repliesSuperseded
  3. v62 patches 2 repliesSuperseded
Earlier versions · 5
VersionPostedPatchesRepliesStatus
v52 patches6 repliesSuperseded
v42 patches5 repliesSuperseded
v32 patches8 repliesSuperseded
v22 patches1 replySuperseded
v12 patches33 repliesSuperseded

Patches in v8 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2net: UDP tunnel encapsulation module for tunnelling different protocols like MPLS,IP,NSH etc.Documentation/networking/bareudp.rst Documentation/networking/index.rst drivers/net/Kconfig +8 more+953 -01 reply
2/2net: Special handling for IP & MPLS.Documentation/networking/bareudp.rst drivers/net/bareudp.c include/net/bareudp.h +1 more+85 -40 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchWillem de Bruijn
1/2A-b
2/2A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v8 thread

Cover letter [PATCH net-next v8 0/2] Bare UDP L3 Encapsulation Module

From: Martin Varghese <[email protected]>

There are various L3 encapsulation standards using UDP being discussed to leverage the UDP based load balancing capability of different networks. MPLSoUDP (__ https://tools.ietf.org/html/rfc7510) is one among them.

The Bareudp tunnel module provides a generic L3 encapsulation tunnelling support for tunnelling different L3 protocols like MPLS, IP, NSH etc. inside a UDP tunnel.

Special Handling
----------------
The bareudp device supports special handling for MPLS & IP as they can have multiple ethertypes.
MPLS procotcol can have ethertypes ETH_P_MPLS_UC (unicast) & ETH_P_MPLS_MC (multicast). IP protocol can have ethertypes ETH_P_IP (v4) & ETH_P_IPV6 (v6).
This special handling can be enabled only for ethertypes ETH_P_IP & ETH_P_MPLS_UC with a flag called multiproto mode.

Usage
------

1) Device creation & deletion

a) ip link add dev bareudp0 type bareudp dstport 6635 ethertype 0x8847.

This creates a bareudp tunnel device which tunnels L3 traffic with ethertype 0x8847 (MPLS traffic). The destination port of the UDP header will be set to 6635.The device will listen on UDP port 6635 to receive traffic.

b) ip link delete bareudp0

2) Device creation with multiple proto mode enabled

There are two ways to create a bareudp device for MPLS & IP with multiproto mode enabled.

a) ip link add dev bareudp0 type bareudp dstport 6635 ethertype 0x8847 multiproto

b) ip link add dev bareudp0 type bareudp dstport 6635 ethertype mpls

3) Device Usage

The bareudp device could be used along with OVS or flower filter in TC. The OVS or TC flower layer must set the tunnel information in SKB dst field before sending packet buffer to the bareudp device for transmission. On reception the bareudp device extracts and stores the tunnel information in SKB dst field before passing the packet buffer to the network stack.

Why not FOU ?
------------
FOU by design does l4 encapsulation.It maps udp port to ipproto (IP protocol number for l4 protocol). Bareudp acheives a generic l3 encapsulation.It maps udp port to l3 ethertype.

Martin Varghese (2):
net: UDP tunnel encapsulation module for tunnelling different
protocols like MPLS,IP,NSH etc.
net: Special handling for IP & MPLS.

 Documentation/networking/bareudp.rst |  53 +++
 Documentation/networking/index.rst   |   1 +
 drivers/net/Kconfig                  |  13 +
 drivers/net/Makefile                 |   1 +
 drivers/net/bareudp.c                | 804 +++++++++++++++++++++++++++++++++++
 include/net/bareudp.h                |  20 +
 include/net/ipv6.h                   |   6 +
 include/net/route.h                  |   6 +
 include/uapi/linux/if_link.h         |  12 +
 net/ipv4/route.c                     |  48 +++
 net/ipv6/ip6_output.c                |  70 +++
 11 files changed, 1034 insertions(+)
 create mode 100644 Documentation/networking/bareudp.rst
 create mode 100644 drivers/net/bareudp.c
 create mode 100644 include/net/bareudp.h
Signature · 1 line
1.8.3.1