Merge "Configure inline mode transport for Connectx4/LX"
This commit is contained in:
commit
f9009b7d01
@ -57,6 +57,9 @@ Puppet::Type.type(:sriov_vf_config).provide(:numvfs) do
|
||||
# Changing the mode of sriov interface to switchdev mode
|
||||
%x{devlink dev eswitch set pci/#{get_interface_pci} mode switchdev}
|
||||
%x{ethtool -K #{sriov_get_interface} hw-tc-offload on}
|
||||
if get_interface_device == "0x1013" || get_interface_device == "0x1015"
|
||||
%x{devlink dev eswitch set pci/#{get_interface_pci} inline-mode transport}
|
||||
end
|
||||
if cur_value == "0x15b3"
|
||||
# Binding virtual functions
|
||||
vfs_pcis.each do|vfs_pci|
|
||||
@ -98,4 +101,7 @@ Puppet::Type.type(:sriov_vf_config).provide(:numvfs) do
|
||||
%x{ethtool -i #{sriov_get_interface} | grep bus-info | awk {'print$2'}}.strip
|
||||
end
|
||||
|
||||
def get_interface_device
|
||||
%x{cat /sys/class/net/#{sriov_get_interface}/device/device}.strip
|
||||
end
|
||||
end
|
||||
|
@ -80,6 +80,11 @@ then
|
||||
fi
|
||||
interface_pci=`ethtool -i eth0 | grep bus-info | awk {'print\$2'}`
|
||||
devlink dev eswitch set pci/\$interface_pci mode switchdev
|
||||
interface_device=`cat /sys/class/net/eth0/device/device`
|
||||
if [ $interface_device == \"0x1013\" ] || [ $interface_device == \"0x1015\" ]
|
||||
then
|
||||
devlink dev eswitch set pci/$interface_pci inline-mode transport
|
||||
fi
|
||||
ethtool -K eth0 hw-tc-offload on
|
||||
if [ `cat /sys/class/net/eth0/device/vendor` == \"0x15b3\" ]
|
||||
then
|
||||
|
@ -11,6 +11,11 @@ then
|
||||
fi
|
||||
interface_pci=`ethtool -i <%=$interface%> | grep bus-info | awk {'print$2'}`
|
||||
devlink dev eswitch set pci/$interface_pci mode switchdev
|
||||
interface_device=`cat /sys/class/net/<%=$interface%>/device/device`
|
||||
if [ $interface_device == "0x1013" ] || [ $interface_device == "0x1015" ]
|
||||
then
|
||||
devlink dev eswitch set pci/$interface_pci inline-mode transport
|
||||
fi
|
||||
ethtool -K <%=$interface%> hw-tc-offload on
|
||||
if [ `cat /sys/class/net/<%=$interface%>/device/vendor` == "0x15b3" ]
|
||||
then
|
||||
|
Loading…
Reference in New Issue
Block a user