Skip to content

Commit

Permalink
Merge pull request #208 from zshi-redhat/ovs-hw-offload-software-stee…
Browse files Browse the repository at this point in the history
…ring

OVS HWOL: set flow steering mode for eswitch device
  • Loading branch information
pliurh authored Dec 14, 2021
2 parents 923cb4d + 003ab9d commit c822c05
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,19 @@ contents:
# Create udev rule to save PF name
add_udev_rule_for_sriov_pf $name
echo "unload VF driver for $pci_addr"
echo "Unload VF driver for $pci_addr"
VfDirs=$(ls /sys/bus/pci/devices/${pci_addr} | grep virtfn)
for VfDir in $VfDirs
do
VfPciAddr=$(basename "$( readlink -f /sys/bus/pci/devices/${pci_addr}/$VfDir )")
echo $VfPciAddr > /sys/bus/pci/drivers/mlx5_core/unbind || true
done
# set flow steering mode before entering switchdev mode
echo "Set flow steering mode to dmfs"
devlink dev param set pci/${pci_addr} name flow_steering_mode value dmfs cmode runtime
# set PF to switchdev mode
echo "Set eswitch mode to switchdev"
devlink dev eswitch set pci/${pci_addr} mode switchdev
ip link set ${name} up
Expand Down

0 comments on commit c822c05

Please sign in to comment.