PF bonding with CX6 ports in switchdev mode

Hi Team,

I am exploring how 2 PFs of Cx6 work together for redundancy(in switchdev mode).
These 2 PFs are bonded(active-backup) and are part of OvS bridge.
I want to assign one of the VF to a VM and VF rep is also part of the bond.
I see OvS flows are offloaded only when the parent PF (of VF) is active.
When the other PF become active the flows are not offloaded to HW.
It appears the e-switch per PF are working independently.

Please help on this query. Is there any step which I am missing.

Some more details:

using latest stable OFED with Linux kernel version 6
Driver version: 24.10-3.2.5
firmware-version: 22.43.2026

hi,

It seems you’re trying to use VF LAG.

Active-backup bond should be supported.

The general steps are:

  1. Enable SR-IOV and create vf

command example:

echo 1 > /sys/devices/pci*//$DEV1_PCI/sriov_numvfs
echo 1 > /sys/devices/pci
/*/$DEV2_PCI/sriov_numvfs

  1. Set the two PF to switchdev mode

command example:

devlink dev eswitch set pci/$DEV1_PCI mode switchdev

devlink dev eswitch set pci/$DEV2_PCI mode switchdev

  1. set hw-offload. (It’s better to wait several seconds after setting switchdev mode)

command example:

systemctl restart openvswitch.service
ovs-vsctl set Open_vSwitch . other_config:hw-offload=true
systemctl restart openvswitch.service

  1. enable hw-tc-offload on PF and REP

command example:

ethtool -K $nic1 hw-tc-offload on

  1. Set up a bond

6)add bond and rep to the ovs

command example:

ovs-vsctl – add-br ${ovs_name}
ovs-vsctl add-port ${ovs_name} $BOND
ovs-vsctl add-port ${ovs_name} $REP1
ovs-vsctl add-port ${ovs_name} $REP2

Last thing you should know, but just to make sure, the two PFs must belong to one NIC.

Thanks for the details. Let me explain the problems which I am facing. For example eth0 and eth1 are 2 PFs coming from CX6 NIC which are part of the bond. A VF from eth0 is given to VM and eth1 is active port in the bond. In this situation, ovs flows are not getting offloaded to e-switch.

Is this any know limitation ?