LISP (Locator/ID Separation Protocol, RFC 9300) carries the packets sent
to an endpoint identifier (EID) over UDP, to a routing locator (RLOC) of
the site of that EID. An EID prefix and its RLOCs are a mapping, which
the LISP control plane (RFC 9301) provides.
This series adds the data plane of a LISP router (xTR): a tunnel device,
link kind "lisp", for IPv4 and IPv6 EIDs over IPv4 and IPv6 RLOCs.
A mapping is a route. The device takes the RLOC of a packet from its
tunnel metadata, which the lwtunnel encapsulation of the route
or of its nexthop provides. A remote site is a nexthop, shared by its
EID prefixes:
ip link add link wan name lisp101 type lisp id 101 local 192.0.2.1
ip link set lisp101 master site up
ip -6 nexthop add id 1 encap ip dst 198.51.100.1 dev lisp101
ip route add 10.2.0.0/24 vrf site nhid 1
ip -6 route add 2001:db8:2::/48 vrf site nhid 1
Design:
- The kernel has no map-cache and it does not resolve anything: no
upcall, no state that the packets of a host create. Its tables are the
routes and the nexthops, which a control plane in user space writes,
as it does for any other routing protocol. A packet without RLOC ends
up dropped.
- A remote site is a nexthop object, not a device: it has been designed
to scale.
- The common UDP tunnel code is used: its sockets, GRO cells, GSO, the
dst cache of the encapsulation, and a zero UDP checksum unless the
encapsulation asks for one.
Note: a LISP driver was posted to netdev back to 2014 and was not
merged. It had a device per remote RLOC and IPv4 RLOCs only, and a
map-cache that traffic fills was not accepted.
lwtunnels is an alternative.
This design shall allow routing daemons like FRRouting to support LISP.
Patches:
- patch 1 adds the driver, drivers/net/lisp.c, and its link attributes
- patch 2 describes them in the rt-link netlink spec
- patch 3 adds Documentation/networking/lisp.rst
- patch 4 adds a selftest, lisp.sh
- patch 5 adds a scale selftest, lisp_scale.sh
The series only adds: no existing code path is changed.
The lisp support of iproute2 is a separate series, for
iproute2-next. The tests are skipped without it:
https://lore.kernel.org/all/2026…@free.fr/
---
Some of the following are based on
https://netdev-ai.bots.linux.dev/sashiko/#/patchset/2026…%40free.fr
reviews.
Changes in v3:
- 1/5: a local IPv6 RLOC is refused when IPv6 is not enabled
- 2/5: checks of id and of local6, either id or collect-metadata
- 3/5: the VRF of the RLOCs is read when the device is set up
- 3/5: udp_l3mdev_accept with the RLOCs in the main table
- 3/5: the remote RLOC of the examples is not the local one, only the
IPv4 routes are compared with each other
- 3/5: rp_filter of a device without IPv4 address: 2 is the same check,
"all" is left as it is (Sashiko)
- 3/5: the checks of the sources do not see the instance ID of a device
that collects metadata (Sashiko)
- 3/5: the device that collects metadata sends with the id of the
encapsulation, the RLOC of a packet is not authenticated (Sashiko)
- 4/5: the change of a local RLOC is refused by the kernel, not by ip
- 4/5: flush the path MTU of x1 in the VRF of its RLOCs (Sashiko)
- 5/5: withdraw_test() checks IPv4 and IPv6 apart (Sashiko)
- Cc Willem de Bruijn
- Link to v2: https://lore.kernel.org/r/2026…@free.fr
Changes in v2, based on CI's checks:
- 1/5: fix to 80 columns
- 4/5, 5/5: fix shellcheck report
- 4/5, 5/5: wrap the lines to 80 columns
- Cc recent contributors of rt-link.yaml
Changes in v2, based on Sashiko's review:
- 1/5: link an instance device again only after an RCU grace period
since it left its chain (lisp_stop(), lisp_open())
- 1/5: fix build without CONFIG_IPV6
- 3/5: device with an instance ID that is down leaves its packets to
the device that collects metadata
- 3/5: rp_filter is the larger of the value of "all" and of the device,
ip6tables rpfilter or the nftables fib expression for IPv6
- 4/5: flush the path MTU of the host on each pass of mtu_test()
- 5/5: churn_test() improvements
- Link to v1: https://lore.kernel.org/r/2026…@free.fr
---
Vincent Jardin (5):
lisp: add LISP (Locator/ID Separation Protocol)
netlink: specs: rt-link: add the lisp link type
docs: net: document the LISP devices
selftests: net: add a test of the LISP devices
selftests: net: add a scale test for LISP
Documentation/netlink/specs/rt-link.yaml | 41 ++
Documentation/networking/index.rst | 1 +
Documentation/networking/lisp.rst | 182 +++++
MAINTAINERS | 8 +
drivers/net/Kconfig | 20 +
drivers/net/Makefile | 1 +
drivers/net/lisp.c | 1047 ++++++++++++++++++++++++++
include/uapi/linux/if_link.h | 12 +
tools/testing/selftests/net/Makefile | 2 +
tools/testing/selftests/net/config | 4 +
tools/testing/selftests/net/lisp.sh | 1142 +++++++++++++++++++++++++++++
tools/testing/selftests/net/lisp_scale.sh | 550 ++++++++++++++
12 files changed, 3010 insertions(+)
---
base-commit: eb6d6c80d35449c27471b1874f13066c09a8964d
change-id: 20261126-for-upstream-lisp-v1-b47ac698d026
Best regards,
--
Vincent Jardin <vjar…@free.fr>