Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 2004006

Summary: [RFE] Support for VLAN and QOS ID in SRIOV-VF via nmstate
Product: Red Hat Enterprise Linux 8 Reporter: Karthik Sundaravel <ksundara>
Component: nmstateAssignee: Gris Ge <fge>
Status: CLOSED ERRATA QA Contact: Mingyu Shi <mshi>
Severity: unspecified Docs Contact: Marc Muehlfeld <mmuehlfe>
Priority: high    
Version: 8.4CC: ferferna, fge, jiji, jishi, network-qe, till
Target Milestone: rcKeywords: FutureFeature, Triaged
Target Release: 8.6Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: nmstate-1.2.1-0.1.alpha1.el8 Doc Type: Enhancement
Doc Text:
.The `nmstate` API now supports VLAN and QoS ID in SR-IOV virtual functions This update enhances the `nmstate` API with support for local area network (VLAN) and quality of service (QoS) in single root I/O virtualization (SR-IOV) virtual functions. As a result, you can use `nmstate` to configure these features.
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-10 13:34:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2006093    

Description Karthik Sundaravel 2021-09-14 10:05:01 UTC
NM supports the configuration of SR-IOV Virtual functions. Attributes like VLAN, QOS bits which are supported in NM is not available in nmstate. Need support for VLAN and QOS configuration for VFs in nmstate as well. The promisc setting of the VF is required as well. This is required for Openstack to work with NM.

Comment 2 Gris Ge 2021-09-17 09:21:18 UTC
I assume both the VLAN and QOS is just unsign 32 bites integer in this context.
If so, yes nmstate can expose that.

For the promisc setting of NIC, nmstate is using `accept-all-mac-addresses` which is inclusive language.
We don't differentiate VF over other NICs. You may try:

```yml
---
interfaces:
  - name: eth1
    type: ethernet
    state: up
    accept-all-mac-addresses: true
```

Comment 3 Karthik Sundaravel 2021-09-20 12:49:22 UTC
(In reply to Gris Ge from comment #2)
> I assume both the VLAN and QOS is just unsign 32 bites integer in this
> context.
> If so, yes nmstate can expose that.

Both VLAN and QOS should fit in 16 bits (unsigned integer).


> 
> For the promisc setting of NIC, nmstate is using `accept-all-mac-addresses`
> which is inclusive language.
> We don't differentiate VF over other NICs. You may try:
> 
> ```yml
> ---
> interfaces:
>   - name: eth1
>     type: ethernet
>     state: up
>     accept-all-mac-addresses: true
> ```

Agree, Openstack shall identify the device names of VFs and could make use of these configurations.

Comment 7 Mingyu Shi 2022-02-13 14:32:18 UTC
Verified with versions:
nmstate-1.2.1-0.2.alpha2.el8.x86_64
nispor-1.2.3-1.el8.x86_64
NetworkManager-1.36.0-0.7.el8.x86_64

[03:28:23@netqe-amd-01 ~]0# nmstatectl apply ens4f0.yaml 
Desired state applied: 
---
interfaces:
- name: ens4f0
  type: ethernet
  state: up
  accept-all-mac-addresses: false
  ethernet:
    auto-negotiation: false
    duplex: full
    speed: 25000
    sr-iov:
      total-vfs: 1
      vfs:
      - _vf_iface_name: ens4f0v0
        id: 0
        qos: 7
        vlan-id: 100
[03:28:40@netqe-amd-01 ~]0# ip link show ens4f0
6: ens4f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 48:df:37:55:3c:00 brd ff:ff:ff:ff:ff:ff
    vf 0     link/ether ce:81:af:f6:37:f0 brd ff:ff:ff:ff:ff:ff, vlan 100, qos 7, spoof checking on, link-state auto, trust off

Comment 9 Gris Ge 2022-03-16 15:02:10 UTC
Updated the documentation and removed the `promisc` mode.

The `accept-all-mac-addresses`(promisc) mode is already supported in previous release, not introduced by this RFE.

Comment 11 errata-xmlrpc 2022-05-10 13:34:48 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 (nmstate 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/RHEA-2022:1772