Re: [PATCH 1/1] vhost: Added pad cleanup if vnet_hdr is not present.

2024-02-08 Thread Yuri Benditovich
Just polite ping On Tue, Jan 16, 2024 at 12:32 AM Michael S. Tsirkin wrote: > > On Mon, Jan 15, 2024 at 09:48:40PM +0200, Andrew Melnychenko wrote: > > When the Qemu launched with vhost but without tap vnet_hdr, > > vhost tries to copy vnet_hdr from socket iter with size 0 > > to the page that

Re: [PATCH 1/1] vhost: Added pad cleanup if vnet_hdr is not present.

2024-01-15 Thread Yuri Benditovich
See also https://issues.redhat.com/browse/RHEL-1303 On Mon, Jan 15, 2024 at 9:48 PM Andrew Melnychenko wrote: > > When the Qemu launched with vhost but without tap vnet_hdr, > vhost tries to copy vnet_hdr from socket iter with size 0 > to the page that may contain some trash. > That trash can

Re: [RFC PATCH 3/7] tun: allow use of BPF_PROG_TYPE_SCHED_CLS program type

2021-01-24 Thread Yuri Benditovich
On Wed, Jan 20, 2021 at 8:45 PM Alexei Starovoitov wrote: > > On Tue, Jan 12, 2021 at 12:55 PM Yuri Benditovich > wrote: > > > > On Tue, Jan 12, 2021 at 10:40 PM Yuri Benditovich > > wrote: > > > > > > On Tue, Jan 12, 2021 at 9:42 PM Yuri Benditovi

Re: [RFC PATCH 0/7] Support for virtio-net hash reporting

2021-01-18 Thread Yuri Benditovich
On Mon, Jan 18, 2021 at 4:46 AM Jason Wang wrote: > > > On 2021/1/17 下午3:57, Yuri Benditovich wrote: > > On Thu, Jan 14, 2021 at 5:39 AM Jason Wang wrote: > >> > >> On 2021/1/13 下午10:33, Willem de Bruijn wrote: > >>> On Tue, Jan 12, 2021 at 11:11 PM

Re: [RFC PATCH 3/7] tun: allow use of BPF_PROG_TYPE_SCHED_CLS program type

2021-01-18 Thread Yuri Benditovich
Hello Alexei, Can you please answer the questions in the last email of this thread? Your comment will be extremely helpful. Thanks On Tue, Jan 12, 2021 at 10:55 PM Yuri Benditovich wrote: > > On Tue, Jan 12, 2021 at 10:40 PM Yuri Benditovich > wrote: > > > > On Tue, Ja

Re: [RFC PATCH 0/7] Support for virtio-net hash reporting

2021-01-17 Thread Yuri Benditovich
On Thu, Jan 14, 2021 at 5:39 AM Jason Wang wrote: > > > On 2021/1/13 下午10:33, Willem de Bruijn wrote: > > On Tue, Jan 12, 2021 at 11:11 PM Jason Wang wrote: > >> > >> On 2021/1/13 上午7:47, Willem de Bruijn wrote: > >>> On Tue, Jan 12, 2021 at 3:29 PM

Re: [RFC PATCH 0/7] Support for virtio-net hash reporting

2021-01-12 Thread Yuri Benditovich
On Tue, Jan 12, 2021 at 9:49 PM Yuri Benditovich wrote: > > On Tue, Jan 12, 2021 at 9:41 PM Yuri Benditovich > wrote: > > > > Existing TUN module is able to use provided "steering eBPF" to > > calculate per-packet hash and derive the destination queue to &

Re: [RFC PATCH 3/7] tun: allow use of BPF_PROG_TYPE_SCHED_CLS program type

2021-01-12 Thread Yuri Benditovich
On Tue, Jan 12, 2021 at 9:46 PM Alexei Starovoitov wrote: > > On Tue, Jan 12, 2021 at 11:42 AM Yuri Benditovich > wrote: > > > > This program type can set skb hash value. It will be useful > > when the tun will support hash reporting feature if virtio-net. > > &g

Re: [RFC PATCH 3/7] tun: allow use of BPF_PROG_TYPE_SCHED_CLS program type

2021-01-12 Thread Yuri Benditovich
On Tue, Jan 12, 2021 at 9:42 PM Yuri Benditovich wrote: > > This program type can set skb hash value. It will be useful > when the tun will support hash reporting feature if virtio-net. > > Signed-off-by: Yuri Benditovich > --- > drivers/net/tun.c | 2 ++ > 1 fi

Re: [RFC PATCH 3/7] tun: allow use of BPF_PROG_TYPE_SCHED_CLS program type

2021-01-12 Thread Yuri Benditovich
On Tue, Jan 12, 2021 at 10:40 PM Yuri Benditovich wrote: > > On Tue, Jan 12, 2021 at 9:42 PM Yuri Benditovich > wrote: > > > > This program type can set skb hash value. It will be useful > > when the tun will support hash reporting feature if virtio-net. > > &g

Re: [RFC PATCH 0/7] Support for virtio-net hash reporting

2021-01-12 Thread Yuri Benditovich
On Tue, Jan 12, 2021 at 9:41 PM Yuri Benditovich wrote: > > Existing TUN module is able to use provided "steering eBPF" to > calculate per-packet hash and derive the destination queue to > place the packet to. The eBPF uses mapped configuration data > containing a

[RFC PATCH 5/7] tun: add ioctl code TUNSETHASHPOPULATION

2021-01-12 Thread Yuri Benditovich
User mode program calls this ioctl before loading of BPF program to inform the tun that the BPF program has extended functionality, i.e. sets hash value and returns the virtqueue number in the lower 16 bits and the type of the hash report in the upper 16 bits. Signed-off-by: Yuri Benditovich

[RFC PATCH 7/7] tun: report new tun feature IFF_HASH

2021-01-12 Thread Yuri Benditovich
IFF_HASH feature indicates that the tun supports TUNSETHASHPOPULATION ioctl and can propagate the hash data to the virtio-net packet. Signed-off-by: Yuri Benditovich --- drivers/net/tun.c | 2 +- include/uapi/linux/if_tun.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff

[RFC PATCH 6/7] tun: populate hash in virtio-net header when needed

2021-01-12 Thread Yuri Benditovich
If the BPF program populated the hash in the skb the tun propagates the hash value and hash report type to the respective fields of virtio-net header. Signed-off-by: Yuri Benditovich --- drivers/net/tun.c | 25 ++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff

[RFC PATCH 4/7] tun: free bpf_program by bpf_prog_put instead of bpf_prog_destroy

