Bridge Offload
Bridge offload is supported switchdev mode only.
Bridge offload is supported from kernel version 5.15 onward.
A Linux bridge is an in-kernel software network switch (based on and implementing a subset of IEEE 802.1D standard) used to connect Ethernet segments together in a protocol-independent manner. Packets are forwarded based on L2 Ethernet header addresses.
mlx5 provides the ability to offload bridge dataplane unicast packet forwarding and VLAN management to hardware.
Initialize the ASAP2 environment:
Create the VFs.
Enter switchdev mode.
Create a bridge and add mlx5 representors to bridge:
ip link add name bridge0 type bridge ip link set enp8s0f0_0 master bridge0
Enable VLAN filtering on the bridge:
ip link set bridge0 type bridge vlan_filtering
1
Configure port VLAN matching (trunk mode). In this configuration, only packets with specified VID are allowed.
bridge vlan add dev enp8s0f0_0 vid
2
Configure port VLAN tagging (access mode). In this configuration, VLAN header is pushed/popped upon reception/transmission on port.
bridge vlan add dev enp8s0f0_0 vid
2
pvid untagged
Bridge supports offloading on bond net device that is fully initialized with mlx5 uplink representors and is in single (shared) FDB LAG mode. Details about initialization of LAG are provided in section "SR-IOV VF LAG".
To add a bonding net device to bridge:
ip link set bond0 master bridge0
For further information on interacting with Linux bridge via iproute2 bridge tool, refer to man 8 bridge.