Re: [PATCH vhost v2 1/2] virtio_pci: fix the common map size and add check for common size

2023-10-08 Thread Xuan Zhuo
On Sun, 8 Oct 2023 06:42:37 -0400, "Michael S. Tsirkin" wrote: > On Sun, Oct 08, 2023 at 05:38:41PM +0800, Xuan Zhuo wrote: > > Now, the function vp_modern_map_capability() takes the size parameter, > > which corresponds to the size of virtio_pci_common_cfg. As a result, > > this indicates the

Re: [RFC PATCH 5/7] tun: Introduce virtio-net hashing feature

2023-10-08 Thread Willem de Bruijn
On Sun, Oct 8, 2023 at 10:04 PM Akihiko Odaki wrote: > > On 2023/10/09 4:07, Willem de Bruijn wrote: > > On Sun, Oct 8, 2023 at 7:22 AM Akihiko Odaki > > wrote: > >> > >> virtio-net have two usage of hashes: one is RSS and another is hash > >> reporting. Conventionally the hash calculation was

Re: [RFC PATCH 5/7] tun: Introduce virtio-net hashing feature

2023-10-08 Thread Willem de Bruijn
On Sun, Oct 8, 2023 at 7:22 AM Akihiko Odaki wrote: > > virtio-net have two usage of hashes: one is RSS and another is hash > reporting. Conventionally the hash calculation was done by the VMM. > However, computing the hash after the queue was chosen defeats the > purpose of RSS. > > Another

Re: [RFC PATCH 1/7] net: skbuff: Add tun_vnet_hash flag

2023-10-08 Thread Willem de Bruijn
On Sun, Oct 8, 2023 at 7:22 AM Akihiko Odaki wrote: > > tun_vnet_hash can use this flag to indicate it stored virtio-net hash > cache to cb. > > Signed-off-by: Akihiko Odaki > --- > include/linux/skbuff.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/include/linux/skbuff.h

Re: [RFC PATCH 0/7] tun: Introduce virtio-net hashing feature

2023-10-08 Thread Willem de Bruijn
On Sun, Oct 8, 2023 at 7:21 AM Akihiko Odaki wrote: > > virtio-net have two usage of hashes: one is RSS and another is hash > reporting. Conventionally the hash calculation was done by the VMM. > However, computing the hash after the queue was chosen defeats the > purpose of RSS. > > Another

Re: [PATCH 09/16] vdpa/mlx5: Allow creation/deletion of any given mr struct

2023-10-08 Thread Dragos Tatulea via Virtualization
On Sun, 2023-10-08 at 12:25 +0800, Jason Wang wrote: > On Tue, Sep 26, 2023 at 3:21 PM Dragos Tatulea wrote: > > > > On Tue, 2023-09-26 at 12:44 +0800, Jason Wang wrote: > > > On Tue, Sep 12, 2023 at 9:02 PM Dragos Tatulea > > > wrote: > > > > > > > > This patch adapts the mr creation/deletion

Re: [PATCH vhost v2 1/2] virtio_pci: fix the common map size and add check for common size

2023-10-08 Thread Michael S. Tsirkin
On Sun, Oct 08, 2023 at 05:38:41PM +0800, Xuan Zhuo wrote: > Now, the function vp_modern_map_capability() takes the size parameter, > which corresponds to the size of virtio_pci_common_cfg. As a result, > this indicates the size of memory area to map. > > However, if the _F_RING_RESET is

[PATCH vhost v2 2/2] virtio_pci: add build offset check for the new common cfg items

2023-10-08 Thread Xuan Zhuo
Add checks to the check_offsets(void) for queue_notify_data and queue_reset. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang --- drivers/virtio/virtio_pci_modern_dev.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/virtio/virtio_pci_modern_dev.c

[PATCH vhost v2 1/2] virtio_pci: fix the common map size and add check for common size

2023-10-08 Thread Xuan Zhuo
Now, the function vp_modern_map_capability() takes the size parameter, which corresponds to the size of virtio_pci_common_cfg. As a result, this indicates the size of memory area to map. However, if the _F_RING_RESET is negotiated, the extra items will be used. Therefore, we need to use the size

[PATCH vhost v2 0/2] strictly check the acccess to the common cfg

