Merge "Configure inline mode transport for Connectx4/LX"

This commit is contained in:
Zuul 2018-01-09 05:23:25 +00:00 committed by Gerrit Code Review
commit f9009b7d01
3 changed files with 16 additions and 0 deletions

View File

@ -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

View File

@ -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

View File

@ -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