qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 33e512: net/tap: Added TUNSETSTEERINGEBPF cod


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 33e512: net/tap: Added TUNSETSTEERINGEBPF code.
Date: Tue, 11 May 2021 08:14:00 -0700

  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 33e512b3b65df5275bc31322358432ef9a73fc00
      
https://github.com/qemu/qemu/commit/33e512b3b65df5275bc31322358432ef9a73fc00
  Author: Andrew Melnychenko <andrew@daynix.com>
  Date:   2021-05-08 (Sat, 08 May 2021)

  Changed paths:
    M net/tap-linux.h

  Log Message:
  -----------
  net/tap: Added TUNSETSTEERINGEBPF code.

Additional code that will be used for eBPF setting steering routine.

Signed-off-by: Andrew Melnychenko <andrew@daynix.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 56ef95ff22a9e2a69948ca35b1edf84646025438
      
https://github.com/qemu/qemu/commit/56ef95ff22a9e2a69948ca35b1edf84646025438
  Author: Andrew Melnychenko <andrew@daynix.com>
  Date:   2021-05-08 (Sat, 08 May 2021)

  Changed paths:
    M include/net/net.h
    M net/tap-bsd.c
    M net/tap-linux.c
    M net/tap-solaris.c
    M net/tap-stub.c
    M net/tap.c
    M net/tap_int.h

  Log Message:
  -----------
  net: Added SetSteeringEBPF method for NetClientState.

For now, that method supported only by Linux TAP.
Linux TAP uses TUNSETSTEERINGEBPF ioctl.

Signed-off-by: Andrew Melnychenko <andrew@daynix.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 403a40753daacadac2408568f10ba8914da1c5a8
      
https://github.com/qemu/qemu/commit/403a40753daacadac2408568f10ba8914da1c5a8
  Author: Andrew Melnychenko <andrew@daynix.com>
  Date:   2021-05-08 (Sat, 08 May 2021)

  Changed paths:
    A tools/ebpf/Makefile.ebpf
    A tools/ebpf/rss.bpf.c

  Log Message:
  -----------
  ebpf: Added eBPF RSS program.

RSS program and Makefile to build it.
The bpftool used to generate '.h' file.
The data in that file may be loaded by libbpf.
EBPF compilation is not required for building qemu.
You can use Makefile if you need to regenerate rss.bpf.skeleton.h.

Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Signed-off-by: Andrew Melnychenko <andrew@daynix.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 5d02a41c506b4b8131632e1aa5313066fc327c43
      
https://github.com/qemu/qemu/commit/5d02a41c506b4b8131632e1aa5313066fc327c43
  Author: Andrew Melnychenko <andrew@daynix.com>
  Date:   2021-05-08 (Sat, 08 May 2021)

  Changed paths:
    M configure
    A ebpf/ebpf_rss-stub.c
    A ebpf/ebpf_rss.c
    A ebpf/ebpf_rss.h
    A ebpf/meson.build
    A ebpf/rss.bpf.skeleton.h
    A ebpf/trace-events
    A ebpf/trace.h
    M meson.build
    M meson_options.txt

  Log Message:
  -----------
  ebpf: Added eBPF RSS loader.

Added function that loads RSS eBPF program.
Added stub functions for RSS eBPF loader.
Added meson and configuration options.

By default, eBPF feature enabled if libbpf is present in the build system.
libbpf checked in configuration shell script and meson script.

Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Signed-off-by: Andrew Melnychenko <andrew@daynix.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: ba90be83b3350bbde65fa0081e691396f314383d
      
https://github.com/qemu/qemu/commit/ba90be83b3350bbde65fa0081e691396f314383d
  Author: Andrew Melnychenko <andrew@daynix.com>
  Date:   2021-05-08 (Sat, 08 May 2021)

  Changed paths:
    M hw/net/vhost_net.c
    M hw/net/virtio-net.c
    M include/hw/virtio/virtio-net.h
    M net/vhost-vdpa.c

  Log Message:
  -----------
  virtio-net: Added eBPF RSS to virtio-net.

When RSS is enabled the device tries to load the eBPF program
to select RX virtqueue in the TUN. If eBPF can be loaded
the RSS will function also with vhost (works with kernel 5.8 and later).
Software RSS is used as a fallback with vhost=off when eBPF can't be loaded
or when hash population requested by the guest.

Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Signed-off-by: Andrew Melnychenko <andrew@daynix.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: bb8028acfbcd28a689819e65d29d968c89ff1c2b
      
https://github.com/qemu/qemu/commit/bb8028acfbcd28a689819e65d29d968c89ff1c2b
  Author: Andrew Melnychenko <andrew@daynix.com>
  Date:   2021-05-08 (Sat, 08 May 2021)

  Changed paths:
    A docs/devel/ebpf_rss.rst
    M docs/devel/index.rst

  Log Message:
  -----------
  docs: Added eBPF documentation.

Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Signed-off-by: Andrew Melnychenko <andrew@daynix.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 5dc3d7453bfc0da82eafc5ff5bd9ba7833249b9d
      
https://github.com/qemu/qemu/commit/5dc3d7453bfc0da82eafc5ff5bd9ba7833249b9d
  Author: Andrew Melnychenko <andrew@daynix.com>
  Date:   2021-05-08 (Sat, 08 May 2021)

  Changed paths:
    M MAINTAINERS

  Log Message:
  -----------
  MAINTAINERS: Added eBPF maintainers information.

Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Signed-off-by: Andrew Melnychenko <andrew@daynix.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 28da7b38e19a2158a8191453504ee9e41fcb85da
      
https://github.com/qemu/qemu/commit/28da7b38e19a2158a8191453504ee9e41fcb85da
  Author: Guenter Roeck <linux@roeck-us.net>
  Date:   2021-05-08 (Sat, 08 May 2021)

  Changed paths:
    M hw/net/imx_fec.c
    M hw/net/trace-events

  Log Message:
  -----------
  hw/net/imx_fec: return 0xffff when accessing non-existing PHY

If a PHY does not exist, attempts to read from it should return 0xffff.
Otherwise the Linux kernel will believe that a PHY is there and select
the non-existing PHY. This in turn will result in network errors later
on since the real PHY is not selected or configured.

Since reading from or writing to a non-existing PHY is not an emulation
error, replace guest error messages with traces.

Fixes: 461c51ad4275 ("Add a phy-num property to the i.MX FEC emulator")
Cc: Jean-Christophe Dubois <jcd@tribudubois.net>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Philippe Mathieu-Daud茅 <f4bug@amsat.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: a7eca58380f9589bb1bb6333ccfb58869734edb6
      
https://github.com/qemu/qemu/commit/a7eca58380f9589bb1bb6333ccfb58869734edb6
  Author: Laurent Vivier <lvivier@redhat.com>
  Date:   2021-05-08 (Sat, 08 May 2021)

  Changed paths:
    M hw/net/virtio-net.c

  Log Message:
  -----------
  virtio-net: failover: add missing remove_migration_state_change_notifier()

In the failover case configuration, virtio_net_device_realize() uses an
add_migration_state_change_notifier() to add a state notifier, but this
notifier is not removed by the unrealize function when the virtio-net
card is unplugged.

If the card is unplugged and a migration is started, the notifier is
called and as it is not valid anymore QEMU crashes.

This patch fixes the problem by adding the
remove_migration_state_change_notifier() in virtio_net_device_unrealize().