2023-10-08 Thread Xuan Zhuo
1. fix the length of the pci_iomap_range() to the common cfg 2. add size check for the vq-reset 3. add build size check to the new common cfg items Xuan Zhuo (2): virtio_pci: fix the common map size and add check for common size virtio_pci: add build offset check for the new common cfg items

Re: [PATCH vhost v1 1/2] virtio_pci: fix the common map size and add check for vq-reset

2023-10-08 Thread Michael S. Tsirkin
On Sun, Oct 08, 2023 at 03:45:34PM +0800, Xuan Zhuo wrote: > Now, the function vp_modern_map_capability() takes the size parameter, > which corresponds to the size of virtio_pci_common_cfg. As a result, > this indicates the size of memory area to map. > > However, if the _F_RING_RESET is

[PATCH vhost v1 2/2] virtio_pci: add build offset check for the new common cfg items

2023-10-08 Thread Xuan Zhuo
Add checks to the check_offsets(void) for queue_notify_data and queue_reset. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang --- drivers/virtio/virtio_pci_modern_dev.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/virtio/virtio_pci_modern_dev.c

[PATCH vhost v1 0/2] strictly check the acccess to the common cfg

2023-10-08 Thread Xuan Zhuo
1. fix the length of the pci_iomap_range() to the common cfg 2. add size check for the vq-reset 3. add build size check to the new common cfg items Xuan Zhuo (2): virtio_pci: fix the common map size and add check for vq-reset virtio_pci: add build offset check for the new common cfg items

[PATCH vhost v1 1/2] virtio_pci: fix the common map size and add check for vq-reset

2023-10-08 Thread Xuan Zhuo
Now, the function vp_modern_map_capability() takes the size parameter, which corresponds to the size of virtio_pci_common_cfg. As a result, this indicates the size of memory area to map. However, if the _F_RING_RESET is negotiated, the extra items will be used. Therefore, we need to use the size

Re: [PATCH] vduse: make vduse_class constant

2023-10-08 Thread Michael S. Tsirkin
On Sun, Oct 08, 2023 at 08:46:45AM +0200, Greg Kroah-Hartman wrote: > On Sun, Oct 08, 2023 at 02:41:22AM -0400, Michael S. Tsirkin wrote: > > On Sun, Oct 08, 2023 at 08:40:05AM +0200, Greg Kroah-Hartman wrote: > > > On Sun, Oct 08, 2023 at 02:20:52AM -0400, Michael S. Tsirkin wrote: > > > > On

Re: [PATCH] vduse: make vduse_class constant

2023-10-08 Thread Greg Kroah-Hartman
On Sun, Oct 08, 2023 at 02:41:22AM -0400, Michael S. Tsirkin wrote: > On Sun, Oct 08, 2023 at 08:40:05AM +0200, Greg Kroah-Hartman wrote: > > On Sun, Oct 08, 2023 at 02:20:52AM -0400, Michael S. Tsirkin wrote: > > > On Fri, Oct 06, 2023 at 04:30:44PM +0200, Greg Kroah-Hartman wrote: > > > > Now

Re: [PATCH] vduse: make vduse_class constant

2023-10-08 Thread Michael S. Tsirkin
On Sun, Oct 08, 2023 at 08:40:05AM +0200, Greg Kroah-Hartman wrote: > On Sun, Oct 08, 2023 at 02:20:52AM -0400, Michael S. Tsirkin wrote: > > On Fri, Oct 06, 2023 at 04:30:44PM +0200, Greg Kroah-Hartman wrote: > > > Now that the driver core allows for struct class to be in read-only > > > memory,

Re: [PATCH] vduse: make vduse_class constant

2023-10-08 Thread Greg Kroah-Hartman
On Sun, Oct 08, 2023 at 02:20:52AM -0400, Michael S. Tsirkin wrote: > On Fri, Oct 06, 2023 at 04:30:44PM +0200, Greg Kroah-Hartman wrote: > > Now that the driver core allows for struct class to be in read-only > > memory, we should make all 'class' structures declared at build time > > placing

Re: [PATCH] vduse: make vduse_class constant

2023-10-08 Thread Michael S. Tsirkin
On Fri, Oct 06, 2023 at 04:30:44PM +0200, Greg Kroah-Hartman wrote: > Now that the driver core allows for struct class to be in read-only > memory, we should make all 'class' structures declared at build time > placing them into read-only memory, instead of having to be dynamically > allocated at