RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1651594 - define and document behaviour of connection with specified sriov
Summary: define and document behaviour of connection with specified sriov
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: NetworkManager
Version: 8.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: 8.0
Assignee: Beniamino Galvani
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-11-20 12:11 UTC by Vladimir Benes
Modified: 2020-11-04 01:49 UTC (History)
8 users (show)

Fixed In Version: NetworkManager-1.25.1-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-04 01:48:18 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:4499 0 None None None 2020-11-04 01:49:06 UTC

Description Vladimir Benes 2018-11-20 12:11:41 UTC
Description of problem:
I have no idea how should connection with sriov things work. Should reconnect refresh settings and restart auto-connected profiles? Should bringing connection down remove all VFs? 

I think we need to define this and document. 

I would suggest reconnecting as a VFs refresh and possibility to down master connection w/o bringing VFs down. To remove VFs we need to make total-vfs equal 0. But no strong opinion here.

Version-Release number of selected component (if applicable):
1.14.0-7

Comment 1 Vladimir Benes 2018-11-22 12:23:50 UTC
we need to check whether /sys/class/net/p4p1/device/sriov_drivers_autoprobe  was set to 1 too

Comment 2 Beniamino Galvani 2020-03-16 15:40:58 UTC
(In reply to Vladimir Benes from comment #0)
> Description of problem:
> I have no idea how should connection with sriov things work. Should
> reconnect refresh settings and restart auto-connected profiles? Should
> bringing connection down remove all VFs? 
> 
> I think we need to define this and document. 
> 
> I would suggest reconnecting as a VFs refresh and possibility to down master
> connection w/o bringing VFs down. To remove VFs we need to make total-vfs
> equal 0. But no strong opinion here.
> 
> Version-Release number of selected component (if applicable):
> 1.14.0-7

Hi,

this

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/b850066a96ad8cf9db45fa9f60da7e2839f1e8ec/libnm-core/nm-setting-sriov.c#L1268

(part of merge request https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/440 ) describes what happens to VF when activating and reactivating. The merge request also implements the `nmcli connection modify $con remove sriov` command to remove a setting from a connection.

Comment 5 Vladimir Benes 2020-06-30 13:01:15 UTC
       Example 13. Adding an Ethernet connection and configuring SR-IOV VFs

           $ nmcli con add type ethernet con-name EthernetPF ifname em1
           $ nmcli con modify EthernetPF sriov.total-vfs 3 sriov.autoprobe-drivers false
           $ nmcli con modify EthernetPF sriov.vfs '0 mac=00:11:22:33:44:55 vlans=10, 1 trust=true spoof-check=false'
           $ nmcli con modify EthernetPF +sriov.vfs '2 max-tx-rate=20'

       This example demonstrates adding an Ethernet connection for physical function (PF) ens4 and configuring 3 SR-IOV virtual functions (VFs) on it. The first VF is configured with MAC address
       00:11:22:33:44:55 and VLAN 10, the second one has the trust and spoof-check features respectively enabled and disabled. VF number 2 has a maximux transmission rate of 20Mbps. The kernel is instructed to not automatically instantiate a network interface for the VFs.


from man nmcli-examples

and
   sriov setting
       SR-IOV settings.

       Properties:

       autoprobe-drivers
           Whether to autoprobe virtual functions by a compatible driver. If set to NM_TERNARY_TRUE (1), the kernel will try to bind VFs to a compatible driver and if this succeeds a new network interface
           will be instantiated for each VF. If set to NM_TERNARY_FALSE (0), VFs will not be claimed and no network interfaces will be created for them. When set to NM_TERNARY_DEFAULT (-1), the global
           default is used; in case the global default is unspecified it is assumed to be NM_TERNARY_TRUE (1).

           Format: NMTernary (int32)

       total-vfs
           The total number of virtual functions to create. Note that when the sriov setting is present NetworkManager enforces the number of virtual functions on the interface (also when it is zero)
           during activation and resets it upon deactivation. To prevent any changes to SR-IOV parameters don't add a sriov setting to the connection.

           Format: uint32

       vfs
           Array of virtual function descriptors. Each VF descriptor is a dictionary mapping attribute names to GVariant values. The 'index' entry is mandatory for each VF. When represented as string a VF
           is in the form: "INDEX [ATTR=VALUE[ ATTR=VALUE]...]". for example: "2 mac=00:11:22:33:44:55 spoof-check=true". Multiple VFs can be specified using a comma as separator. Currently the following
           attributes are supported: mac, spoof-check, trust, min-tx-rate, max-tx-rate, vlans. The "vlans" attribute is represented as a semicolon-separated list of VLAN descriptors, where each descriptor
           has the form "ID[.PRIORITY[.PROTO]]". PROTO can be either 'q' for 802.1Q (the default) or 'ad' for 802.1ad.

           Format: array of vardict


from man nm-settings

I think this is good to go

Comment 8 errata-xmlrpc 2020-11-04 01:48:18 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 (NetworkManager bug fix and enhancement update), 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/RHBA-2020:4499


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