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

Boot guest with e1000e, value of "/sys/class/net/$nic/operstate" is wrongly showed as "up" after "(qemu) set_link net0 off"

    • qemu-kvm-8.0.0-16.el9_3
    • None
    • Low
    • rhel-sst-virtualization-networking
    • ssg_virtualization
    • 1
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • If docs needed, set a value
    • None

      Description of problem:
      Boot guest with e1000e. After executing "(qemu) set_link net0 off", the value of "/sys/class/net/$nic/operstate" in guest is 'up'. but the expected value is 'down'.

      Version-Release number of selected component (if applicable):
      4.18.0-82.el8.x86_64
      qemu-kvm-2.12.0-69.module+el8.1.0+3143+457f984c.x86_64

      How reproducible:
      100%

      Steps to Reproduce:
      1. Boot guest with e1000e

      -netdev tap,id=hostnet0 \
      -device e1000e,netdev=hostnet0,id=net0,mac=fa:5e:07:b4:08:01,bus=root.2 \

      2. In qemu terminal, set this NIC link off
      (qemu) set_link net0 off

      3. In guest, check status, it's wrongly showed "up".

      1. ifconfig
        ens2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
        inet 10.73.74.39 netmask 255.255.252.0 broadcast 10.73.75.255
        inet6 fe80::f85e:7ff:feb4:801 prefixlen 64 scopeid 0x20<link>
        ether fa:5e:07:b4:08:01 txqueuelen 1000 (Ethernet)
        RX packets 81602 bytes 6158528 (5.8 MiB)
        RX errors 0 dropped 0 overruns 0 frame 0
        TX packets 268 bytes 758903 (741.1 KiB)
        TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
        device interrupt 23 memory 0xfe640000-fe660000
      1. cat /sys/class/net/ens2/operstate
        up

      Actual results:
      The value of /sys/class/net/$nic/operstate is wrongly showed "up" after set link down.

      Expected results:
      The value of /sys/class/net/$nic/operstate should be showed "down" after set link down.

      Additional info:
      1. virtio-net-pci works well. So it's only e1000e issue.

      Reference:
      1. Full cmd line:

      /usr/libexec/qemu-kvm -name rhel8.0 \
      -M q35,kernel-irqchip=split \
      -cpu host -m 8G \
      -smp 4,sockets=1,cores=4,threads=1 \
      -device pcie-root-port,id=root.1,slot=1 \
      -device pcie-root-port,id=root.2,slot=2 \
      -drive file=/home/rhel8.0.qcow2,format=qcow2,if=none,id=drive-virtio-blk0,werror=stop,rerror=stop \
      -device virtio-blk-pci,drive=drive-virtio-blk0,id=virtio-blk0,bus=root.1 \
      -vnc :2 \
      -monitor stdio \
      -netdev tap,id=hostnet0 \
      -device e1000e,netdev=hostnet0,id=net0,mac=fa:5e:07:b4:08:01,bus=root.2 \

              yvugenfi@redhat.com Yan Vugenfirer
              rhn-support-pezhang Pei Zhang
              virt-maint virt-maint
              Lei Yang Lei Yang
              Votes:
              0 Vote for this issue
              Watchers:
              18 Start watching this issue

                Created:
                Updated:
                Resolved: