Hardware Accelerating Linux Network Functions
Hardware Accelerating Linux Network Functions
functions
Roopa Prabhu, Wilson Kok
kernel kernel
FDB
FDB (in sync with hw)
bridge
bridge bridge
picture... iproute2
mstpd
bridge
nftables
snmpd
quagga lldpd
brctl
bird
hw driver
kernel
HW
Routing Bridge
ARP Tables acls CPU MEM
Tables FDB/MDB
switchdev
mstp routing offload API
daemon
br0
swp2 swpN
user swp1
kernel
netdev_ops {
.ndo_fdb_add/del
.ndo_fib_add/del
}
FIB
hw driver
Bridge br0
FDB/MDB
kernel
HW
HW
Routing Bridge
ARP Tables acls CPU CPU ASIC MEM
MEM
Tables FDB/MDB
RtNetlink
mstp routing rtnetlink notifications
daemon listener
br0
hw driver
swp2 swpN
user swp1
kernel
FIB
Bridge br0
FDB/MDB
kernel
HW
HW
Routing Bridge
ARP Tables acls CPU CPU ASIC MEM
MEM
Tables FDB/MDB
switch hardware
netdevs for each front
panel ports
Proceedings of netdev 0.1, Feb 14-17, 2015, Ottawa, On, Canada cpu port
[snip]
switch ports
Proceedings of netdev 0.1, Feb 14-17, 2015, Ottawa, On, Canada
management port
ethtool on switch port
$ethtool swp1
Settings for swp1: Transceiver: external
Supported ports: [ FIBRE ] Auto-negotiation: off
Supported link modes: 1000baseT/Full Current message level: 0x00000000
(0)
10000baseT/Full
Link detected: yes
Supported pause frame use: Symmetric
Receive-only
Supports auto-negotiation: Yes
Advertised link modes: 1000baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: No
Speed: 10000Mb/s
Duplex: Full
Port: FIBRE Proceedings of netdev 0.1, Feb 14-17, 2015, Ottawa, On, Canada
PHYAD: 0
Creating a hardware accelerated Linux bridge
device
# ip link add br0 type bridge
switch asic
VLAN
swp1 swp2
Proceedings of netdev 0.1, Feb 14-17, 2015, Ottawa, On, Canada
Bridging hardware offload: packet path
kernel
HW
CPU ASIC MEM
br0
kernel
HW
CPU ASIC MEM
br0
switch driver
fdb delete
kernel
HW
CPU ASIC MEM
switch asic
query
data
swp1 swp2
Proceedings of netdev 0.1, Feb 14-17, 2015, Ottawa, On, Canada 224.1.2.3 Query
Join 224.1.2.3
IGMP snooping offload
● switch driver configures hardware to send IGMP reports
and queries to software
● bridge driver maintains IGMP group membership
● in some cases the reports or queries need to be re-
forwarded in the kernel
swp3
172.16.21.150
MAC Destination
lo: 172.16.20.103 vxlan100
macC 172.16.21.150
macC
20.0.0.2 unknown 172.16.22.125
macB swp2
macC vxlan100
swp1 swp2
unicast remote mac + physical locator bridge fdb (mac, vlan, dst <remote ip>)
unicast local mac + physical locator bridge fdb (mac, vlan, local dev)
Network
manager
arping for
unresolved
nexthop
user swp1 swp2 swpN
kernel
switch driver
FIB neigh table
kernel
HW
Routing Tables Neigh tables CPU ASIC MEM