Merge "Enable smfs software steering when switchdev is enabled" into stable/train
This commit is contained in:
commit
a3b41398ae
|
@ -220,6 +220,8 @@ def configure_sriov_pf(execution_from_cli=False, restart_openvswitch=False):
|
||||||
trigger_udev_rule = add_udev_rule_for_sriov_pf(item['name'])\
|
trigger_udev_rule = add_udev_rule_for_sriov_pf(item['name'])\
|
||||||
or trigger_udev_rule
|
or trigger_udev_rule
|
||||||
|
|
||||||
|
configure_smfs_software_steering(item['name'])
|
||||||
|
|
||||||
configure_switchdev(item['name'])
|
configure_switchdev(item['name'])
|
||||||
|
|
||||||
# Adding a udev rule to rename vf-representors
|
# Adding a udev rule to rename vf-representors
|
||||||
|
@ -432,6 +434,17 @@ def configure_switchdev(pf_name):
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
|
||||||
|
def configure_smfs_software_steering(pf_name):
|
||||||
|
pf_pci = get_pf_pci(pf_name)
|
||||||
|
try:
|
||||||
|
processutils.execute('/usr/sbin/devlink', 'dev', 'param', 'set',
|
||||||
|
'pci/%s' % pf_pci, 'name', 'flow_steering_mode',
|
||||||
|
'value', 'smfs', 'cmode', 'runtime')
|
||||||
|
logger.info("Device pci/%s is set to smfs steering mode." % pf_pci)
|
||||||
|
except processutils.ProcessExecutionError:
|
||||||
|
logger.warning("Could not set pci/%s to smfs steering mode!")
|
||||||
|
|
||||||
|
|
||||||
def run_ip_config_cmd(*cmd, **kwargs):
|
def run_ip_config_cmd(*cmd, **kwargs):
|
||||||
logger.info("Running %s" % ' '.join(cmd))
|
logger.info("Running %s" % ' '.join(cmd))
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue