RE: About restoring the state in vhost-vdpa device

2022-05-13 Thread Parav Pandit via Virtualization
> From: Eugenio Perez Martin > Sent: Wednesday, May 11, 2022 3:44 PM > > This is a proposal to restore the state of the vhost-vdpa device at the > destination after a live migration. It uses as many available features both > from the device and from qemu as possible so we keep the communication

RE: About restoring the state in vhost-vdpa device

2022-05-13 Thread Parav Pandit via Virtualization
Hi Gautam, Please fix your email client to have right response format. Otherwise, it will be confusing for the rest and us to follow the conversation. More below. > From: Gautam Dawar > Sent: Friday, May 13, 2022 1:48 PM > > Our proposal diverge in step 7: Instead of enabling *all* the > > vir

RE: [PATCH v2 2/3] vdpa: Add a device object for vdpa management device

2022-05-16 Thread Parav Pandit via Virtualization
> From: Xie Yongji > Sent: Monday, May 16, 2022 2:04 AM > > Introduce a device object for vdpa management device to control its > lifecycle. Why is this needed? What is the limitation of current approach that requires new device for mgmtdev? The primary motivation is missing in the commit log

RE: About restoring the state in vhost-vdpa device

2022-05-16 Thread Parav Pandit via Virtualization
> From: Eugenio Perez Martin > Sent: Monday, May 16, 2022 4:51 AM > > On Fri, May 13, 2022 at 8:25 PM Parav Pandit wrote: > > > > Hi Gautam, > > > > Please fix your email client to have right response format. > > Otherwise, it will be confusing for the rest and us to follow the > conversation.

RE: [PATCH v2 2/3] vdpa: Add a device object for vdpa management device

2022-05-17 Thread Parav Pandit via Virtualization
Hi Greg, Yongji, > From: Yongji Xie > Sent: Tuesday, May 17, 2022 3:25 AM > > On Tue, May 17, 2022 at 4:06 AM Parav Pandit wrote: > > > > > > > > > From: Xie Yongji > > > Sent: Monday, May 16, 2022 2:04 AM > > > > > > Introduce a device object for vdpa management device to control its > > > li

RE: [PATCH v2 2/3] vdpa: Add a device object for vdpa management device

2022-05-17 Thread Parav Pandit via Virtualization
> From: gre...@linuxfoundation.org > Sent: Tuesday, May 17, 2022 9:54 AM > > On Tue, May 17, 2022 at 12:21:03PM +, Parav Pandit wrote: > > Hi Greg, Yongji, > > > > > From: Yongji Xie > > > Sent: Tuesday, May 17, 2022 3:25 AM > > > > > > On Tue, May 17, 2022 at 4:06 AM Parav Pandit > wrote

RE: About restoring the state in vhost-vdpa device

2022-05-18 Thread Parav Pandit via Virtualization
> From: Jason Wang > Sent: Monday, May 16, 2022 11:05 PM > >> Although it's a longer route, I'd very much prefer an in-band virtio > >> way to perform it rather than a linux/vdpa specific. It's one of the > >> reasons I prefer the CVQ behavior over a vdpa specific ioctl. > >> > > What is the in-b

RE: About restoring the state in vhost-vdpa device

2022-05-18 Thread Parav Pandit via Virtualization
> From: Eugenio Perez Martin > Sent: Tuesday, May 17, 2022 4:12 AM > > 2. Each VQ enablement one at a time, requires constant steering update > > for the VQ While this information is something already known. Trying to > reuse brings a callback result in this in-efficiency. > > So better to sta

RE: [PATCH v2 2/3] vdpa: Add a device object for vdpa management device

2022-05-22 Thread Parav Pandit via Virtualization
> From: Jason Wang > Sent: Wednesday, May 18, 2022 4:32 AM > > 在 2022/5/18 07:03, Parav Pandit 写道: > >>> And regarding vduse_dev_release() and existing empty release > >>> function, > >> they can be dynamically allocated. > >>> This is because they are really the struct device. > >> I do not und

RE: [PATCH v2 2/3] vdpa: Add a device object for vdpa management device

2022-05-23 Thread Parav Pandit via Virtualization
> From: Jason Wang > Sent: Sunday, May 22, 2022 11:41 PM > To: Parav Pandit > Cc: gre...@linuxfoundation.org; Yongji Xie ; > m...@redhat.com; lingshan@intel.com; Eli Cohen ; > virtualization@lists.linux-foundation.org > Subject: Re: [PATCH v2 2/3] vdpa: Add a device object for vdpa managemen

RE: [PATCH v4 0/4] Implement vdpasim stop operation

2022-05-26 Thread Parav Pandit via Virtualization
> From: Eugenio Pérez > Sent: Thursday, May 26, 2022 8:44 AM > Implement stop operation for vdpa_sim devices, so vhost-vdpa will offer > > that backend feature and userspace can effectively stop the device. > > > > This is a must before get virtqueue indexes (base) for live migration, > >

RE: [PATCH v4 0/4] Implement vdpasim stop operation

2022-05-31 Thread Parav Pandit via Virtualization
> From: Jason Wang > Sent: Sunday, May 29, 2022 11:39 PM > > On Fri, May 27, 2022 at 6:56 PM Michael S. Tsirkin wrote: > > > > On Thu, May 26, 2022 at 12:54:32PM +, Parav Pandit wrote: > > > > > > > > > > From: Eugenio Pérez > > > > Sent: Thursday, May 26, 2022 8:44 AM > > > > > > > Implem

RE: [PATCH v4 0/4] Implement vdpasim stop operation

2022-05-31 Thread Parav Pandit via Virtualization
> From: Eugenio Perez Martin > Sent: Friday, May 27, 2022 3:55 AM > > On Fri, May 27, 2022 at 4:26 AM Jason Wang wrote: > > > > On Thu, May 26, 2022 at 8:54 PM Parav Pandit wrote: > > > > > > > > > > > > > From: Eugenio Pérez > > > > Sent: Thursday, May 26, 2022 8:44 AM > > > > > > > Impleme

RE: [PATCH v4 0/4] Implement vdpasim stop operation

2022-06-01 Thread Parav Pandit via Virtualization
> From: Jason Wang > Sent: Tuesday, May 31, 2022 10:42 PM > > Well, the ability to query the virtqueue state was proposed as another > feature (Eugenio, please correct me). This should be sufficient for making > virtio-net to be live migrated. > The device is stopped, it won't answer to this s

RE: [PATCH v4 3/4] vhost-vdpa: uAPI to stop the device

2022-06-01 Thread Parav Pandit via Virtualization
> From: Eugenio Perez Martin > Sent: Wednesday, June 1, 2022 7:15 AM > > On Wed, Jun 1, 2022 at 1:03 PM Michael S. Tsirkin wrote: > > > > On Thu, May 26, 2022 at 02:43:37PM +0200, Eugenio Pérez wrote: > > > The ioctl adds support for stop the device from userspace. > > > > > > Signed-off-by: E

RE: [PATCH v4 0/4] Implement vdpasim stop operation

2022-06-01 Thread Parav Pandit via Virtualization
> From: Eugenio Perez Martin > Sent: Wednesday, June 1, 2022 5:50 AM > > On Tue, May 31, 2022 at 10:19 PM Parav Pandit wrote: > > > > > > > From: Jason Wang > > > Sent: Sunday, May 29, 2022 11:39 PM > > > > > > On Fri, May 27, 2022 at 6:56 PM Michael S. Tsirkin > wrote: > > > > > > > > On Th

RE: [PATCH v4 0/4] Implement vdpasim stop operation

2022-06-01 Thread Parav Pandit via Virtualization
> From: Jason Wang > Sent: Wednesday, June 1, 2022 10:00 PM > > On Thu, Jun 2, 2022 at 2:58 AM Parav Pandit wrote: > > > > > > > From: Jason Wang > > > Sent: Tuesday, May 31, 2022 10:42 PM > > > > > > Well, the ability to query the virtqueue state was proposed as > > > another feature (Eugeni

RE: [PATCH] vdpa: allow vdpa dev_del management operation to return failure

2022-06-08 Thread Parav Pandit via Virtualization
> From: Dawar, Gautam > Sent: Wednesday, June 8, 2022 6:30 AM > To: Jason Wang > Cc: netdev ; linux-net-drivers (AMD-Xilinx) net-driv...@amd.com>; Anand, Harpreet ; > Michael S. Tsirkin ; Zhu Lingshan > ; Xie Yongji ; Eli > Cohen ; Parav Pandit ; Si-Wei Liu wei@oracle.com>; Stefano Garzar

RE: [PATCH v2] vduse: Fix NULL pointer dereference on sysfs access

2022-06-08 Thread Parav Pandit via Virtualization
> From: Yongji Xie > Sent: Wednesday, June 8, 2022 9:26 AM > > On Wed, Jun 8, 2022 at 8:52 PM Michael S. Tsirkin wrote: > > > > On Tue, Apr 26, 2022 at 10:07:38AM +0200, Greg KH wrote: > > > On Tue, Apr 26, 2022 at 03:36:56PM +0800, Xie Yongji wrote: > > > > The control device has no drvdata.

[PATCH] vduse: Tie vduse mgmtdev and its device

2022-06-12 Thread Parav Pandit via Virtualization
vduse devices are not backed by any real devices such as PCI. Hence it doesn't have any parent device linked to it. Kernel driver model in [1] suggests to avoid an empty device release callback. Hence tie the mgmtdevice object's life cycle to an allocate dummy struct device instead of static one.

RE: [PATCH] vdpa: allow vdpa dev_del management operation to return failure

2022-06-12 Thread Parav Pandit via Virtualization
> From: Jason Wang > Sent: Thursday, June 9, 2022 3:19 AM [..] > > > This is to avoid side-effects as noted in > > > https://bugzilla.kernel.org/show_bug.cgi?id=213179 caused by > > > deleting the vdpa device when it is being used. > > > > > > User should be able to delete the device anytime.

RE: [PATCH] vduse: Tie vduse mgmtdev and its device

2022-06-13 Thread Parav Pandit via Virtualization
> From: Yongji Xie > Sent: Monday, June 13, 2022 5:54 AM > > On Mon, Jun 13, 2022 at 2:02 AM Parav Pandit wrote: > > > > vduse devices are not backed by any real devices such as PCI. Hence it > > doesn't have any parent device linked to it. > > > > Kernel driver model in [1] suggests to avoid

[PATCH v1] vduse: Tie vduse mgmtdev and its device

2022-06-13 Thread Parav Pandit via Virtualization
vduse devices are not backed by any real devices such as PCI. Hence it doesn't have any parent device linked to it. Kernel driver model in [1] suggests to avoid an empty device release callback. Hence tie the mgmtdevice object's life cycle to an allocate dummy struct device instead of static one.

RE: [PATCH V2 4/6] vDPA: !FEATURES_OK should not block querying device config space

2022-06-13 Thread Parav Pandit via Virtualization
> From: Zhu Lingshan > Sent: Monday, June 13, 2022 6:17 AM > > Users may want to query the config space of a vDPA device, to choose a > appropriate one for a certain guest. This means the users need to read the > config space before FEATURES_OK, and the existence of config space > contents doe

RE: [PATCH V2 5/6] vDPA: answer num of queue pairs = 1 to userspace when VIRTIO_NET_F_MQ == 0

2022-06-13 Thread Parav Pandit via Virtualization
> From: Zhu Lingshan > Sent: Monday, June 13, 2022 6:17 AM > To: jasow...@redhat.com; m...@redhat.com > Cc: virtualization@lists.linux-foundation.org; net...@vger.kernel.org; Parav > Pandit ; xieyon...@bytedance.com; > gautam.da...@amd.com; Zhu Lingshan > Subject: [PATCH V2 5/6] vDPA: answer n

RE: [PATCH V2 3/6] vDPA: allow userspace to query features of a vDPA device

2022-06-13 Thread Parav Pandit via Virtualization
> From: Zhu Lingshan > Sent: Monday, June 13, 2022 6:17 AM > > This commit adds a new vDPA netlink attribution > VDPA_ATTR_VDPA_DEV_SUPPORTED_FEATURES. Userspace can query > features of vDPA devices through this new attr. > > Signed-off-by: Zhu Lingshan > --- > drivers/vdpa/vdpa.c | 1

RE: [PATCH V2 3/6] vDPA: allow userspace to query features of a vDPA device

2022-06-13 Thread Parav Pandit via Virtualization
> From: Zhu Lingshan > Sent: Monday, June 13, 2022 6:17 AM > device > > This commit adds a new vDPA netlink attribution > VDPA_ATTR_VDPA_DEV_SUPPORTED_FEATURES. Userspace can query > features of vDPA devices through this new attr. > > Signed-off-by: Zhu Lingshan > --- > drivers/vdpa/vdpa.c

RE: [PATCH V2 3/6] vDPA: allow userspace to query features of a vDPA device

2022-06-14 Thread Parav Pandit via Virtualization
> From: Zhu, Lingshan > Sent: Monday, June 13, 2022 10:53 PM > > > On 6/14/2022 4:42 AM, Parav Pandit wrote: > > > >> From: Zhu Lingshan > >> Sent: Monday, June 13, 2022 6:17 AM > >> device > >> > >> This commit adds a new vDPA netlink attribution > >> VDPA_ATTR_VDPA_DEV_SUPPORTED_FEATURES.

RE: [PATCH V2 5/6] vDPA: answer num of queue pairs = 1 to userspace when VIRTIO_NET_F_MQ == 0

2022-06-14 Thread Parav Pandit via Virtualization
> From: Zhu, Lingshan > Sent: Monday, June 13, 2022 10:33 PM > > > On 6/14/2022 4:36 AM, Parav Pandit wrote: > > > >> From: Zhu Lingshan > >> Sent: Monday, June 13, 2022 6:17 AM > >> To: jasow...@redhat.com; m...@redhat.com > >> Cc: virtualization@lists.linux-foundation.org; > >> net...@vger.

RE: [PATCH v4 0/4] Implement vdpasim stop operation

2022-06-14 Thread Parav Pandit via Virtualization
> From: Jason Wang > Sent: Wednesday, June 1, 2022 11:54 PM > > On Thu, Jun 2, 2022 at 10:59 AM Parav Pandit wrote: > > > > > > > From: Jason Wang > > > Sent: Wednesday, June 1, 2022 10:00 PM > > > > > > On Thu, Jun 2, 2022 at 2:58 AM Parav Pandit wrote: > > > > > > > > > > > > > From: Jaso

RE: [PATCH v4 0/4] Implement vdpasim stop operation

2022-06-16 Thread Parav Pandit via Virtualization
> From: Jason Wang > Sent: Tuesday, June 14, 2022 9:29 PM > > Well, it's an example of how vDPA is implemented. I think we agree that for > vDPA, vendors have the flexibility to implement their perferrable datapath. > Yes for the vdpa level and for the virtio level. > > > > I remember few month

RE: [PATCH v4 0/4] Implement vdpasim stop operation

2022-06-16 Thread Parav Pandit via Virtualization
> From: Jason Wang > Sent: Thursday, June 16, 2022 9:15 PM > > On Fri, Jun 17, 2022 at 3:36 AM Parav Pandit wrote: > > > > > > > From: Jason Wang > > > Sent: Tuesday, June 14, 2022 9:29 PM > > > > > > Well, it's an example of how vDPA is implemented. I think we agree > > > that for vDPA, vend

RE: [PATCH V3 3/6] vDPA: allow userspace to query features of a vDPA device

2022-07-01 Thread Parav Pandit via Virtualization
> From: Zhu Lingshan > Sent: Friday, July 1, 2022 9:28 AM > > This commit adds a new vDPA netlink attribution > VDPA_ATTR_VDPA_DEV_SUPPORTED_FEATURES. Userspace can query > features of vDPA devices through this new attr. > > Fixes: a64917bc2e9b vdpa: (Provide interface to read driver feature)

RE: [PATCH V3 5/6] vDPA: answer num of queue pairs = 1 to userspace when VIRTIO_NET_F_MQ == 0

2022-07-01 Thread Parav Pandit via Virtualization
> From: Zhu Lingshan > Sent: Friday, July 1, 2022 9:28 AM > If VIRTIO_NET_F_MQ == 0, the virtio device should have one queue pair, so > when userspace querying queue pair numbers, it should return mq=1 than > zero. > > Function vdpa_dev_net_config_fill() fills the attributions of the vDPA > de

RE: [PATCH V3 4/6] vDPA: !FEATURES_OK should not block querying device config space

2022-07-01 Thread Parav Pandit via Virtualization
> From: Zhu Lingshan > Sent: Friday, July 1, 2022 9:28 AM > > Users may want to query the config space of a vDPA device, to choose a > appropriate one for a certain guest. This means the users need to read the > config space before FEATURES_OK, and the existence of config space > contents does

RE: [PATCH V3 6/6] vDPA: fix 'cast to restricted le16' warnings in vdpa.c

2022-07-01 Thread Parav Pandit via Virtualization
> From: Zhu Lingshan > Sent: Friday, July 1, 2022 9:28 AM > > This commit fixes spars warnings: cast to restricted __le16 in function > vdpa_dev_net_config_fill() and > vdpa_fill_stats_rec() > Missing fixes tag. But I fail to understand the warning. config.status is le16, and API used is to c

RE: [PATCH V3 3/6] vDPA: allow userspace to query features of a vDPA device

2022-07-04 Thread Parav Pandit via Virtualization
> From: Jason Wang > Sent: Monday, July 4, 2022 12:47 AM > > > 在 2022/7/2 06:02, Parav Pandit 写道: > > > >> From: Zhu Lingshan > >> Sent: Friday, July 1, 2022 9:28 AM > >> > >> This commit adds a new vDPA netlink attribution > >> VDPA_ATTR_VDPA_DEV_SUPPORTED_FEATURES. Userspace can query > feat

RE: [PATCH V3 3/6] vDPA: allow userspace to query features of a vDPA device

2022-07-05 Thread Parav Pandit via Virtualization
> From: Zhu, Lingshan > Sent: Tuesday, July 5, 2022 3:59 AM > > > On 7/4/2022 8:53 PM, Parav Pandit wrote: > >> From: Jason Wang > >> Sent: Monday, July 4, 2022 12:47 AM > >> > >> > >> 在 2022/7/2 06:02, Parav Pandit 写道: > From: Zhu Lingshan > Sent: Friday, July 1, 2022 9:28 AM > >>>

RE: [PATCH V3 3/6] vDPA: allow userspace to query features of a vDPA device

2022-07-05 Thread Parav Pandit via Virtualization
> From: Zhu, Lingshan > Sent: Tuesday, July 5, 2022 12:56 PM > > Both can be queried simultaneously. Each will return their own feature bits > using same attribute. > > It wont lead to the race. > How? It is just a piece of memory, [attr], do you see locks in > nla_put_u64_64bit()? It is a ty

RE: [PATCH V3 3/6] vDPA: allow userspace to query features of a vDPA device

2022-07-05 Thread Parav Pandit via Virtualization
> From: Zhu, Lingshan > Sent: Tuesday, July 5, 2022 10:25 PM > 1. When migrate the VM to a node which has a more resourceful device. If > the source side device does not have MQ, RSS or TSO feature, the vDPA > device assigned to the VM does not have MQ, RSS or TSO as well. When > migrating to a

RE: [PATCH V3 6/6] vDPA: fix 'cast to restricted le16' warnings in vdpa.c

2022-07-08 Thread Parav Pandit via Virtualization
> From: Zhu, Lingshan > Sent: Friday, July 8, 2022 2:25 AM > > > On 7/2/2022 6:18 AM, Parav Pandit wrote: > >> From: Zhu Lingshan > >> Sent: Friday, July 1, 2022 9:28 AM > >> > >> This commit fixes spars warnings: cast to restricted __le16 in > >> function > >> vdpa_dev_net_config_fill() and

RE: [PATCH V3 3/6] vDPA: allow userspace to query features of a vDPA device

2022-07-08 Thread Parav Pandit via Virtualization
> From: Zhu, Lingshan > Sent: Friday, July 8, 2022 2:16 AM > > On 7/2/2022 6:02 AM, Parav Pandit wrote: > > > >> From: Zhu Lingshan > >> Sent: Friday, July 1, 2022 9:28 AM > >> > >> This commit adds a new vDPA netlink attribution > >> VDPA_ATTR_VDPA_DEV_SUPPORTED_FEATURES. Userspace can query

RE: [PATCH V3 5/6] vDPA: answer num of queue pairs = 1 to userspace when VIRTIO_NET_F_MQ == 0

2022-07-08 Thread Parav Pandit via Virtualization
> From: Zhu, Lingshan > Sent: Friday, July 8, 2022 2:21 AM > > > On 7/2/2022 6:07 AM, Parav Pandit wrote: > > > >> From: Zhu Lingshan > >> Sent: Friday, July 1, 2022 9:28 AM > >> If VIRTIO_NET_F_MQ == 0, the virtio device should have one queue > >> pair, so when userspace querying queue pair n

RE: [PATCH V3 5/6] vDPA: answer num of queue pairs = 1 to userspace when VIRTIO_NET_F_MQ == 0

2022-07-12 Thread Parav Pandit via Virtualization
> From: Zhu, Lingshan > Sent: Sunday, July 10, 2022 10:30 PM > > Showing max_vq_pairs of 1 even when _MQ is not negotiated, incorrectly > says that max_vq_pairs is exposed to the guest, but it is not offered. > > > > So, please fix the iproute2 to not print max_vq_pairs when it is not > returned

RE: [PATCH V3 5/6] vDPA: answer num of queue pairs = 1 to userspace when VIRTIO_NET_F_MQ == 0

2022-07-12 Thread Parav Pandit via Virtualization
> From: Zhu, Lingshan > Sent: Tuesday, July 12, 2022 11:03 PM > > > On 7/13/2022 12:48 AM, Parav Pandit wrote: > >> From: Zhu, Lingshan > >> Sent: Sunday, July 10, 2022 10:30 PM > >>> Showing max_vq_pairs of 1 even when _MQ is not negotiated, > >>> incorrectly > >> says that max_vq_pairs is ex

RE: [PATCH V4 3/6] vDPA: allow userspace to query features of a vDPA device

2022-07-22 Thread Parav Pandit via Virtualization
> From: Zhu Lingshan > Sent: Friday, July 22, 2022 7:53 AM > > This commit adds a new vDPA netlink attribution > VDPA_ATTR_VDPA_DEV_SUPPORTED_FEATURES. Userspace can query > features of vDPA devices through this new attr. > > Signed-off-by: Zhu Lingshan > --- > drivers/vdpa/vdpa.c | 13

RE: [PATCH V4 5/6] vDPA: answer num of queue pairs = 1 to userspace when VIRTIO_NET_F_MQ == 0

2022-07-22 Thread Parav Pandit via Virtualization
> From: Zhu Lingshan > Sent: Friday, July 22, 2022 7:53 AM > > If VIRTIO_NET_F_MQ == 0, the virtio device should have one queue pair, so > when userspace querying queue pair numbers, it should return mq=1 than > zero. > > Function vdpa_dev_net_config_fill() fills the attributions of the vDPA

RE: [PATCH V4 3/6] vDPA: allow userspace to query features of a vDPA device

2022-07-24 Thread Parav Pandit via Virtualization
> From: Zhu, Lingshan > Sent: Saturday, July 23, 2022 7:24 AM > > > On 7/22/2022 9:12 PM, Parav Pandit wrote: > >> From: Zhu Lingshan > >> Sent: Friday, July 22, 2022 7:53 AM > >> > >> This commit adds a new vDPA netlink attribution > >> VDPA_ATTR_VDPA_DEV_SUPPORTED_FEATURES. Userspace can q

RE: [PATCH V3 3/6] vDPA: allow userspace to query features of a vDPA device

2022-07-24 Thread Parav Pandit via Virtualization
> From: Zhu, Lingshan > Sent: Saturday, July 23, 2022 7:27 AM > > On 7/6/2022 10:25 AM, Zhu, Lingshan wrote: > > > > > > On 7/6/2022 1:01 AM, Parav Pandit wrote: > >>> From: Zhu, Lingshan > >>> Sent: Tuesday, July 5, 2022 12:56 PM > Both can be queried simultaneously. Each will return the

RE: [PATCH V4 3/6] vDPA: allow userspace to query features of a vDPA device

2022-07-26 Thread Parav Pandit via Virtualization
> From: Zhu, Lingshan > Sent: Tuesday, July 26, 2022 7:03 AM > > On 7/24/2022 11:21 PM, Parav Pandit wrote: > > > >> From: Zhu, Lingshan > >> Sent: Saturday, July 23, 2022 7:24 AM > >> > >> > >> On 7/22/2022 9:12 PM, Parav Pandit wrote: > From: Zhu Lingshan > Sent: Friday, July 22, 2

RE: [PATCH V3 5/6] vDPA: answer num of queue pairs = 1 to userspace when VIRTIO_NET_F_MQ == 0

2022-07-26 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Wednesday, July 13, 2022 1:27 AM > > On Fri, Jul 01, 2022 at 10:07:59PM +, Parav Pandit wrote: > > > > > > > From: Zhu Lingshan > > > Sent: Friday, July 1, 2022 9:28 AM > > > If VIRTIO_NET_F_MQ == 0, the virtio device should have one queue > > > pair, so

RE: [PATCH V3 5/6] vDPA: answer num of queue pairs = 1 to userspace when VIRTIO_NET_F_MQ == 0

2022-07-26 Thread Parav Pandit via Virtualization
> From: Zhu, Lingshan > Sent: Tuesday, July 12, 2022 11:46 PM > > When the user space which invokes netlink commands, detects that _MQ > is not supported, hence it takes max_queue_pair = 1 by itself. > I think the kernel module have all necessary information and it is the only > one which have pr

RE: [PATCH V3 5/6] vDPA: answer num of queue pairs = 1 to userspace when VIRTIO_NET_F_MQ == 0

2022-07-26 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Tuesday, July 26, 2022 3:52 PM > > On Tue, Jul 26, 2022 at 03:56:32PM +, Parav Pandit wrote: > > > > > From: Zhu, Lingshan > > > Sent: Tuesday, July 12, 2022 11:46 PM > > > > When the user space which invokes netlink commands, detects that > > > > _MQ > >

RE: [PATCH V3 5/6] vDPA: answer num of queue pairs = 1 to userspace when VIRTIO_NET_F_MQ == 0

2022-07-26 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Tuesday, July 26, 2022 3:49 PM > > On Tue, Jul 26, 2022 at 03:54:06PM +, Parav Pandit wrote: > > > > > From: Michael S. Tsirkin > > > Sent: Wednesday, July 13, 2022 1:27 AM > > > > > > On Fri, Jul 01, 2022 at 10:07:59PM +, Parav Pandit wrote: > > > >

RE: [PATCH V3 5/6] vDPA: answer num of queue pairs = 1 to userspace when VIRTIO_NET_F_MQ == 0

2022-07-26 Thread Parav Pandit via Virtualization
> From: Zhu, Lingshan > Sent: Tuesday, July 26, 2022 10:15 PM > > On 7/26/2022 11:56 PM, Parav Pandit wrote: > >> From: Zhu, Lingshan > >> Sent: Tuesday, July 12, 2022 11:46 PM > >>> When the user space which invokes netlink commands, detects that > _MQ > >> is not supported, hence it takes max

RE: [PATCH V3 5/6] vDPA: answer num of queue pairs = 1 to userspace when VIRTIO_NET_F_MQ == 0

2022-07-26 Thread Parav Pandit via Virtualization
> From: Zhu, Lingshan > Sent: Tuesday, July 26, 2022 10:53 PM > > On 7/27/2022 10:17 AM, Parav Pandit wrote: > >> From: Zhu, Lingshan > >> Sent: Tuesday, July 26, 2022 10:15 PM > >> > >> On 7/26/2022 11:56 PM, Parav Pandit wrote: > From: Zhu, Lingshan > Sent: Tuesday, July 12, 2022 1

RE: [virtio-dev] [PATCH] virtio-net: use mtu size as buffer length for big packets

2022-08-09 Thread Parav Pandit via Virtualization
> From: Si-Wei Liu > Sent: Tuesday, August 9, 2022 2:39 PM > Currently it is not. Not a single patch nor this patch, but the context for > the > eventual goal is to allow XDP on a MTU=9000 link when guest users > intentionally lower down MTU to 1500. Which application benefit by having asymmetr

RE: [virtio-dev] [PATCH] virtio-net: use mtu size as buffer length for big packets

2022-08-09 Thread Parav Pandit via Virtualization
> From: Si-Wei Liu > Sent: Tuesday, August 9, 2022 3:09 PM > >> From: Si-Wei Liu > >> Sent: Tuesday, August 9, 2022 2:39 PM Currently it is not. Not a > >> single patch nor this patch, but the context for the eventual goal is > >> to allow XDP on a MTU=9000 link when guest users intentionally lo

RE: [PATCH V4 3/6] vDPA: allow userspace to query features of a vDPA device

2022-08-09 Thread Parav Pandit via Virtualization
> From: Zhu, Lingshan > Sent: Wednesday, July 27, 2022 2:02 AM > > > On 7/26/2022 7:06 PM, Parav Pandit wrote: > >> From: Zhu, Lingshan > >> Sent: Tuesday, July 26, 2022 7:03 AM > >> > >> On 7/24/2022 11:21 PM, Parav Pandit wrote: > From: Zhu, Lingshan > Sent: Saturday, July 23, 2022

RE: [PATCH V4 3/6] vDPA: allow userspace to query features of a vDPA device

2022-08-09 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Tuesday, August 9, 2022 3:24 PM > > On Fri, Jul 22, 2022 at 07:53:06PM +0800, Zhu Lingshan wrote: > > This commit adds a new vDPA netlink attribution > > VDPA_ATTR_VDPA_DEV_SUPPORTED_FEATURES. Userspace can query > features of > > vDPA devices through this new a

RE: [PATCH V4 5/6] vDPA: answer num of queue pairs = 1 to userspace when VIRTIO_NET_F_MQ == 0

2022-08-09 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Tuesday, August 9, 2022 3:36 PM > > > After applying this commit, when MQ = 0, iproute2 output: > > > $vdpa dev config show vdpa0 > > > vdpa0: mac 00:e8:ca:11:be:05 link up link_announce false > > > max_vq_pairs 1 mtu 1500 > > > > > No. We do not want to diverge

RE: [virtio-dev] [PATCH] virtio-net: use mtu size as buffer length for big packets

2022-08-09 Thread Parav Pandit via Virtualization
> From: Si-Wei Liu > Sent: Tuesday, August 9, 2022 4:33 PM > > On 8/9/2022 12:18 PM, Parav Pandit wrote: > >> From: Si-Wei Liu > >> Sent: Tuesday, August 9, 2022 3:09 PM > From: Si-Wei Liu > Sent: Tuesday, August 9, 2022 2:39 PM Currently it is not. Not a > single patch nor this

RE: [virtio-dev] [PATCH] virtio-net: use mtu size as buffer length for big packets

2022-08-09 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Tuesday, August 9, 2022 5:38 PM [..] > > > I think virtio-net driver doesn't differentiate MTU and MRU, in > > > which case the receive buffer will be reduced to fit the 1500B > > > payload size when mtu is lowered down to 1500 from 9000. > > How? Driver reduced

RE: [virtio-dev] [PATCH] virtio-net: use mtu size as buffer length for big packets

2022-08-09 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Tuesday, August 9, 2022 6:26 PM > To: Parav Pandit > Cc: Si-Wei Liu ; Jason Wang > ; Gavin Li ; Hemminger, > Stephen ; davem > ; virtualization foundation.org>; Virtio-Dev ; > jesse.brandeb...@intel.com; alexander.h.du...@intel.com; > kubak...@wp.pl; sridhar.sa

RE: [virtio-dev] [PATCH] virtio-net: use mtu size as buffer length for big packets

2022-08-10 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Wednesday, August 10, 2022 5:03 AM > > > > > > Should we make this depend on the vq reset ability maybe? > > > > The advantage of this is to keep TX working. Or we can use device > > reset as a fallback if there's no vq reset. > > > > Thanks > > Device reset i

RE: [virtio-dev] [PATCH] virtio-net: use mtu size as buffer length for big packets

2022-08-10 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Wednesday, August 10, 2022 12:05 PM > > On Wed, Aug 10, 2022 at 04:00:08PM +, Parav Pandit wrote: > > > > > From: Michael S. Tsirkin > > > Sent: Wednesday, August 10, 2022 5:03 AM > > > > > > > > > > Should we make this depend on the vq reset ability mayb

RE: [virtio-dev] [PATCH] virtio-net: use mtu size as buffer length for big packets

2022-08-10 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Wednesday, August 10, 2022 12:59 PM > > On Wed, Aug 10, 2022 at 04:22:41PM +, Parav Pandit wrote: > > > > > From: Michael S. Tsirkin > > > Sent: Wednesday, August 10, 2022 12:05 PM > > > > > > On Wed, Aug 10, 2022 at 04:00:08PM +, Parav Pandit wrote:

RE: [PATCH 1/2] vDPA: allow userspace to query features of a vDPA device

2022-08-15 Thread Parav Pandit via Virtualization
> From: Zhu, Lingshan > Sent: Monday, August 15, 2022 9:49 PM > > On 8/16/2022 2:15 AM, Si-Wei Liu wrote: > > > > > > On 8/15/2022 2:26 AM, Zhu Lingshan wrote: > >> This commit adds a new vDPA netlink attribution > >> VDPA_ATTR_VDPA_DEV_SUPPORTED_FEATURES. Userspace can query > features > >> of

RE: [PATCH 2/2] vDPA: conditionally read fields in virtio-net dev

2022-08-15 Thread Parav Pandit via Virtualization
> From: Zhu Lingshan > Sent: Monday, August 15, 2022 5:27 AM > > Some fields of virtio-net device config space are conditional on the feature > bits, the spec says: > > "The mac address field always exists > (though is only valid if VIRTIO_NET_F_MAC is set)" > > "max_virtqueue_pairs only exist

RE: [PATCH 2/2] vDPA: conditionally read fields in virtio-net dev

2022-08-16 Thread Parav Pandit via Virtualization
> From: Zhu, Lingshan > Sent: Tuesday, August 16, 2022 12:19 AM > > > On 8/16/2022 10:32 AM, Parav Pandit wrote: > >> From: Zhu Lingshan > >> Sent: Monday, August 15, 2022 5:27 AM > >> > >> Some fields of virtio-net device config space are conditional on the > >> feature bits, the spec says: >

RE: [PATCH 2/2] vDPA: conditionally read fields in virtio-net dev

2022-08-18 Thread Parav Pandit via Virtualization
> From: Jason Wang > Sent: Thursday, August 18, 2022 12:19 AM > On 8/16/2022 10:32 AM, Parav Pandit wrote: > >> From: Zhu Lingshan > >> Sent: Monday, August 15, 2022 5:27 AM > >> > >> Some fields of virtio-net device config space are conditional on > >> the feature bits

RE: [PATCH v2 0/2] Improve virtio performance for 9k mtu

2022-08-22 Thread Parav Pandit via Virtualization
> From: Gavin Li > Sent: Friday, August 19, 2022 10:49 AM > > This small series contains two patches that improves virtio netdevice > performance for 9K mtu when GRO/ guest TSO is disabled. > > Gavin Li (2): > virtio-net: introduce and use helper function for guest gso support > checks >

RE: [virtio-dev] [PATCH RESEND v2 2/2] virtio-net: use mtu size as buffer length for big packets

2022-08-26 Thread Parav Pandit via Virtualization
From: Si-Wei Liu Sent: Friday, August 26, 2022 4:52 AM > Sorry for the delay. Didn't notice as this thread was not addressed to my > work email. Please copy to my work email if it needs my immediate attention. Can you please setup your mail client to post plain text mail as required

RE: [virtio-dev] [PATCH RESEND v2 2/2] virtio-net: use mtu size as buffer length for big packets

2022-08-26 Thread Parav Pandit via Virtualization
> From: Si-Wei Liu > Sent: Friday, August 26, 2022 2:05 PM > > > + /* If we can receive ANY GSO packets, we must allocate large ones. > */ > > + if (mtu > ETH_DATA_LEN || guest_gso) { > > + vi->big_packets = true; > > + /* if the guest offload is offered by the device,

RE: [PATCH v4 1/2] virtio-net: introduce and use helper function for guest gso support checks

2022-08-31 Thread Parav Pandit via Virtualization
> From: Gavin Li > Sent: Wednesday, August 31, 2022 5:03 AM > > Probe routine is already several hundred lines. > Use helper function for guest gso support check. > > Signed-off-by: Gavin Li > Reviewed-by: Gavi Teitz > Reviewed-by: Parav Pandit You missed the review by and ack by entries t

RE: [PATCH v5 2/2] virtio-net: use mtu size as buffer length for big packets

2022-09-07 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Wednesday, September 7, 2022 5:27 AM > > On Wed, Sep 07, 2022 at 04:08:54PM +0800, Gavin Li wrote: > > > > On 9/7/2022 1:31 PM, Michael S. Tsirkin wrote: > > > External email: Use caution opening links or attachments > > > > > > > > > On Thu, Sep 01, 2022 at 0

RE: [PATCH v5 2/2] virtio-net: use mtu size as buffer length for big packets

2022-09-07 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Wednesday, September 7, 2022 10:30 AM [..] > > > actually how does this waste space? Is this because your device does > > > not have INDIRECT? > > VQ is 256 entries deep. > > Driver posted total of 256 descriptors. > > Each descriptor points to a page of 4K. >

RE: [PATCH v5 2/2] virtio-net: use mtu size as buffer length for big packets

2022-09-07 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Wednesday, September 7, 2022 10:40 AM > > On Wed, Sep 07, 2022 at 02:33:02PM +, Parav Pandit wrote: > > > > > From: Michael S. Tsirkin > > > Sent: Wednesday, September 7, 2022 10:30 AM > > > > [..] > > > > > actually how does this waste space? Is this bec

RE: [PATCH v5 2/2] virtio-net: use mtu size as buffer length for big packets

2022-09-07 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Wednesday, September 7, 2022 2:16 PM > > On Wed, Sep 07, 2022 at 04:12:47PM +, Parav Pandit wrote: > > > > > From: Michael S. Tsirkin > > > Sent: Wednesday, September 7, 2022 10:40 AM > > > > > > On Wed, Sep 07, 2022 at 02:33:02PM +, Parav Pandit wrote:

RE: [PATCH v5 2/2] virtio-net: use mtu size as buffer length for big packets

2022-09-07 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Wednesday, September 7, 2022 3:12 PM > > Because of shallow queue of 16 entries deep. > > but why is the queue just 16 entries? I explained the calculation in [1] about 16 entries. [1] https://lore.kernel.org/netdev/ph0pr12mb54812ec7f4711c1ea4caa119dc...@ph

RE: [PATCH v5 2/2] virtio-net: use mtu size as buffer length for big packets

2022-09-07 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Wednesday, September 7, 2022 3:24 PM > > On Wed, Sep 07, 2022 at 07:18:06PM +, Parav Pandit wrote: > > > > > From: Michael S. Tsirkin > > > Sent: Wednesday, September 7, 2022 3:12 PM > > > > > > Because of shallow queue of 16 entries deep. > > > > > > but

RE: [PATCH v5 2/2] virtio-net: use mtu size as buffer length for big packets

2022-09-07 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Wednesday, September 7, 2022 3:36 PM > > On Wed, Sep 07, 2022 at 07:27:16PM +, Parav Pandit wrote: > > > > > From: Michael S. Tsirkin > > > Sent: Wednesday, September 7, 2022 3:24 PM > > > > > > On Wed, Sep 07, 2022 at 07:18:06PM +, Parav Pandit wrote

RE: [PATCH v5 2/2] virtio-net: use mtu size as buffer length for big packets

2022-09-07 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Wednesday, September 7, 2022 3:38 PM > > and if possible a larger ring. 1k? What do you expect to see here for which test report should be added to commit log? What is special about 1k vs 512, 128 and 2k? is 1K default for some configuration? __

RE: [PATCH v5 2/2] virtio-net: use mtu size as buffer length for big packets

2022-09-07 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Wednesday, September 7, 2022 3:36 PM > > (c) replace mtu = 0 with sensibly not calling the function when mtu is > unknown. Even when mtu is zero, virtnet_set_big_packets() must be called to act on the gso bits. Currently handling by virtnet_set_big_packets()

RE: [virtio-dev] RE: [PATCH v5 2/2] virtio-net: use mtu size as buffer length for big packets

2022-09-07 Thread Parav Pandit via Virtualization
> From: Si-Wei Liu > Sent: Wednesday, September 7, 2022 5:40 PM > > > On 9/7/2022 12:51 PM, Parav Pandit wrote: > >> And I'd like commit log to include results of perf testing > >> - with indirect feature on > > Which device do you suggest using for this test? > > > You may use software vhost-n

RE: [PATCH 0/3] vdpa: device feature provisioning

2022-09-20 Thread Parav Pandit via Virtualization
Hi Jason, > From: Jason Wang > Sent: Thursday, September 15, 2022 4:51 AM > To: m...@redhat.com; jasow...@redhat.com > Cc: Eli Cohen ; si-wei@oracle.com; Parav Pandit > ; wuzongy...@linux.alibaba.com; > virtualization@lists.linux-foundation.org; linux-ker...@vger.kernel.org; > epere...@redhat

RE: [PATCH v5 2/2] virtio-net: use mtu size as buffer length for big packets

2022-09-22 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Thursday, September 22, 2022 5:35 AM > > On Thu, Sep 01, 2022 at 05:10:38AM +0300, Gavin Li wrote: > > Currently add_recvbuf_big() allocates MAX_SKB_FRAGS segments for big > > packets even when GUEST_* offloads are not present on the device. > > However, if gu

RE: [PATCH v5 2/2] virtio-net: use mtu size as buffer length for big packets

2022-09-22 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Thursday, September 22, 2022 5:27 AM > > > > > > And I'd like commit log to include results of perf testing > > > - with indirect feature on > > Which device do you suggest using for this test? > > AFAIK most devices support INDIRECT, e.g. don't nvidia cards

RE: [PATCH v5 2/2] virtio-net: use mtu size as buffer length for big packets

2022-09-22 Thread Parav Pandit via Virtualization
> From: Michael S. Tsirkin > Sent: Thursday, September 22, 2022 6:15 AM > > It's nitpicking to be frank. v6 arrived while I was traveling and I didn't > notice it. > I see Jason acked that so I guess I will just apply as is. Do you ack v6 too? > Yes. I reviewed it. Gavin added reviewed-by. Th

RE: [PATCH v5 2/2] virtio-net: use mtu size as buffer length for big packets

2022-10-05 Thread Parav Pandit via Virtualization
> From: Jakub Kicinski > Sent: Thursday, September 22, 2022 6:05 PM > > On Thu, 22 Sep 2022 06:14:59 -0400 Michael S. Tsirkin wrote: > > It's nitpicking to be frank. v6 arrived while I was traveling and I > > didn't notice it. I see Jason acked that so I guess I will just apply > > as is. > > O

<    1   2   3