Page MenuHomeFreeBSD

Add Support for Geneve (RFC8926)
Needs ReviewPublic

Authored by p.mousavizadeh_protonmail.com on Wed, Dec 10, 11:24 PM.
Tags
None
Referenced Files
F139383889: D54172.id167856.diff
Thu, Dec 11, 1:05 PM
F139375345: D54172.id.diff
Thu, Dec 11, 10:25 AM
F139373514: D54172.id167856.diff
Thu, Dec 11, 9:52 AM
F139371441: D54172.id167849.diff
Thu, Dec 11, 9:14 AM
F139366406: D54172.diff
Thu, Dec 11, 7:39 AM

Details

Summary

if_geneve: Add geneve support (RFC8926)
geneve creates a generic network virtualization tunnel
interface for Tentant Systems over an L3 (IP/UDP) underlay network that
provides a Layer 2 (ethernet) or Layer 3 service using the geneve protocol.
This implementation is based on RFC8926.

  • IPv4 and IPv6 is fully supported for both unicast and multicast underlay.
  • Per-VNET geneve tunnel is implemented.
  • RXCSUM/TXCSUM/TSO offloading capabilities are implemented.
  • NETLINK/WITHOUT_NETLINK are fully supported.
  • ifconfig updated to support interface creation and modification using NETLINK.
  • Manual for geneve(4) is added and ifconfig(8) is updated to include geneve

parameters.

I can breakdown this revision if required.
To test, please apply D54109 patch.
Final commit for this revision must use ECN_COMPLETE from D53516 to be compliant
with RFC.

Test Plan

kyua test -k /usr/tests/sys/net/Kyuafile if_geneve

if_geneve:ether_ipv4  ->  passed  [0.169s]
if_geneve:ether_ipv4_multicast  ->  passed  [0.191s]
if_geneve:ether_ipv4_multicast_without_dev  ->  passed  [0.189s]
if_geneve:ether_ipv6  ->  passed  [0.178s]
if_geneve:ether_ipv6_blind_options  ->  passed  [0.327s]
if_geneve:ether_ipv6_external  ->  passed  [0.160s]
if_geneve:ether_ipv6_multicast  ->  passed  [0.179s]
if_geneve:ether_ipv6_multicast_without_dev  ->  passed  [0.173s]
if_geneve:inherit_ipv4  ->  passed  [0.171s]
if_geneve:inherit_ipv4_multicast  ->  passed  [0.202s]
if_geneve:inherit_ipv4_multicast_without_dev  ->  passed  [0.201s]
if_geneve:inherit_ipv6  ->  passed  [0.169s]
if_geneve:inherit_ipv6_multicast  ->  passed  [0.194s]
if_geneve:inherit_ipv6_multicast_without_dev  ->  passed  [0.192s]

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 69173
Build 66056: arc lint + arc unit

Event Timeline

Resolve PEP8 test warnings for netlink_route.py

Fix lint warning on if_geneve.sh test and remove changes to netlink_route.py to avoid error that are not mine

sys/net/if_clone.c
543

This looks like a bugfix to if_clone that is not related to Geneve. Is that correct?

sys/net/if_geneve.c
133

Can this be different to interface's vnet?

191

Can that be different to sc->gnv_ifp->if_vnet?

191

Can this be different to sc->gnv_ifp->if_vnet?

1675

I'd recommend to use some internal flag in softc for this purpose. The IFF_DRV_RUNNING is idea from the early SMP work on the network stack that did not pan out, IMHO. Just don't use it in new interface implementations.

2930

Are we compiling this file at all if neither INET and INET6 are defined? You have added glue to sys/conf/files correctly. So why do you need this (and other below) ifdef?

3175

Are we always sending with zero ip_id, even when IP_DF is not set? IMHO, ip_fillid() needs to be called, unless this is intentional.

3180

mcast can be bool and assigned as mcast = (m->m_flags & (M_MCAST | M_BCAST))