The problem can be reproduced with:

  $ qemu-system-x86_64 -enable-kvm -m 1g -M q35 \
    -device pcie-root-port,slot=4,id=root1 \
    -device pcie-root-port,slot=5,id=root2 \
    -device virtio-net-pci,id=net1,mac=52:54:00:6f:55:cc,failover=on,bus=root1 \
    -monitor stdio disk.qcow2
  (qemu) device_del net1
  (qemu) migrate "exec:gzip -c > STATEFILE.gz"

  Thread 1 "qemu-system-x86" received signal SIGSEGV, Segmentation fault.
  0x0000000000000000 in ?? ()
  (gdb) bt
  #0  0x0000000000000000 in  ()
  #1  0x0000555555d726d7 in notifier_list_notify (...)
      at .../util/notify.c:39
  #2  0x0000555555842c1a in migrate_fd_connect (...)
      at .../migration/migration.c:3975
  #3  0x0000555555950f7d in migration_channel_connect (...)
      error@entry=0x0) at .../migration/channel.c:107
  #4  0x0000555555910922 in exec_start_outgoing_migration (...)
      at .../migration/exec.c:42

Reported-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 2bdeb0c2564c36b218ac73e21d7a6f6accb49091
      
https://github.com/qemu/qemu/commit/2bdeb0c2564c36b218ac73e21d7a6f6accb49091
  Author: Brad Smith <brad@comstyle.com>
  Date:   2021-05-08 (Sat, 08 May 2021)

  Changed paths:
    M net/tap-bsd.c

  Log Message:
  -----------
  tap-bsd: Remove special casing for older OpenBSD releases

OpenBSD added support for tap(4) 10 releases ago.

Remove the special casing for older releases.

Signed-off-by: Brad Smith <brad@comstyle.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 44cff35f23775840df057e12c775eaef245c3be1
      
https://github.com/qemu/qemu/commit/44cff35f23775840df057e12c775eaef245c3be1
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2021-05-11 (Tue, 11 May 2021)

  Changed paths:
    M MAINTAINERS
    M configure
    A docs/devel/ebpf_rss.rst
    M docs/devel/index.rst
    A ebpf/ebpf_rss-stub.c
    A ebpf/ebpf_rss.c
    A ebpf/ebpf_rss.h
    A ebpf/meson.build
    A ebpf/rss.bpf.skeleton.h
    A ebpf/trace-events
    A ebpf/trace.h
    M hw/net/imx_fec.c
    M hw/net/trace-events
    M hw/net/vhost_net.c
    M hw/net/virtio-net.c
    M include/hw/virtio/virtio-net.h
    M include/net/net.h
    M meson.build
    M meson_options.txt
    M net/tap-bsd.c
    M net/tap-linux.c
    M net/tap-linux.h
    M net/tap-solaris.c
    M net/tap-stub.c
    M net/tap.c
    M net/tap_int.h
    M net/vhost-vdpa.c
    A tools/ebpf/Makefile.ebpf
    A tools/ebpf/rss.bpf.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into 
staging

# gpg: Signature made Sat 08 May 2021 08:09:54 BST
# gpg:                using RSA key EF04965B398D6211
# gpg: Good signature from "Jason Wang (Jason Wang on RedHat) 
<jasowang@redhat.com>" [marginal]
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg:          It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 215D 46F4 8246 689E C77F  3562 EF04 965B 398D 6211

* remotes/jasowang/tags/net-pull-request:
  tap-bsd: Remove special casing for older OpenBSD releases
  virtio-net: failover: add missing remove_migration_state_change_notifier()
  hw/net/imx_fec: return 0xffff when accessing non-existing PHY
  MAINTAINERS: Added eBPF maintainers information.
  docs: Added eBPF documentation.
  virtio-net: Added eBPF RSS to virtio-net.
  ebpf: Added eBPF RSS loader.
  ebpf: Added eBPF RSS program.
  net: Added SetSteeringEBPF method for NetClientState.
  net/tap: Added TUNSETSTEERINGEBPF code.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


Compare: https://github.com/qemu/qemu/compare/f9a576a81804...44cff35f2377



reply via email to

[Prev in Thread] Current Thread [Next in Thread]