[PATCH 3/3] vhost_vdpa: support PACKED when setting-getting vring_base

2023-04-21 Thread Shannon Nelson via Virtualization
Use the right structs for PACKED or split vqs when setting and getting the vring base. Signed-off-by: Shannon Nelson --- drivers/vhost/vdpa.c | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c index 599b8cc238c7..2

[PATCH 1/3] vhost_vdpa: tell vqs about the negotiated

2023-04-21 Thread Shannon Nelson via Virtualization
As is done in the net, iscsi, and vsock vhost support, let the vdpa vqs know about the features that have been negotiated. This allows vhost to more safely make decisions based on the features, such as when using PACKED vs split queues. Signed-off-by: Shannon Nelson --- drivers/vhost/vdpa.c | 1

[PATCH 0/3] vhost_vdpa: better PACKED support

2023-04-21 Thread Shannon Nelson via Virtualization
While testing our vDPA driver with QEMU we found that vhost_vdpa seems to be missing some support for PACKED VQs. Adding these helped us get further in our testing. The first patch makes sure that the vhost_vdpa vqs are given the feature flags, as done in other vhost variants. The second and thi

[PATCH 2/3] vhost: support PACKED when setting-getting vring_base

2023-04-21 Thread Shannon Nelson via Virtualization
Use the right structs for PACKED or split vqs when setting and getting the vring base. Signed-off-by: Shannon Nelson --- drivers/vhost/vhost.c | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index f11bdbe4c2c5.

Re: [RFC 0/2] vduse: add support for networking devices

2023-04-21 Thread Maxime Coquelin
On 4/21/23 07:51, Jason Wang wrote: On Thu, Apr 20, 2023 at 10:16 PM Maxime Coquelin wrote: On 4/20/23 06:34, Jason Wang wrote: On Wed, Apr 19, 2023 at 9:43 PM Maxime Coquelin wrote: This small series enables virtio-net device type in VDUSE. With it, basic operation have been tested, b

Re: [PATCH net-next v2 05/14] virtio_net: introduce xdp res enums

2023-04-21 Thread Michael S. Tsirkin
On Fri, Apr 21, 2023 at 03:24:00PM +0800, Xuan Zhuo wrote: > On Fri, 21 Apr 2023 03:00:15 -0400, "Michael S. Tsirkin" > wrote: > > On Tue, Apr 18, 2023 at 02:53:18PM +0800, Xuan Zhuo wrote: > > > virtnet_xdp_handler() is to process all the logic related to XDP. The > > > caller only needs to care

Re: [PATCH net-next] xsk: introduce xsk_dma_ops

2023-04-21 Thread Xuan Zhuo
On Thu, 20 Apr 2023 07:13:49 -0700, Jakub Kicinski wrote: > On Wed, 19 Apr 2023 23:19:22 -0700 Christoph Hellwig wrote: > > > In this case yes, pinned user memory, it gets sliced up into MTU sized > > > chunks, fed into an Rx queue of a device, and user can see packets > > > without any copies. >

Re: [PATCH net-next v2 05/14] virtio_net: introduce xdp res enums

2023-04-21 Thread Xuan Zhuo
On Fri, 21 Apr 2023 03:00:15 -0400, "Michael S. Tsirkin" wrote: > On Tue, Apr 18, 2023 at 02:53:18PM +0800, Xuan Zhuo wrote: > > virtnet_xdp_handler() is to process all the logic related to XDP. The > > caller only needs to care about how to deal with the buf. So this commit > > introduces new en

Re: [PATCH] vhost_net: revert upend_idx only on retriable error

2023-04-21 Thread Jason Wang
On Fri, Apr 21, 2023 at 3:04 PM Michael S. Tsirkin wrote: > > On Thu, Dec 01, 2022 at 05:01:58PM +0800, Jason Wang wrote: > > On Wed, Nov 23, 2022 at 6:24 PM Andrey Smetanin > > wrote: > > > > > > Fix possible virtqueue used buffers leak and corresponding stuck > > > in case of temporary -EIO fro

Re: [PATCH v2] vdpa/mlx5: Support interrupt bypassing

2023-04-21 Thread Jason Wang
On Fri, Apr 21, 2023 at 2:54 PM Michael S. Tsirkin wrote: > > On Wed, Apr 19, 2023 at 12:39:11PM +0800, Jason Wang wrote: > > On Mon, Apr 17, 2023 at 4:35 PM Eli Cohen wrote: > > > > > > Add support for generation of interrupts from the device directly to the > > > VM to the VCPU thus avoiding th

Re: [RFC 0/2] vduse: add support for networking devices

2023-04-21 Thread Jason Wang
On Fri, Apr 21, 2023 at 2:39 AM Peter Xu wrote: > > On Thu, Apr 20, 2023 at 12:34:06PM +0800, Jason Wang wrote: > > > 3. Coredump: > > > In order to be able to perform post-mortem analysis, DPDK > > > Vhost library marks pages used for vrings and descriptors > > > buffers as MADV_DODUMP usin

Re: [PATCH] vhost_net: revert upend_idx only on retriable error

2023-04-21 Thread Michael S. Tsirkin
On Thu, Dec 01, 2022 at 05:01:58PM +0800, Jason Wang wrote: > On Wed, Nov 23, 2022 at 6:24 PM Andrey Smetanin > wrote: > > > > Fix possible virtqueue used buffers leak and corresponding stuck > > in case of temporary -EIO from sendmsg() which is produced by > > tun driver while backend device is n

Re: [PATCH net-next v2 05/14] virtio_net: introduce xdp res enums

2023-04-21 Thread Michael S. Tsirkin
On Tue, Apr 18, 2023 at 02:53:18PM +0800, Xuan Zhuo wrote: > virtnet_xdp_handler() is to process all the logic related to XDP. The > caller only needs to care about how to deal with the buf. So this commit > introduces new enums: > > 1. VIRTNET_XDP_RES_PASS: make skb by the buf > 2. VIRTNET_XDP_RE