2021-01-12 Thread Yuri Benditovich
-by: Yuri Benditovich --- drivers/net/tun.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 455f7afc1f36..18c1baf1a6c1 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -2218,7 +2218,7 @@ static void tun_prog_free(struct rcu_head

[RFC PATCH 1/7] skbuff: define field for hash report type

2021-01-12 Thread Yuri Benditovich
Used by virtio-net receive side scaling Signed-off-by: Yuri Benditovich --- include/linux/skbuff.h | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 416bf95cd5f2..36cf40ec0259 100644 --- a/include/linux/skbuff.h +++ b

[RFC PATCH 2/7] vhost: support for hash report virtio-net feature

2021-01-12 Thread Yuri Benditovich
According to the virtio specification if VIRTIO_NET_F_HASH_REPORT feature acked the virtio-net header is extended to hold the hash value and hash report type. Signed-off-by: Yuri Benditovich --- drivers/vhost/net.c | 37 + 1 file changed, 29 insertions(+), 8

[RFC PATCH 3/7] tun: allow use of BPF_PROG_TYPE_SCHED_CLS program type

2021-01-12 Thread Yuri Benditovich
This program type can set skb hash value. It will be useful when the tun will support hash reporting feature if virtio-net. Signed-off-by: Yuri Benditovich --- drivers/net/tun.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 7959b5c2d11f

[RFC PATCH 0/7] Support for virtio-net hash reporting

2021-01-12 Thread Yuri Benditovich
the hash and the hash type into virtio-net header. VHOST driver is made aware of respective virtio-net feature that extends the virtio-net header to report the hash value and hash report type. Yuri Benditovich (7): skbuff: define field for hash report type vhost: support for hash report virtio-ne

[RFC PATCH 6/7] tun: populate hash in virtio-net header when needed

2021-01-05 Thread Yuri Benditovich
If the BPF program populated the hash in the skb the tun propagates the hash value and hash report type to the respective fields of virtio-net header. Signed-off-by: Yuri Benditovich --- drivers/net/tun.c | 25 ++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff

[RFC PATCH 7/7] tun: report new tun feature IFF_HASH

2021-01-05 Thread Yuri Benditovich
IFF_HASH feature indicates that the tun supports TUNSETHASHPOPULATION ioctl and can propagate the hash data to the virtio-net packet. Signed-off-by: Yuri Benditovich --- drivers/net/tun.c | 2 +- include/uapi/linux/if_tun.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff

[RFC PATCH 2/7] vhost: support for hash report virtio-net feature

2021-01-05 Thread Yuri Benditovich
According to the virtio specification if VIRTIO_NET_F_HASH_REPORT feature acked the virtio-net header is extended to hold the hash value and hash report type. Signed-off-by: Yuri Benditovich --- drivers/vhost/net.c | 37 + 1 file changed, 29 insertions(+), 8

[RFC PATCH 1/7] skbuff: define field for hash report type

2021-01-05 Thread Yuri Benditovich
Used by virtio-net receive side scaling Signed-off-by: Yuri Benditovich --- include/linux/skbuff.h | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 416bf95cd5f2..36cf40ec0259 100644 --- a/include/linux/skbuff.h +++ b

[RFC PATCH 4/7] tun: free bpf_program by bpf_prog_put instead of bpf_prog_destroy

2021-01-05 Thread Yuri Benditovich
-by: Yuri Benditovich --- drivers/net/tun.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 455f7afc1f36..18c1baf1a6c1 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -2218,7 +2218,7 @@ static void tun_prog_free(struct rcu_head

[RFC PATCH 5/7] tun: add ioctl code TUNSETHASHPOPULATION

2021-01-05 Thread Yuri Benditovich
User mode program calls this ioctl before loading of BPF program to inform the tun that the BPF program has extended functionality, i.e. sets hash value and returns the virtqueue number in the lower 16 bits and the type of the hash report in the upper 16 bits. Signed-off-by: Yuri Benditovich

[RFC PATCH 3/7] tun: allow use of BPF_PROG_TYPE_SCHED_CLS program type

2021-01-05 Thread Yuri Benditovich
This program type can set skb hash value. It will be useful when the tun will support hash reporting feature if virtio-net. Signed-off-by: Yuri Benditovich --- drivers/net/tun.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 7959b5c2d11f

Re: [PATCH v2] virtio_net: Introduce extended RSC feature

2019-02-13 Thread Yuri Benditovich
Can you please let me know whether this patch accepted? Is yes, I'll post similar change to qemu to prevent future compilation error when linux header will be updated. Thanks, Yuri On Fri, Feb 1, 2019 at 10:50 AM Yuri Benditovich wrote: > > VIRTIO_NET_F_RSC_EXT feature bit ind

[PATCH v2] virtio_net: Introduce extended RSC feature

2019-02-01 Thread Yuri Benditovich
in 'csum_offset' field and sets VIRTIO_NET_HDR_F_RSC_INFO in 'flags' field. Signed-off-by: Yuri Benditovich --- include/uapi/linux/virtio_net.h | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/virtio_net.h b/include/uapi/linux/virtio_net.h index

[PATCH] virtio_net: Introduce extended RSC feature

2019-01-29 Thread Yuri Benditovich
in 'csum_offset' field and sets VIRTIO_NET_HDR_F_RSC_INFO in 'flags' field. Signed-off-by: Yuri Benditovich --- include/uapi/linux/virtio_net.h | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/virtio_net.h b/include/uapi/linux/virtio_net.h index