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

2021-01-12 Thread Jason Wang
On 2021/1/13 上午7:47, Willem de Bruijn wrote: On Tue, Jan 12, 2021 at 3:29 PM Yuri Benditovich wrote: 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

Re: [PATCH v3] vhost_vdpa: fix the problem in vhost_vdpa_set_config_call

2021-01-12 Thread Jason Wang
On 2021/1/12 下午1:36, Cindy Lu wrote: In vhost_vdpa_set_config_call, the cb.private should be vhost_vdpa. this cb.private will finally use in vhost_vdpa_config_cb as vhost_vdpa. Fix this issue. Fixes: 776f395004d82 ("vhost_vdpa: Support config interrupt in vdpa") Acked-by: Jason Wang

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

2021-01-12 Thread Willem de Bruijn
On Tue, Jan 12, 2021 at 3:29 PM Yuri Benditovich wrote: > > 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

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. > > > > Signed-off-by: Yuri Benditovich

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 file changed, 2 insertions(+) > >

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 > > place the packet to. The eBPF uses

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. > > > > 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

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 key for hash calculation and

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

2021-01-12 Thread Yuri Benditovich
The module never creates the bpf program with bpf_prog_create so it shouldn't free it with bpf_prog_destroy. The program is obtained by bpf_prog_get and should be freed by bpf_prog_put. For BPF_PROG_TYPE_SOCKET_FILTER both methods do the same but for other program types they don't. Signed-off-by:

[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

[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

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

2021-01-12 Thread Alexei Starovoitov
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. > > Signed-off-by: Yuri Benditovich > --- > drivers/net/tun.c | 2 ++ > 1 file changed, 2 insertions(+) > >

[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 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 +++

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

2021-01-12 Thread Yuri Benditovich
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 key for hash calculation and indirection table with array of queues' indices. This series of

Re: [PATCH v4 04/13] drm/shmem-helper: Provide a vmap function for short-term mappings

2021-01-12 Thread Daniel Vetter
On Tue, Jan 12, 2021 at 02:11:24PM +0100, Thomas Zimmermann wrote: > Hi > > Am 11.01.21 um 17:50 schrieb Daniel Vetter: > > On Fri, Jan 08, 2021 at 10:43:31AM +0100, Thomas Zimmermann wrote: > > > Implementations of the vmap/vunmap GEM callbacks may perform pinning > > > of the BO and may acquire

Re: [PATCH v4 04/13] drm/shmem-helper: Provide a vmap function for short-term mappings

2021-01-12 Thread Thomas Zimmermann
Hi Am 11.01.21 um 17:50 schrieb Daniel Vetter: On Fri, Jan 08, 2021 at 10:43:31AM +0100, Thomas Zimmermann wrote: Implementations of the vmap/vunmap GEM callbacks may perform pinning of the BO and may acquire the associated reservation object's lock. Callers that only require a mapping of the

Re: [PATCH v4 11/13] drm/vboxvideo: Use drm_gem_vram_vmap_local() in cursor update

2021-01-12 Thread Thomas Zimmermann
Hi Am 12.01.21 um 10:17 schrieb Daniel Vetter: On Tue, Jan 12, 2021 at 08:54:02AM +0100, Thomas Zimmermann wrote: Hi Am 11.01.21 um 18:06 schrieb Daniel Vetter: On Fri, Jan 08, 2021 at 10:43:38AM +0100, Thomas Zimmermann wrote: Cursor updates in vboxvideo require a short-term mapping of the

Re: [PATCH v4 11/13] drm/vboxvideo: Use drm_gem_vram_vmap_local() in cursor update

2021-01-12 Thread Daniel Vetter
On Tue, Jan 12, 2021 at 08:54:02AM +0100, Thomas Zimmermann wrote: > Hi > > Am 11.01.21 um 18:06 schrieb Daniel Vetter: > > On Fri, Jan 08, 2021 at 10:43:38AM +0100, Thomas Zimmermann wrote: > > > Cursor updates in vboxvideo require a short-term mapping of the > > > source BO. Use