Re: [PATCH 2/3] virtio-net: Convert feature properties to OnOffAuto

2024-04-30 Thread Yuri Benditovich
Question: How will libvirt (as an example) work with this change. In the existing semantic of libvirt profile the "on" means "on if possible" and using existing profile after qemu update will still use "on" with meaning "force"? Typically this is solved by machine type - if libvirt uses

Re: [PATCH 1/3] qdev-properties: Add DEFINE_PROP_ON_OFF_AUTO_BIT64()

2024-04-30 Thread Yuri Benditovich
On Sun, Apr 28, 2024 at 10:21 AM Akihiko Odaki wrote: > > DEFINE_PROP_ON_OFF_AUTO_BIT64() corresponds to DEFINE_PROP_ON_OFF_AUTO() > as DEFINE_PROP_BIT64() corresponds to DEFINE_PROP_BOOL(). The difference > is that DEFINE_PROP_ON_OFF_AUTO_BIT64() exposes OnOffAuto instead of > bool. > >

Re: [PATCH v9 13/20] virtio-net: Return an error when vhost cannot enable RSS

2024-04-20 Thread Yuri Benditovich
On Tue, Apr 16, 2024 at 9:54 AM Akihiko Odaki wrote: > > On 2024/04/16 13:00, Jason Wang wrote: > > On Mon, Apr 15, 2024 at 10:05 PM Yuri Benditovich > > wrote: > >> > >> On Wed, Apr 3, 2024 at 2:11 PM Akihiko Odaki > >> wrote: >

Re: [PATCH v9 13/20] virtio-net: Return an error when vhost cannot enable RSS

2024-04-16 Thread Yuri Benditovich
On Wed, Apr 3, 2024 at 2:11 PM Akihiko Odaki wrote: > > vhost requires eBPF for RSS. When eBPF is not available, virtio-net > implicitly disables RSS even if the user explicitly requests it. Return > an error instead of implicitly disabling RSS if RSS is requested but not > available. > >

Re: [PATCH v9 13/20] virtio-net: Return an error when vhost cannot enable RSS

2024-04-16 Thread Yuri Benditovich
On Tue, Apr 16, 2024 at 10:14 AM Jason Wang wrote: > > On Tue, Apr 16, 2024 at 1:43 PM Yuri Benditovich > wrote: > > > > On Tue, Apr 16, 2024 at 7:00 AM Jason Wang wrote: > > > > > > On Mon, Apr 15, 2024 at 10:05 PM Yuri Benditovich > > > wrote

Re: [PATCH v9 13/20] virtio-net: Return an error when vhost cannot enable RSS

2024-04-15 Thread Yuri Benditovich
On Tue, Apr 16, 2024 at 7:00 AM Jason Wang wrote: > > On Mon, Apr 15, 2024 at 10:05 PM Yuri Benditovich > wrote: > > > > On Wed, Apr 3, 2024 at 2:11 PM Akihiko Odaki > > wrote: > > > > > > vhost requires eBPF for RSS. When eBPF is not available,

Re: [PATCH v9 13/20] virtio-net: Return an error when vhost cannot enable RSS

2024-04-15 Thread Yuri Benditovich
On Wed, Apr 3, 2024 at 2:11 PM Akihiko Odaki wrote: > > vhost requires eBPF for RSS. When eBPF is not available, virtio-net > implicitly disables RSS even if the user explicitly requests it. Return > an error instead of implicitly disabling RSS if RSS is requested but not > available. > >

Re: [PATCH v9 17/20] ebpf: Fix RSS error handling

2024-04-13 Thread Yuri Benditovich
On Wed, Apr 3, 2024 at 2:12 PM Akihiko Odaki wrote: > > calculate_rss_hash() was using hash value 0 to tell if it calculated > a hash, but the hash value may be 0 on a rare occasion. Have a > distinct bool value for correctness. This is interesting question whether in reality the hash value

Re: [PATCH v9 16/20] virtio-net: Do not write hashes to peer buffer

2024-04-08 Thread Yuri Benditovich
On Mon, Apr 8, 2024 at 10:57 AM Akihiko Odaki wrote: > > On 2024/04/08 16:54, Yuri Benditovich wrote: > > On Mon, Apr 8, 2024 at 10:42 AM Akihiko Odaki > > wrote: > >> > >> On 2024/04/08 16:40, Yuri Benditovich wrote: > >>> On Mon, Ap

Re: [PATCH v9 16/20] virtio-net: Do not write hashes to peer buffer

2024-04-08 Thread Yuri Benditovich
On Mon, Apr 8, 2024 at 10:42 AM Akihiko Odaki wrote: > > On 2024/04/08 16:40, Yuri Benditovich wrote: > > On Mon, Apr 8, 2024 at 4:30 AM Akihiko Odaki > > wrote: > >> > >> On 2024/04/08 7:09, Yuri Benditovich wrote: > >>> On Wed, Ap

Re: [PATCH v9 16/20] virtio-net: Do not write hashes to peer buffer

2024-04-08 Thread Yuri Benditovich
On Mon, Apr 8, 2024 at 4:30 AM Akihiko Odaki wrote: > > On 2024/04/08 7:09, Yuri Benditovich wrote: > > On Wed, Apr 3, 2024 at 2:12 PM Akihiko Odaki > > wrote: > >> > >> The peer buffer is qualified with const and not meant to be modified. > > > &g

Re: [PATCH v9 16/20] virtio-net: Do not write hashes to peer buffer

2024-04-07 Thread Yuri Benditovich
On Wed, Apr 3, 2024 at 2:12 PM Akihiko Odaki wrote: > > The peer buffer is qualified with const and not meant to be modified. IMHO, this buffer is not so 'const' (although the prototype states so), it is allocated in net.c btw, another procedure in this file also modifies the buffer

