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

[RFE] Support to set the vdpa interface link up and down by domif-setlink

    • rhel-sst-virtualization-networking
    • ssg_virtualization
    • 1
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • None

      Goal

      Add libvirt support to set the vdpa interface link up and down by domif-setlink.

      Qemu support to config interrupt in vhost-vdpa since rhel 9.2.0, but libvirt do not support it yet.
      Refer to Bug 1905805 - support config interrupt in vhost-vdpa qemu(https://bugzilla.redhat.com/show_bug.cgi?id=1905805)

      Steps for libvirt:

      1. Start vm.
         # virsh dumpxml rh --xpath //interface
        <interface type="vdpa">
          <mac address="52:54:00:cb:45:00"/>
          <source dev="/dev/vhost-vdpa-0"/>
          <model type="virtio"/>
          <driver queues="8"/>
          <acpi index="1"/>
          <address type="pci" domain="0x0000" bus="0x07" slot="0x00" function="0x0"/>
        </interface>
        # virsh start rh
        Domain 'rh' started
        
      2. Set the link down by domif-setlink:
        # virsh domiflist rh
         Interface   Type   Source              Model    MAC
        --------------------------------------------------------------------
         -           vdpa   /dev/vhost-vdpa-0   virtio   52:54:00:cb:45:00
        # virsh domif-getlink rh 52:54:00:cb:45:00
        52:54:00:cb:45:00 up
        # virsh domif-setlink rh   52:54:00:cb:45:00 down
        error: Failed to update interface link state
        error: Operation not supported: cannot change config of 'vdpa' network interface type
        

        For other tap backend interface, domif-setlink can work properly, the qmp command is like this:

        30.398 > 0x7f5e84047180 {"execute":"set_link","arguments":{"name":"net1","up":false},"id":"libvirt-428"}
        30.403 < 0x7f5e84047180 {"return": {}, "id": "libvirt-428"}
        

        Acceptance Criteria

        Set the vdpa interface up and down by domif-setlink successfully;

              virt-maint virt-maint
              yalzhang@redhat.com Yalan Zhang
              virt-maint virt-maint
              Yalan Zhang Yalan Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: