Bug 1882480 - [rfe] Allow to set smfs/dmfs modes for mellanox nic in os-net-config
Summary: [rfe] Allow to set smfs/dmfs modes for mellanox nic in os-net-config
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: os-net-config
Version: 16.1 (Train)
Hardware: All
OS: Linux
urgent
high
Target Milestone: z3
: 16.1 (Train on RHEL 8.2)
Assignee: Haresh Khandelwal
QA Contact: nlevinki
URL:
Whiteboard:
Depends On:
Blocks: 1595325 nuageosp16rfe
TreeView+ depends on / blocked
 
Reported: 2020-09-24 16:47 UTC by David Hill
Modified: 2024-03-25 16:34 UTC (History)
18 users (show)

Fixed In Version: os-net-config-11.3.2-0.20200804083434.f49ab16.el8ost
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-12-15 18:36:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
example script add_connectx_steering_mode_config_service (1.53 KB, application/x-shellscript)
2020-10-07 07:13 UTC, Alaa Hleihel (NVIDIA Mellanox)
no flags Details


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 758331 0 None MERGED Enable smfs software steering when switchdev is enabled 2021-02-16 21:03:23 UTC
Red Hat Product Errata RHEA-2020:5413 0 None None None 2020-12-15 18:37:21 UTC

Description David Hill 2020-09-24 16:47:12 UTC
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:

Comment 6 Haresh Khandelwal 2020-10-01 11:40:00 UTC
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.

Comment 7 Moshe Levi 2020-10-06 22:15:30 UTC
please review https://review.opendev.org/#/c/756299/

Comment 8 Marcelo Ricardo Leitner 2020-10-06 22:37:16 UTC
(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?

Comment 9 Moshe Levi 2020-10-06 22:47:06 UTC
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

Comment 10 Marcelo Ricardo Leitner 2020-10-07 00:56:09 UTC
One level up, right. Thanks.
Didn't think the entire switchdev mode is Mellanox only in OSP.

Comment 11 Alaa Hleihel (NVIDIA Mellanox) 2020-10-07 07:13:31 UTC
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

Comment 12 Alaa Hleihel (NVIDIA Mellanox) 2020-10-07 07:13:59 UTC
Created attachment 1719601 [details]
example script add_connectx_steering_mode_config_service

Comment 17 Haresh Khandelwal 2020-11-03 18:01:17 UTC
Testing scope of this patch in remains as mentioned in comment#6.

Comment 25 Haresh Khandelwal 2020-11-18 12:02:05 UTC
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

Comment 34 errata-xmlrpc 2020-12-15 18:36:58 UTC
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


Note You need to log in before you can comment on or make changes to this bug.