Skip to content

Commit 571912c

Browse files
Martin Varghesedavem330
authored andcommitted
net: UDP tunnel encapsulation module for tunnelling different protocols like MPLS, IP, NSH etc.
The Bareudp tunnel module provides a generic L3 encapsulation tunnelling module for tunnelling different protocols like MPLS, IP,NSH etc inside a UDP tunnel. Signed-off-by: Martin Varghese <[email protected]> Acked-by: Willem de Bruijn <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 48851e9 commit 571912c

File tree

11 files changed

+952
-0
lines changed

11 files changed

+952
-0
lines changed

Documentation/networking/bareudp.rst

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
.. SPDX-License-Identifier: GPL-2.0
2+
3+
========================================
4+
Bare UDP Tunnelling Module Documentation
5+
========================================
6+
7+
There are various L3 encapsulation standards using UDP being discussed to
8+
leverage the UDP based load balancing capability of different networks.
9+
MPLSoUDP (__ https://tools.ietf.org/html/rfc7510) is one among them.
10+
11+
The Bareudp tunnel module provides a generic L3 encapsulation tunnelling
12+
support for tunnelling different L3 protocols like MPLS, IP, NSH etc. inside
13+
a UDP tunnel.
14+
15+
Usage
16+
------
17+
18+
1) Device creation & deletion
19+
20+
a) ip link add dev bareudp0 type bareudp dstport 6635 ethertype 0x8847.
21+
22+
This creates a bareudp tunnel device which tunnels L3 traffic with ethertype
23+
0x8847 (MPLS traffic). The destination port of the UDP header will be set to
24+
6635.The device will listen on UDP port 6635 to receive traffic.
25+
26+
b) ip link delete bareudp0
27+
28+
2) Device Usage
29+
30+
The bareudp device could be used along with OVS or flower filter in TC.
31+
The OVS or TC flower layer must set the tunnel information in SKB dst field before
32+
sending packet buffer to the bareudp device for transmission. On reception the
33+
bareudp device extracts and stores the tunnel information in SKB dst field before
34+
passing the packet buffer to the network stack.

Documentation/networking/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Contents:
88

99
netdev-FAQ
1010
af_xdp
11+
bareudp
1112
batman-adv
1213
can
1314
can_ucan_protocol

drivers/net/Kconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,19 @@ config GENEVE
258258
To compile this driver as a module, choose M here: the module
259259
will be called geneve.
260260

261+
config BAREUDP
262+
tristate "Bare UDP Encapsulation"
263+
depends on INET
264+
depends on IPV6 || !IPV6
265+
select NET_UDP_TUNNEL
266+
select GRO_CELLS
267+
help
268+
This adds a bare UDP tunnel module for tunnelling different
269+
kinds of traffic like MPLS, IP, etc. inside a UDP tunnel.
270+
271+
To compile this driver as a module, choose M here: the module
272+
will be called bareudp.
273+
261274
config GTP
262275
tristate "GPRS Tunneling Protocol datapath (GTP-U)"
263276
depends on INET

drivers/net/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ obj-$(CONFIG_VETH) += veth.o
2929
obj-$(CONFIG_VIRTIO_NET) += virtio_net.o
3030
obj-$(CONFIG_VXLAN) += vxlan.o
3131
obj-$(CONFIG_GENEVE) += geneve.o
32+
obj-$(CONFIG_BAREUDP) += bareudp.o
3233
obj-$(CONFIG_GTP) += gtp.o
3334
obj-$(CONFIG_NLMON) += nlmon.o
3435
obj-$(CONFIG_NET_VRF) += vrf.o

0 commit comments

Comments
 (0)