Skip to content

Support PMTU discovery with bridged UDP tunnels

Stefano Brivio linux-next linux-riscv lkml netdev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest6 patches 7 repliesIn review
  2. v16 patches 9 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6ipv4: route: Ignore output interface in FIB lookup for PMTU routeinclude/linux/netdevice.h net/ipv4/route.c+10 -01 reply
2/6tunnels: PMTU discovery support for directly bridged IP packetsdrivers/net/bareudp.c drivers/net/geneve.c drivers/net/vxlan.c +3 more+254 -163 replies
3/6vxlan: Support for PMTU discovery on directly bridged linksdrivers/net/vxlan.c+41 -60 replies
4/6geneve: Support for PMTU discovery on directly bridged linksdrivers/net/geneve.c+51 -50 replies
5/6selftests: pmtu.sh: Add tests for bridged UDP tunnelstools/testing/selftests/net/pmtu.sh+160 -72 replies
6/6selftests: pmtu.sh: Add tests for UDP tunnels handled by Open vSwitchtools/testing/selftests/net/pmtu.sh+180 -00 replies

Reviews trailers per patch

3 of 6 patches have a Reviewed-by or Acked-by.

PatchDavid Ahern
1/6R-b
2/6R-b
3/6
4/6
5/6R-b
6/6

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

Read the v2 thread

Cover letter [PATCH net-next v2 0/6] Support PMTU discovery with bridged UDP tunnels

Currently, PMTU discovery for UDP tunnels only works if packets are routed to the encapsulating interfaces, not bridged.

This results from the fact that we generally don't have valid routes to the senders we can use to relay ICMP and ICMPv6 errors, and makes PMTU discovery completely non-functional for VXLAN and GENEVE ports of both regular bridges and Open vSwitch instances.

If the sender is local, and packets are forwarded to the port by a regular bridge, all it takes is to generate a corresponding route exception on the encapsulating device. The bridge then finds the route exception carrying the PMTU value estimate as it forwards frames, and relays ICMP messages back to the socket of the local sender. Patch 1/6 fixes this case.

If the sender resides on another node, we actually need to reply to IP and IPv6 packets ourselves and send these ICMP or ICMPv6 errors back, using the same encapsulating device. Patch 2/6, based on an original idea by Florian Westphal, adds the needed functionality, while patches 3/6 and 4/6 add matching support for VXLAN and GENEVE.

Finally, 5/6 and 6/6 introduce selftests for all combinations of inner and outer IP versions, covering both VXLAN and GENEVE, with both regular bridges and Open vSwitch instances.

v2: Add helper to check for any bridge port, skip oif check for PMTU
routes for bridge ports only, split IPv4 and IPv6 helpers and functions (all suggested by David Ahern)

Stefano Brivio (6):
ipv4: route: Ignore output interface in FIB lookup for PMTU route
tunnels: PMTU discovery support for directly bridged IP packets
vxlan: Support for PMTU discovery on directly bridged links
geneve: Support for PMTU discovery on directly bridged links
selftests: pmtu.sh: Add tests for bridged UDP tunnels
selftests: pmtu.sh: Add tests for UDP tunnels handled by Open vSwitch

 drivers/net/bareudp.c               |   5 +-
 drivers/net/geneve.c                |  55 ++++-
 drivers/net/vxlan.c                 |  47 +++-
 include/linux/netdevice.h           |   5 +
 include/net/dst.h                   |  10 -
 include/net/ip_tunnels.h            |   2 +
 net/ipv4/ip_tunnel_core.c           | 244 +++++++++++++++++++
 net/ipv4/route.c                    |   5 +
 tools/testing/selftests/net/pmtu.sh | 347 +++++++++++++++++++++++++++-
 9 files changed, 691 insertions(+), 29 deletions(-)
Signature · 1 line
2.27.0