Re: [PATCH v9 13/20] virtio-net: Return an error when vhost cannot enable RSS

2024-04-07 Thread Yuri Benditovich
On Wed, Apr 3, 2024 at 2:11 PM Akihiko Odaki wrote: > > vhost requires eBPF for RSS. When eBPF is not available, virtio-net > implicitly disables RSS even if the user explicitly requests it. Return > an error instead of implicitly disabling RSS if RSS is requested but not > available. > >

Re: [PATCH v2 2/2] ebpf: Fix indirections table setting

2024-03-28 Thread Yuri Benditovich
Hi Andrew, Can you please check the indirection table copy and ack on the patch if the fix is correct Thanks, Yuri On Wed, Mar 27, 2024 at 4:05 AM Akihiko Odaki wrote: > > The kernel documentation says: > > The value stored can be of any size, however, all array elements are > > aligned to 8

Re: [PATCH] virtio-net: correctly copy vnet header when flushing TX

2024-01-02 Thread Yuri Benditovich
he header swap might lead a stack > overflow in this case. Fixing this by using virtio_net_hdr_v1_hash > instead. > > Reported-by: Xiao Lei > Cc: Yuri Benditovich > Cc: qemu-sta...@nongnu.org > Cc: Mauro Matteo Cascella > Fixes: CVE-2023-6693 > Fixes: e22f0603fb2f (&

Re: [PATCH v7 4/5] qmp: Added new command to retrieve eBPF blob.

2023-12-18 Thread Yuri Benditovich
On Mon, Dec 18, 2023 at 2:54 PM Markus Armbruster wrote: > Uh, I missed this one, my apologies! Let me have a quick look... > > Commit message style nitpick: > > qmp: Add command to retrieve eBPF blob > > or > > qmp: New command to retrieve eBPF blob > > It's a title, not a sentence. >

Re: [PATCH v7 5/5] ebpf: Updated eBPF program and skeleton.

2023-12-14 Thread Yuri Benditovich
Benditovich < yuri.benditov...@daynix.com> wrote: > > On Tue, Dec 12, 2023 at 5:33 AM Jason Wang wrote: > >> On Mon, Dec 11, 2023 at 7:51 PM Yuri Benditovich >> wrote: >> > >> > Hello Jason, >> > Can you please let us know what happens wi

Re: [PATCH v7 5/5] ebpf: Updated eBPF program and skeleton.

2023-12-12 Thread Yuri Benditovich
On Tue, Dec 12, 2023 at 5:33 AM Jason Wang wrote: > On Mon, Dec 11, 2023 at 7:51 PM Yuri Benditovich > wrote: > > > > Hello Jason, > > Can you please let us know what happens with this series? > > It should be my bad, it is in V1 of the pull request but missed &g

Re: [PATCH v8 00/19] virtio-net RSS/hash report fixes and improvements

2023-12-11 Thread Yuri Benditovich
I'm adding also Yan On Mon, Dec 11, 2023 at 9:51 PM Yuri Benditovich < yuri.benditov...@daynix.com> wrote: > Hi Michael, > Sure, I've reviewed that also, there was a fruitful discussion > till the series rеаched its final form. > At the beginning of September we've got the r

Re: [PATCH v8 00/19] virtio-net RSS/hash report fixes and improvements

2023-12-11 Thread Yuri Benditovich
, let's wait for Jason response. Thanks, Yuri On Mon, Dec 11, 2023 at 5:43 PM Michael S. Tsirkin wrote: > On Mon, Dec 11, 2023 at 02:34:56PM +0200, Yuri Benditovich wrote: > > https://lists.gnu.org/archive/html/qemu-devel/2023-08/msg05859.html > > It's from August, I think it's f

Re: [PATCH v7 1/5] ebpf: Added eBPF map update through mmap.

2023-12-11 Thread Yuri Benditovich
Akihiko, This series was already discussed several months ago. I'd suggest to postpone commenting on it and resume them after merging. Thanks for understanding. Yuri On Mon, Dec 11, 2023 at 3:05 PM Akihiko Odaki wrote: > On 2023/08/31 15:51, Andrew Melnychenko wrote: > > Changed eBPF map

Re: [PATCH v8 00/19] virtio-net RSS/hash report fixes and improvements

2023-12-11 Thread Yuri Benditovich
https://lists.gnu.org/archive/html/qemu-devel/2023-08/msg05859.html On Mon, Dec 11, 2023 at 2:01 PM Akihiko Odaki wrote: > On 2023/12/11 20:54, Yuri Benditovich wrote: > > People, I suggest to wait a little and understand what happens with the > > previous series from And

Re: [PATCH v8 00/19] virtio-net RSS/hash report fixes and improvements

2023-12-11 Thread Yuri Benditovich
People, I suggest to wait a little and understand what happens with the previous series from Andrew Melnichenko (support for qemu under libvirt etc) According to response from Jason from Sept 8 it was queued but I do not see it in the master branch. Thanks a lot. On Sun, Dec 10, 2023 at 7:30 AM

Re: [PATCH v7 5/5] ebpf: Updated eBPF program and skeleton.

2023-12-11 Thread Yuri Benditovich
Hello Jason, Can you please let us know what happens with this series? Thanks Yuri On Fri, Sep 8, 2023 at 9:43 AM Jason Wang wrote: > On Mon, Sep 4, 2023 at 7:23 PM Andrew Melnichenko > wrote: > > > > Hi Jason, > > According to our previous conversation, I've added checks to the meson >

Re: [PATCH v6 11/21] virtio-net: Return an error when vhost cannot enable RSS

2023-11-14 Thread Yuri Benditovich
On Tue, Nov 14, 2023 at 9:03 AM Akihiko Odaki wrote: > On 2023/11/14 2:26, Yuri Benditovich wrote: > > > > > > On Mon, Nov 13, 2023 at 2:44 PM Akihiko Odaki > <mailto:akihiko.od...@daynix.com>> wrote: > > > >

Re: [PATCH v6 11/21] virtio-net: Return an error when vhost cannot enable RSS

2023-11-13 Thread Yuri Benditovich
On Mon, Nov 13, 2023 at 2:44 PM Akihiko Odaki wrote: > On 2023/11/13 20:44, Yuri Benditovich wrote: > > > > > > On Sat, Nov 11, 2023 at 5:28 PM Akihiko Odaki > <mailto:akihiko.od...@daynix.com>> wrote: > > > >

Re: [PATCH v6 11/21] virtio-net: Return an error when vhost cannot enable RSS

2023-11-13 Thread Yuri Benditovich
On Sat, Nov 11, 2023 at 5:28 PM Akihiko Odaki wrote: > On 2023/11/03 22:14, Yuri Benditovich wrote: > > > > > > On Fri, Nov 3, 2023 at 11:55 AM Akihiko Odaki > <mailto:akihiko.od...@daynix.com>> wrote: > > > >

Re: [PATCH v6 15/21] virtio-net: Do not clear VIRTIO_NET_F_HASH_REPORT

2023-11-03 Thread Yuri Benditovich
On Mon, Oct 30, 2023 at 7:15 AM Akihiko Odaki wrote: > virtio-net can report hash values even if the peer does not have a > virtio-net header. > > Signed-off-by: Akihiko Odaki > --- > hw/net/virtio-net.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/hw/net/virtio-net.c

Re: [PATCH v6 11/21] virtio-net: Return an error when vhost cannot enable RSS

2023-11-03 Thread Yuri Benditovich
On Fri, Nov 3, 2023 at 11:55 AM Akihiko Odaki wrote: > On 2023/11/03 18:35, Yuri Benditovich wrote: > > > > > > On Thu, Nov 2, 2023 at 4:56 PM Akihiko Odaki > <mailto:akihiko.od...@daynix.com>> wrote: > > > >

Re: [PATCH v6 11/21] virtio-net: Return an error when vhost cannot enable RSS

2023-11-03 Thread Yuri Benditovich
On Thu, Nov 2, 2023 at 4:56 PM Akihiko Odaki wrote: > On 2023/11/02 19:20, Yuri Benditovich wrote: > > > > > > On Thu, Nov 2, 2023 at 11:33 AM Michael S. Tsirkin > <mailto:m...@redhat.com>> wrote: > > > > On Thu, Nov 02, 2023 at 11:09:27AM +0200

Re: [PATCH v6 11/21] virtio-net: Return an error when vhost cannot enable RSS

2023-11-02 Thread Yuri Benditovich
On Thu, Nov 2, 2023 at 1:26 PM Michael S. Tsirkin wrote: > On Thu, Nov 02, 2023 at 12:20:39PM +0200, Yuri Benditovich wrote: > > > > > > On Thu, Nov 2, 2023 at 11:33 AM Michael S. Tsirkin > wrote: > > > > On Thu, Nov 02, 2023 at 11:09:27AM +0200, Yuri B

Re: [PATCH v6 11/21] virtio-net: Return an error when vhost cannot enable RSS

2023-11-02 Thread Yuri Benditovich
On Thu, Nov 2, 2023 at 11:33 AM Michael S. Tsirkin wrote: > On Thu, Nov 02, 2023 at 11:09:27AM +0200, Yuri Benditovich wrote: > > Probably we mix two different patches in this discussion. > > Focusing on the patch in the e-mail header: > > > > IMO it is not acceptab

Re: [PATCH v6 11/21] virtio-net: Return an error when vhost cannot enable RSS

2023-11-02 Thread Yuri Benditovich
Probably we mix two different patches in this discussion. Focusing on the patch in the e-mail header: IMO it is not acceptable to fail QEMU run for one feature that we can't make active when we silently drop all other features in such a case. On Wed, Nov 1, 2023 at 11:15 AM Akihiko Odaki wrote:

Re: [PATCH v6 11/21] virtio-net: Return an error when vhost cannot enable RSS

2023-10-30 Thread Yuri Benditovich
On Mon, Oct 30, 2023 at 2:21 PM Akihiko Odaki wrote: > On 2023/10/30 21:14, Yuri Benditovich wrote: > > > > > > On Mon, Oct 30, 2023 at 7:14 AM Akihiko Odaki > <mailto:akihiko.od...@daynix.com>> wrote: > > > > vhost requires eBPF fo

Re: [PATCH v6 12/21] virtio-net: Enable software RSS

2023-10-30 Thread Yuri Benditovich
On Mon, Oct 30, 2023 at 7:14 AM Akihiko Odaki wrote: > virtio-net implements software RSS but does not enable it. Enable it > when RSS is requested, but the eBPF implementation is not available. > We also check if vhost is in use in such a case since software RSS is > incompatible with vhost. A

Re: [PATCH v6 11/21] virtio-net: Return an error when vhost cannot enable RSS

2023-10-30 Thread Yuri Benditovich
On Mon, Oct 30, 2023 at 7:14 AM Akihiko Odaki wrote: > vhost requires eBPF for RSS. When eBPF is not available, virtio-net > implicitly disables RSS even if the user explicitly requests it. Return > an error instead of implicitly disabling RSS if RSS is requested but not > available. > I think

Re: [PATCH v5 11/21] virtio-net: Return an error when vhost cannot enable RSS

2023-10-29 Thread Yuri Benditovich
On Tue, Oct 17, 2023 at 7:10 AM Akihiko Odaki wrote: > vhost requires eBPF for RSS. Even when eBPF is not available, virtio-net > reported RSS availability, and raised a warning only after the > guest requested RSS, and the guest could not know that RSS is not > available. > > The existing code

Re: [PATCH v5 15/21] virtio-net: Do not clear VIRTIO_NET_F_HASH_REPORT

2023-10-29 Thread Yuri Benditovich
This patch allows VIRTIO_NET_F_HASH_REPORT feature to the adapter whose backend does not have a virtio header and does not have offload features that depend on it. The migration between such different systems is very problematic even if it seems successful, such setups are not

Re: [PATCH v2 0/4] virtio-net: add USO feature (UDP segmentation offload)

2023-08-09 Thread Yuri Benditovich
ping On Tue, Aug 1, 2023 at 1:32 AM Yuri Benditovich wrote: > Starting from 6.2 the kernel supports UDP segmentation offload, it > uses GSO_UDP_L4 to mark packets with UDP sermentation request > > v1->v2: > Enable USO features by default starting from 8.1 > Move co

[PATCH v2 0/4] virtio-net: add USO feature (UDP segmentation offload)

2023-07-31 Thread Yuri Benditovich
ice. virtio-net: Add USO flags to vhost support. Yuri Benditovich (2): tap: Add check for USO features virtio-net: Add support for USO features hw/core/machine.c| 4 hw/net/e1000e_core.c | 2 +- hw/net/igb_core.c| 2 +- hw/net/vhost_net.c | 3 +++ hw/net/virtio-net.c |

[PATCH v2 4/4] virtio-net: Add support for USO features

2023-07-31 Thread Yuri Benditovich
USO features of virtio-net device depend on kernel ability to support them, for backward compatibility by default the features are disabled on 8.0 and earlier. Signed-off-by: Yuri Benditovich Signed-off-by: Andrew Melnychecnko --- hw/core/machine.c | 4 hw/net/virtio-net.c | 31

[PATCH v2 1/4] tap: Add USO support to tap device.

2023-07-31 Thread Yuri Benditovich
From: Andrew Melnychenko Passing additional parameters (USOv4 and USOv6 offloads) when setting TAP offloads Signed-off-by: Yuri Benditovich Signed-off-by: Andrew Melnychenko --- hw/net/e1000e_core.c | 2 +- hw/net/igb_core.c| 2 +- hw/net/virtio-net.c | 4 +++- hw/net/vmxnet3.c

[PATCH v2 3/4] virtio-net: Add USO flags to vhost support.

2023-07-31 Thread Yuri Benditovich
From: Andrew Melnychenko New features are subject to check with vhost-user and vdpa. Signed-off-by: Yuri Benditovich Signed-off-by: Andrew Melnychenko --- hw/net/vhost_net.c | 3 +++ net/vhost-vdpa.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/hw/net/vhost_net.c b/hw/net

[PATCH v2 2/4] tap: Add check for USO features

2023-07-31 Thread Yuri Benditovich
Tap indicates support for USO features according to capabilities of current kernel module. Signed-off-by: Yuri Benditovich Signed-off-by: Andrew Melnychecnko --- include/net/net.h | 3 +++ net/net.c | 9 + net/tap-bsd.c | 5 + net/tap-linux.c | 12 net

[PATCH] pci: do not respond config requests after PCI device eject

2023-07-28 Thread Yuri Benditovich
after the migration. Signed-off-by: Yuri Benditovich --- hw/pci/pci_host.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/hw/pci/pci_host.c b/hw/pci/pci_host.c index 7af8afdcbe..a18aa0a8d4 100644 --- a/hw/pci/pci_host.c +++ b/hw/pci/pci_host.c @@ -62,6 +62,17

Re: [PATCH 3/4] virtio-net: added USO support

2023-07-20 Thread Yuri Benditovich
On Thu, Jul 20, 2023 at 3:37 AM Akihiko Odaki wrote: > On 2023/07/20 0:21, Yuri Benditovich wrote: > > virtio-net can suggest USO features TX, RX v4 and RX v6, > > depending on kernel TUN ability to support them. These > > features require explicit enable in command-line. &g

Re: [PATCH 1/4] tap: Added USO support to tap device.

2023-07-20 Thread Yuri Benditovich
On Thu, Jul 20, 2023 at 3:31 AM Akihiko Odaki wrote: > Nitpicking: the subject of this patch is somewhat unconventional. What > about: "tap: Add USO support to tap device"? > > Will take it in account in v2 > On 2023/07/20 0:21, Yuri Benditovich wrote: >

[PATCH 2/4] virtio-net: Added USO flags to vhost support.

2023-07-19 Thread Yuri Benditovich
From: Andrew Melnychenko New features are subject to check with vhost-user and vdpa. Signed-off-by: Yuri Benditovich Signed-off-by: Andrew Melnychenko --- hw/net/vhost_net.c | 3 +++ net/vhost-vdpa.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/hw/net/vhost_net.c b/hw/net

[PATCH 1/4] tap: Added USO support to tap device.

2023-07-19 Thread Yuri Benditovich
From: Andrew Melnychenko Passing additional parameters (USOv4 and USOv6 offloads) when setting TAP offloads Signed-off-by: Yuri Benditovich Signed-off-by: Andrew Melnychenko --- hw/net/e1000e_core.c | 2 +- hw/net/igb_core.c| 2 +- hw/net/virtio-net.c | 4 +++- hw/net/vmxnet3.c

[PATCH 0/4] virtio-net: add USO feature (UDP segmentation offload)

2023-07-19 Thread Yuri Benditovich
Starting from 6.2 the kernel supports UDP segmentation offload, the kernel uses GSO_UDP_L4 to mark packets with USB sermentation request Andrew Melnychenko (3): tap: Added USO support to tap device. virtio-net: Added USO flags to vhost support. virtio-net: Added uso check Yuri

[PATCH 4/4] virtio-net: Added uso check

2023-07-19 Thread Yuri Benditovich
From: Andrew Melnychenko Added tap uso check with stubs for non-Linux systems. Signed-off-by: Yuri Benditovich Signed-off-by: Andrew Melnychenko --- hw/net/virtio-net.c | 15 +++ include/net/net.h | 3 +++ net/net.c | 9 + net/tap-bsd.c | 5 + net

[PATCH 3/4] virtio-net: added USO support

2023-07-19 Thread Yuri Benditovich
virtio-net can suggest USO features TX, RX v4 and RX v6, depending on kernel TUN ability to support them. These features require explicit enable in command-line. Signed-off-by: Yuri Benditovich --- hw/net/virtio-net.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff

Re: [PATCH 3/5] qmp: Added the helper stamp check.

2023-02-28 Thread Yuri Benditovich
On Tue, Feb 28, 2023 at 8:05 PM Daniel P. Berrangé wrote: > On Tue, Feb 28, 2023 at 11:56:27AM +0200, Yuri Benditovich wrote: > > On Mon, Feb 20, 2023 at 11:50 AM Daniel P. Berrangé > > > wrote: > > > > > On Sun, Feb 19, 2023 at 06:20:58PM +0200, Andrew

Re: [PATCH 3/5] qmp: Added the helper stamp check.

2023-02-28 Thread Yuri Benditovich
On Mon, Feb 20, 2023 at 11:50 AM Daniel P. Berrangé wrote: > On Sun, Feb 19, 2023 at 06:20:58PM +0200, Andrew Melnychenko wrote: > > Added a function to check the stamp in the helper. > > eBPF helper should have a special symbol that generates during the build. > > QEMU checks the helper and

Re: [PATCH 3/3] contrib/elf2dmp: add PE name check and Windows Server 2022 support

2021-11-04 Thread Yuri Benditovich
range is > full of invalid PE fragments and the tool must check that PE image > is 'ntoskrnl.exe' actually. > So, introduce additional validation by checking image name from > Export Directory against 'ntoskrnl.exe'. > > Signed-off-by: Viktor Prutyanov Tested-by: Yuri Benditovich

Re: [PATCH 4/5] ebpf_rss_helper: Added helper for eBPF RSS.

2021-09-09 Thread Yuri Benditovich
On Thu, Sep 9, 2021 at 4:16 AM Jason Wang wrote: > > On Thu, Sep 9, 2021 at 8:00 AM Yuri Benditovich > wrote: > > > > On Wed, Sep 8, 2021 at 6:45 AM Jason Wang wrote: > > > > > > On Tue, Sep 7, 2021 at 6:40 PM Yuri Benditovich > > > wrote: >

Re: [PATCH 4/5] ebpf_rss_helper: Added helper for eBPF RSS.

2021-09-08 Thread Yuri Benditovich
On Wed, Sep 8, 2021 at 6:45 AM Jason Wang wrote: > > On Tue, Sep 7, 2021 at 6:40 PM Yuri Benditovich > wrote: > > > > On Wed, Sep 1, 2021 at 9:42 AM Jason Wang wrote: > > > > > > > > > 在 2021/8/31 上午1:07, Yuri Benditovich 写道: > >

Re: [PATCH 4/5] ebpf_rss_helper: Added helper for eBPF RSS.

2021-09-07 Thread Yuri Benditovich
On Wed, Sep 1, 2021 at 9:42 AM Jason Wang wrote: > > > 在 2021/8/31 上午1:07, Yuri Benditovich 写道: > > On Fri, Aug 20, 2021 at 6:41 AM Jason Wang wrote: > >> > >> 在 2021/7/13 下午11:37, Andrew Melnychenko 写道: > >>> Helper program. Loads eBPF RSS program

Re: [PATCH 4/5] ebpf_rss_helper: Added helper for eBPF RSS.

2021-08-30 Thread Yuri Benditovich
On Fri, Aug 20, 2021 at 6:41 AM Jason Wang wrote: > > > 在 2021/7/13 下午11:37, Andrew Melnychenko 写道: > > Helper program. Loads eBPF RSS program and maps and passes them through > > unix socket. > > Libvirt may launch this helper and pass eBPF fds to qemu virtio-net. > > > I wonder if this can be

Re: [PATCH 5/5] qmp: Added qemu-ebpf-rss-path command.

2021-08-30 Thread Yuri Benditovich
On Mon, Aug 30, 2021 at 11:14 AM Markus Armbruster wrote: > > Yuri Benditovich writes: > > > On Mon, Aug 30, 2021 at 9:10 AM Markus Armbruster wrote: > >> > >> Yuri Benditovich writes: > >> > >> > On Tue, Aug 24, 2021 at 9:41 AM Ma

Re: [PATCH 5/5] qmp: Added qemu-ebpf-rss-path command.

2021-08-30 Thread Yuri Benditovich
On Mon, Aug 30, 2021 at 9:10 AM Markus Armbruster wrote: > > Yuri Benditovich writes: > > > On Tue, Aug 24, 2021 at 9:41 AM Markus Armbruster wrote: > >> > >> Andrew Melnichenko writes: > >> > >> > Hi, > >> > > >&g

Re: [PATCH 5/5] qmp: Added qemu-ebpf-rss-path command.

2021-08-29 Thread Yuri Benditovich
On Tue, Aug 24, 2021 at 9:41 AM Markus Armbruster wrote: > > Andrew Melnichenko writes: > > > Hi, > > > >> The helper may or may not be installed at the path compiled into QEMU. > >> > > Yes, so the helper will not be called - QEMU will try to initiate eBPF RSS > > or use "in-qemu" RSS. > > My

Re: [PATCH 0/5] ebpf: Added ebpf helper for libvirtd.

2021-08-16 Thread Yuri Benditovich
Jason, Can you please review the series? Thanks, Yuri On Thu, Jul 22, 2021 at 11:38 AM Andrew Melnichenko wrote: > > ping > > On Tue, Jul 13, 2021 at 6:38 PM Andrew Melnychenko wrote: >> >> Libvirt usually launches qemu with strict permissions. >> To enable eBPF RSS steering,

Re: [RFC PATCH 0/5] ebpf: Added ebpf helper for libvirtd.

2021-06-28 Thread Yuri Benditovich
On Wed, Jun 23, 2021 at 3:47 AM Jason Wang wrote: > > > 在 2021/6/22 下午5:09, Toke Høiland-Jørgensen 写道: > > Daniel P. Berrangé writes: > > > >> On Tue, Jun 22, 2021 at 10:25:19AM +0200, Toke Høiland-Jørgensen wrote: > >>> Jason Wang writes: > >&g

Re: [RFC PATCH 0/5] ebpf: Added ebpf helper for libvirtd.

2021-06-21 Thread Yuri Benditovich
> 2. Libvirt queries for qemu capabilities. > > > 3. One of the capabilities is "qemu-ebpf-rss-helper" > > path(if present). > > > 4. On NIC preparation Libvirt checks for virtio-net + rss > > configurations. >

Re: [RFC PATCH 0/5] ebpf: Added ebpf helper for libvirtd.

2021-06-10 Thread Yuri Benditovich
On Thu, Jun 10, 2021 at 9:41 AM Jason Wang wrote: > > > 在 2021/6/9 下午6:04, Andrew Melnychenko 写道: > > Libvirt usually launches qemu with strict permissions. > > To enable eBPF RSS steering, qemu-ebpf-rss-helper was added. > > > A silly question: > > Kernel had the following permission checks in

Re: [PATCH v5 0/7] eBPF RSS support for virtio-net

2021-05-17 Thread Yuri Benditovich
On Fri, May 14, 2021 at 4:43 PM Michael S. Tsirkin wrote: > > On Thu, Mar 25, 2021 at 05:35:22PM +0200, Andrew Melnychenko wrote: > > This set of patches introduces the usage of eBPF for packet steering > > and RSS hash calculation: > > * RSS(Receive Side Scaling) is used to distribute network

Re: [PATCH v5 0/7] eBPF RSS support for virtio-net

2021-04-01 Thread Yuri Benditovich
More correctly, https://bugzilla.redhat.com/show_bug.cgi?id=1865786 On Fri, Apr 2, 2021 at 8:21 AM Yuri Benditovich wrote: > > Hi Jason, > > Yes, the work to support RSS in the Linux virtio-net driver is in progress. > https://bugzilla.redhat.com/show_bug.cgi?id=1912082 > >

Re: [PATCH v5 0/7] eBPF RSS support for virtio-net

2021-04-01 Thread Yuri Benditovich
Hi Jason, Yes, the work to support RSS in the Linux virtio-net driver is in progress. https://bugzilla.redhat.com/show_bug.cgi?id=1912082 On Fri, Apr 2, 2021 at 5:57 AM Jason Wang wrote: > > > 在 2021/3/25 下午11:35, Andrew Melnychenko 写道: > > This set of patches introduces the usage of eBPF for

Re: [RFC PATCH v2 0/3] virtio-net: graceful drop of vhost for TAP

2021-03-26 Thread Yuri Benditovich
On Fri, Mar 26, 2021 at 10:51 AM Jason Wang wrote: > > > 在 2021/3/25 下午5:00, Yuri Benditovich 写道: > > Hi Jason, > > > > This was discussed earlier on the previous series of patches. > > https://lists.gnu.org/archive/html/qemu-devel/2021-02/msg01829.html > >

Re: [RFC PATCH v2 0/3] virtio-net: graceful drop of vhost for TAP

2021-03-25 Thread Yuri Benditovich
ailable. Thanks, Yuri On Thu, Mar 25, 2021 at 8:59 AM Jason Wang wrote: > > > 在 2021/3/22 下午8:24, Yuri Benditovich 写道: > > Allow fallback to userspace only upon migration, only for specific features > > and only if 'vhostforce' is not requested. > > > > Changes fro

Re: [PATCH v2 1/2] virtio-pci: add check for vdev in virtio_pci_isr_read

2021-03-23 Thread Yuri Benditovich
Ping On Mon, Mar 15, 2021 at 1:59 PM Yuri Benditovich wrote: > > https://bugzilla.redhat.com/show_bug.cgi?id=1743098 > This commit completes the solution of segfault in hot unplug flow > (by commit ccec7e9603f446fe75c6c563ba335c00cfda6a06). > Added missing check for vdev in virt

[RFC PATCH v2 3/3] virtio-net: implement missing_features_migrated callback

2021-03-22 Thread Yuri Benditovich
Graceful drop to userspace virtio in case selected features are missing on the destination system. Currently used for 3 features that might be supported by the vhost kernel on the source machine and not supported on the destination machine: rss, hash reporting, packed ring. Signed-off-by: Yuri

[RFC PATCH v2 2/3] virtio: introduce 'missing_features_migrated' device callback

2021-03-22 Thread Yuri Benditovich
This optional callback addresses migration problem in case some of negotiated features not present on the destination system. The device has a chance to avoid migration failure. Signed-off-by: Yuri Benditovich --- hw/virtio/virtio.c | 8 include/hw/virtio/virtio.h | 8

[RFC PATCH v2 0/3] virtio-net: graceful drop of vhost for TAP

2021-03-22 Thread Yuri Benditovich
Allow fallback to userspace only upon migration, only for specific features and only if 'vhostforce' is not requested. Changes from v1: Patch 1 dropeed (will be submitted in another series) Added device callback in case the migration should fail due to missing features Yuri Benditovich (3

[RFC PATCH v2 1/3] net: add ability to hide (disable) vhost_net

2021-03-22 Thread Yuri Benditovich
If 'vhost_net_disabled' in the NetClientState of the net device, get_vhost_net for TAP returns NULL. Network adapters can use this ability to hide the vhost_net temporary between resets in case some active features contradict with vhost. Signed-off-by: Yuri Benditovich --- hw/net/vhost_net.c

[PATCH v2 1/2] virtio-pci: add check for vdev in virtio_pci_isr_read

2021-03-15 Thread Yuri Benditovich
flatview_read at ../softmmu/physmem.c:2862 address_space_read_full at ../softmmu/physmem.c:2875 Signed-off-by: Yuri Benditovich --- hw/virtio/virtio-pci.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index 883045a223

[PATCH v2 2/2] virtio-pci: remove explicit initialization of val

2021-03-15 Thread Yuri Benditovich
The value is assigned later in this procedure. Signed-off-by: Yuri Benditovich --- hw/virtio/virtio-pci.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index 4a3dcee771..c1b67cf6fc 100644 --- a/hw/virtio/virtio-pci.c

[PATCH v2 0/2] virtio-pci: add check for vdev in virtio_pci_isr_read

2021-03-15 Thread Yuri Benditovich
est of Philippe Mathieu-Daude Yuri Benditovich (2): virtio-pci: add check for vdev in virtio_pci_isr_read virtio-pci: remove explicit initialization of val hw/virtio/virtio-pci.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) -- 2.17.1

Re: [PATCH 0/3] virtio-net: graceful drop of vhost for TAP

2021-02-18 Thread Yuri Benditovich
; On Tue, Feb 09, 2021 at 09:34:20AM -0500, Michael S. Tsirkin wrote: > > > > > On Thu, Feb 04, 2021 at 10:29:12PM +0200, Yuri Benditovich wrote: > > > > > > This set of patches introduces graceful switch from tap-vhost to > > > > > > tap-no-vh

[PATCH] virtio-pci: add check for vdev in virtio_pci_isr_read

2021-02-15 Thread Yuri Benditovich
https://bugzilla.redhat.com/show_bug.cgi?id=1743098 There is missing check for vdev in this procedure. QEMU crash happens in it in hot unplug flow. Signed-off-by: Yuri Benditovich --- hw/virtio/virtio-pci.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/hw/virtio

Re: [PATCH 3/3] virtio-net: graceful fallback to vhost=off for tap netdev

2021-02-08 Thread Yuri Benditovich
On Mon, Feb 8, 2021 at 5:15 AM Jason Wang wrote: > > > On 2021/2/5 下午9:38, Michael S. Tsirkin wrote: > > On Thu, Feb 04, 2021 at 10:29:15PM +0200, Yuri Benditovich wrote: > >> Currently virtio-net silently clears features if they are > >> not supported by

Re: [PATCH 3/3] virtio-net: graceful fallback to vhost=off for tap netdev

2021-02-08 Thread Yuri Benditovich
On Mon, Feb 8, 2021 at 6:11 AM Jason Wang wrote: > > > On 2021/2/5 上午4:29, Yuri Benditovich wrote: > > Currently virtio-net silently clears features if they are > > not supported by respective vhost. This may create migration > > problems in future if vhost features on

[PATCH 3/3] virtio-net: graceful fallback to vhost=off for tap netdev

2021-02-04 Thread Yuri Benditovich
. The decision is taken on set_features call and the vhost will be disabled till next reset (or migration). Such fallback is currently enabled only for TAP netdev. Signed-off-by: Yuri Benditovich --- hw/net/virtio-net.c | 58 ++--- 1 file changed, 50 insertions

[PATCH 2/3] net: add ability to hide (disable) vhost_net

2021-02-04 Thread Yuri Benditovich
If 'vhost_net_disabled' in the NetClientState of the net device, get_vhost_net for TAP returns NULL. Network adapters can use this ability to hide the vhost_net temporary between resets in case some active features contradict with vhost. Signed-off-by: Yuri Benditovich --- hw/net/vhost_net.c

[PATCH 0/3] virtio-net: graceful drop of vhost for TAP

2021-02-04 Thread Yuri Benditovich
of patches also makes get_vhost_net() call (that used everywhere) to always return actual result, i.e. initially it returns non-NULL value and from the moment the vhost was disabled the call will return NULL. Such a way we avoid any unexpected calls to vhost functions. Yuri Benditovich (3): vhost-net: add

[PATCH 1/3] vhost-net: add VIRTIO_NET_F_HASH_REPORT to the list of kernel features

2021-02-04 Thread Yuri Benditovich
In case of vhost TAP the kernel must support this feature, otherwise the device can't offer it. Signed-off-by: Yuri Benditovich --- hw/net/vhost_net.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c index 24d555e764..8282e440bd 100644 --- a/hw/net

Re: [RFC PATCH v3 4/6] ebpf: Added eBPF RSS loader.

2021-01-25 Thread Yuri Benditovich
On Mon, Jan 25, 2021 at 11:03 AM Jason Wang wrote: > > > On 2021/1/19 下午10:53, Yuri Benditovich wrote: > > On Fri, Jan 15, 2021 at 9:02 AM Jason Wang wrote: > >> > >> On 2021/1/15 上午5:16, Andrew Melnychenko wrote: > >>> From: Andrew > >

Re: [RFC PATCH v3 5/6] virtio-net: Added eBPF RSS to virtio-net.

2021-01-24 Thread Yuri Benditovich
On Sun, Jan 24, 2021 at 10:24 AM Yuri Benditovich wrote: > > Hi Jason, > > I've prepared a POC of graceful switch to 'vhost off' if respective > features are acked by the guest. > Such a way we do not need to silently clear RSS and hash report > features in case of 'vhost

Re: [RFC PATCH v3 5/6] virtio-net: Added eBPF RSS to virtio-net.

2021-01-24 Thread Yuri Benditovich
is what to do with cases of vhost-user and vhost-vdpa. https://github.com/qemu/qemu/pull/105 This pull request is for reviews only. Thanks in advance On Mon, Jan 18, 2021 at 5:16 AM Jason Wang wrote: > > > On 2021/1/17 下午5:04, Yuri Benditovich wrote: > > On Fri, Jan 15, 2021 at 9:2

Re: [RFC PATCH v3 4/6] ebpf: Added eBPF RSS loader.

2021-01-19 Thread Yuri Benditovich
tions. > > > > 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 > > Signed-off-by: Andrew Melnychenko > > --- > >

Re: [RFC PATCH v3 5/6] virtio-net: Added eBPF RSS to virtio-net.

2021-01-17 Thread Yuri Benditovich
; 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 > > Signed-off-by: A

Re: [RFC PATCH v2 0/5] eBPF RSS support for virtio-net

2020-12-06 Thread Yuri Benditovich
On Fri, Dec 4, 2020 at 3:57 PM Toke Høiland-Jørgensen wrote: > Yuri Benditovich writes: > > > On Fri, Dec 4, 2020 at 12:09 PM Toke Høiland-Jørgensen > > wrote: > > > >> Yuri Benditovich writes: > >> > >> > On Wed, Dec 2, 2020 at 4:18 PM To

Re: [RFC PATCH v2 0/5] eBPF RSS support for virtio-net

2020-12-04 Thread Yuri Benditovich
On Fri, Dec 4, 2020 at 12:09 PM Toke Høiland-Jørgensen wrote: > Yuri Benditovich writes: > > > On Wed, Dec 2, 2020 at 4:18 PM Toke Høiland-Jørgensen > > wrote: > > > >> Jason Wang writes: > >> > >> > On 2020/11/19 下午7:13, Andrew Mel

Re: [RFC PATCH v2 0/5] eBPF RSS support for virtio-net

2020-12-03 Thread Yuri Benditovich
On Wed, Dec 2, 2020 at 4:18 PM Toke Høiland-Jørgensen wrote: > Jason Wang writes: > > > On 2020/11/19 下午7:13, Andrew Melnychenko wrote: > >> This set of patches introduces the usage of eBPF for packet steering > >> and RSS hash calculation: > >> * RSS(Receive Side Scaling) is used to distribute

Re: [RFC PATCH v2 4/5] virtio-net: Added eBPF RSS to virtio-net.

2020-12-01 Thread Yuri Benditovich
On Wed, Dec 2, 2020 at 6:06 AM Jason Wang wrote: > > On 2020/12/1 下午3:40, Yuri Benditovich wrote: > > > > > > On Tue, Nov 24, 2020 at 10:49 AM Jason Wang > <mailto:jasow...@redhat.com>> wrote: > > > > > > On 2020/11/19 下午7:13, Andre

Re: [RFC PATCH v2 4/5] virtio-net: Added eBPF RSS to virtio-net.

2020-11-30 Thread Yuri Benditovich
he 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 > > Signed-off-by: A

Re: [RFC PATCH v2 0/5] eBPF RSS support for virtio-net

2020-11-26 Thread Yuri Benditovich
On Fri, Nov 27, 2020 at 6:36 AM Jason Wang wrote: > > On 2020/11/26 下午8:52, Yuri Benditovich wrote: > > > > > > On Mon, Nov 23, 2020 at 8:08 AM Jason Wang > <mailto:jasow...@redhat.com>> wrote: > > > > > > On 2020/11/19 下午7:13, A

Re: [RFC PATCH v2 5/5] docs: Added eBPF documentation.

2020-11-26 Thread Yuri Benditovich
On Tue, Nov 24, 2020 at 10:55 AM Jason Wang wrote: > > On 2020/11/19 下午7:13, Andrew Melnychenko wrote: > > From: Andrew > > > > Also, added maintainers information. > > > > Signed-off-by: Yuri Benditovich > > Signed-off-by: Andrew Melnyche

Re: [RFC PATCH v2 0/5] eBPF RSS support for virtio-net

2020-11-26 Thread Yuri Benditovich
On Mon, Nov 23, 2020 at 8:08 AM Jason Wang wrote: > > On 2020/11/19 下午7:13, Andrew Melnychenko wrote: > > This set of patches introduces the usage of eBPF for packet steering > > and RSS hash calculation: > > * RSS(Receive Side Scaling) is used to distribute network packets to > > guest

  1   2   3   >