Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-95844

adding a VF configuration resets and re-configures all other VFs

Linking RHIVOS CVEs to...Migration: Automation ...Sync from "Extern...XMLWordPrintable

    • NetworkManager-1.55.4-1.el10
    • No
    • Important
    • ZStream
    • rhel-net-mgmt
    • ssg_networking
    • Hide

      Definition of Done:

      Please mark each item below with ( / ) if completed or ( x ) if incomplete:

      The acceptance criteria defined below are met.

      Given a host with multiple SR-IOV VFs, where some are in active use (e.g., DPDK-bound),

      When applying an nmstatectl apply that only changes the config of a single VF (e.g., add VLAN to VF 4),

      Then only that VF is touched, and all other existing VF configurations remain unchanged and unreset.


      Integration test case is available upstream.


      Code is reviewed and merged upstream.


      Preliminary testing is done.


      A demo is recorded

      Show
      Definition of Done: Please mark each item below with ( / ) if completed or ( x ) if incomplete: The acceptance criteria defined below are met. Given a host with multiple SR-IOV VFs, where some are in active use (e.g., DPDK-bound), When applying an nmstatectl apply that only changes the config of a single VF (e.g., add VLAN to VF 4), Then only that VF is touched, and all other existing VF configurations remain unchanged and unreset. Integration test case is available upstream. Code is reviewed and merged upstream. Preliminary testing is done. A demo is recorded
    • Pass
    • Automated
    • Unspecified
    • Unspecified
    • Unspecified
    • None

      What were you trying to do that didn't work?

      Apply the below template

       

      interfaces:
      - accept-all-mac-addresses: true
        dispatch:
          post-activation: "\nset +e\nset -x\n/sbin/ethtool --set-priv-flags $1 disable-fw-lldp\
            \ off\n\ndpdk_vfs=\"3\"\nlinux_vfs=\"0 1\"\n\nfor vfid in $dpdk_vfs $linux_vfs;\
            \ do\n    vf_pci_id=$(readlink -ve \"/sys/class/net/$1/device/virtfn$vfid\"\
            ) &&\n    vf_pci_id=$(basename \"$vf_pci_id\") &&\n    modalias=$(cat \"/sys/class/net/$1/device/virtfn$vfid/modalias\"\
            ) &&\n    def_driver=$(modprobe -R \"$modalias\") &&\n    if echo \"$dpdk_vfs\"\
            \ | grep -qw \"$vfid\" && \\\n            ! echo \"$def_driver\" | grep -q ^mlx;\
            \ then\n        driver=vfio-pci\n    else\n        driver=\"$def_driver\"\n\
            \    fi &&\n    cur_drv=$(readlink \"/sys/bus/pci/devices/$vf_pci_id/driver\"\
            \ 2>/dev/null) &&\n    cur_drv=$(basename \"$cur_drv\")\n    if ! [ \"$cur_drv\"\
            \ = \"$driver\" ]; then\n        driverctl --nosave set-override \"$vf_pci_id\"\
            \ \"$driver\"\n    fi\ndone\n\n"
        ethernet:
          sr-iov:
            drivers-autoprobe: true
            total-vfs: 5 
            vfs:
            - id: 0
              spoof-check: false
              trust: true
              vlan-id: 72
            - id: 1
              spoof-check: false
              trust: true
              vlan-id: 73
            - id: 3
              spoof-check: false
              trust: true
        ethtool:
          feature:
            hw-tc-offload: false
        ipv4:
          auto-gateway: false
          dhcp: false
          enabled: false
        ipv6:
          auto-gateway: false
          autoconf: false
          dhcp: false
          enabled: false
        mtu: 9000
        name: ens1f2
        state: up
        type: ethernet 

       

       

      Add another VF configuration (id:  4)

      interfaces:
      - accept-all-mac-addresses: true
        dispatch:
          post-activation: "\nset +e\nset -x\n/sbin/ethtool --set-priv-flags $1 disable-fw-lldp\
            \ off\n\ndpdk_vfs=\"3\"\nlinux_vfs=\"0 1\"\n\nfor vfid in $dpdk_vfs $linux_vfs;\
            \ do\n    vf_pci_id=$(readlink -ve \"/sys/class/net/$1/device/virtfn$vfid\"\
            ) &&\n    vf_pci_id=$(basename \"$vf_pci_id\") &&\n    modalias=$(cat \"/sys/class/net/$1/device/virtfn$vfid/modalias\"\
            ) &&\n    def_driver=$(modprobe -R \"$modalias\") &&\n    if echo \"$dpdk_vfs\"\
            \ | grep -qw \"$vfid\" && \\\n            ! echo \"$def_driver\" | grep -q ^mlx;\
            \ then\n        driver=vfio-pci\n    else\n        driver=\"$def_driver\"\n\
            \    fi &&\n    cur_drv=$(readlink \"/sys/bus/pci/devices/$vf_pci_id/driver\"\
            \ 2>/dev/null) &&\n    cur_drv=$(basename \"$cur_drv\")\n    if ! [ \"$cur_drv\"\
            \ = \"$driver\" ]; then\n        driverctl --nosave set-override \"$vf_pci_id\"\
            \ \"$driver\"\n    fi\ndone\n\n"
        ethernet:
          sr-iov:
            drivers-autoprobe: true
            total-vfs: 5 
            vfs:
            - id: 0
              spoof-check: false
              trust: true
              vlan-id: 72
            - id: 1
              spoof-check: false
              trust: true
              vlan-id: 73
            - id: 3
              spoof-check: false
              trust: true
            - id: 4
              spoof-check: false
              trust: true
        ethtool:
          feature:
            hw-tc-offload: false
        ipv4:
          auto-gateway: false
          dhcp: false
          enabled: false
        ipv6:
          auto-gateway: false
          autoconf: false
          dhcp: false
          enabled: false
        mtu: 9000
        name: ens1f2
        state: up
        type: ethernet 

      The second apply resets the VFs and reconfigures them again. It would be ideal to just configure the additional change instead.

       

      Below is the dmesg output.

       

      nmstate logs

      [root@compute-0 cloud-admin]# nmstatectl apply ~/nms1.yaml 
      [2025-06-09T16:29:30Z INFO  nmstatectl] Nmstate version: 2.2.45
      [2025-06-09T16:29:30Z INFO  nmstate::dispatch] Dispatch script is not protected by checkpoint, please backup your original nmstate created dispatch scripts
      [2025-06-09T16:29:30Z INFO  nmstate::query_apply::net_state] Created checkpoint /org/freedesktop/NetworkManager/Checkpoint/2
      [2025-06-09T16:29:31Z INFO  nmstate::nm::query_apply::profile] Modifying connection 03733034-774f-455b-a979-095ea3f03777: ens1f2/802-3-ethernet
      [2025-06-09T16:29:31Z INFO  nmstate::nm::query_apply::profile] Reapplying connection 03733034-774f-455b-a979-095ea3f03777: ens1f2/802-3-ethernet
      [2025-06-09T16:29:31Z INFO  nmstate::nm::query_apply::profile] Reapplying connection 03733034-774f-455b-a979-095ea3f03777: ens1f2/802-3-ethernet
      [2025-06-09T16:29:31Z INFO  nmstate::nm::query_apply::profile] Reapply operation failed on 802-3-ethernet ens1f2 03733034-774f-455b-a979-095ea3f03777, reason: IncompatibleReapply:Can't reapply any changes to 'sriov' setting, retry on normal activation 

      What is the impact of this issue to you?

      In our templates, the reset and reconfiguration is affecting VFs that are attached to DPDK and it would be better if the same can be added without affecting other ports.

      Please provide the package NVR for which the bug is seen:

      [root@compute-0 cloud-admin]# nmstatectl --version

      nmstatectl 2.2.45

      [root@compute-0 cloud-admin]# nmcli -v

      nmcli tool, version 1.46.0-26.el9_4

      How reproducible is this bug?:

      Always

      Expected results

      reset and reconfiguration of other VFs shall be avoided

      Actual results

      reset and reconfiguration of all VFs occurs

              rhn-engineering-vbenes Vladimir Benes
              ksundara@redhat.com Karthik Sundaravel
              Network Management Team Network Management Team
              Vladimir Benes Vladimir Benes
              Votes:
              0 Vote for this issue
              Watchers:
              14 Start watching this issue

                Created:
                Updated: