Description of problem: [rfe] Allow to set smfs/dmfs modes for mellanox nic in os-net-config ~~~ devlink dev param set pci/<pci-address> flow_steering_mode value smfs cmode runtime devlink dev eswitch set pci/<pci-address> mode switchdev ~~~ or this: ~~~ devlink dev param set pci/<pci-address> flow_steering_mode value dmfs cmode runtime devlink dev eswitch set pci/<pci-address> mode switchdev ~~~ Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
Adding Moshe, Mellanox team is already working on it. Plan is to just enable smfs (software steering) when setting switchdev mode configured in os-net-config. If not switchdev, it will continue dmfs as default. So, with this approach, we dont need for THT parameter. Once this code is merged upstream, we need to backport manually in 16.1.3 as no full import planned for 16.1.3.
please review https://review.opendev.org/#/c/756299/
(In reply to Moshe Levi from comment #7) > please review https://review.opendev.org/#/c/756299/ I don't know how to review it in there, but shouldn't it only be attempted for Mellanox cards at least?
all the configure switchdev run when the vendor id is mellanox see [1] [1] - https://github.com/openstack/os-net-config/blob/65f240fe4da9b60934f823a25ce37cd089abfc73/os_net_config/sriov_config.py#L206-L223
One level up, right. Thanks. Didn't think the entire switchdev mode is Mellanox only in OSP.
I don't know against which RHEL versions this updated script can run, but if it ran against: 1. RHEL-8.0 -> RHEL-8.1; then we will always see "Could not set pci/%s to smfs steering mode!" warning. 2. RHEL-8.2 -> RHEL-8.3; only ConnectX-5 will accept this configuration, any other device will cause a warning as well (since only ConnectX-5 supports smfs now). Don't you think it's better to check that the device supports setting flow_steering_mode param in the first place? and log a warning/error only when there is a real issue. The above 2 cases might raise redundant support cases... I will attach an example bash script that tries to configure flow_steering_mode only if a kernel and device supports it. Alaa
Created attachment 1719601 [details] example script add_connectx_steering_mode_config_service
Testing scope of this patch in remains as mentioned in comment#6.
Verified with below versions. core_puddle_version - RHOS-16.1-RHEL-8-20201110.n.1 kernel - 4.18.0-193.29.1.el8_2.x86_64 rhel - rhel 8.2 [root@computeovshwoffload-0 heat-admin]# sudo devlink dev eswitch show pci/0000:04:00.0 pci/0000:04:00.0: mode switchdev inline-mode none encap enable [root@computeovshwoffload-0 heat-admin]# sudo devlink dev eswitch show pci/0000:04:00.1 pci/0000:04:00.1: mode switchdev inline-mode none encap enable [root@computeovshwoffload-0 heat-admin]# devlink dev param show pci/0000:04:00.1 name flow_steering_mode pci/0000:04:00.1: name flow_steering_mode type driver-specific values: cmode runtime value smfs <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<Set to software steering mode [root@computeovshwoffload-0 heat-admin]# devlink dev param show pci/0000:04:00.0 name flow_steering_mode pci/0000:04:00.0: name flow_steering_mode type driver-specific values: cmode runtime value smfs <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<Set to software steering mode
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Red Hat OpenStack Platform 16.1.3 bug fix and enhancement advisory), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2020:5413