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

2022-07-28 Thread Si-Wei Liu
On 7/27/2022 7:06 PM, Jason Wang wrote: 在 2022/7/28 08:56, Si-Wei Liu 写道: On 7/27/2022 4:47 AM, Zhu, Lingshan wrote: On 7/27/2022 5:43 PM, Si-Wei Liu wrote: Sorry to chime in late in the game. For some reason I couldn't get to most emails for this discussion (I only subscribed t

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

2022-07-28 Thread Si-Wei Liu
On 7/27/2022 8:48 AM, Michael S. Tsirkin wrote: On Wed, Jul 27, 2022 at 03:09:43AM -0700, Si-Wei Liu wrote: On 7/27/2022 2:01 AM, Michael S. Tsirkin wrote: On Wed, Jul 27, 2022 at 12:50:33AM -0700, Si-Wei Liu wrote: On 7/26/2022 11:01 PM, Michael S. Tsirkin wrote: On Wed, Jul 27, 2022 at

spec clarification (was Re: [PATCH V3 4/6] vDPA: !FEATURES_OK should not block querying device config space)

2022-07-28 Thread Si-Wei Liu
Hi Michael, Could you please comment on the different wording between "exist" and "valid" in spec? Having seen quite a few relevant discussions regarding MTU validation and VERSION_1 negotiation on s390, I was in the impression this is not the first time people getting confused because of amb

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

2022-07-28 Thread Si-Wei Liu
On 7/27/2022 7:43 PM, Zhu, Lingshan wrote: On 7/28/2022 8:56 AM, Si-Wei Liu wrote: On 7/27/2022 4:47 AM, Zhu, Lingshan wrote: On 7/27/2022 5:43 PM, Si-Wei Liu wrote: Sorry to chime in late in the game. For some reason I couldn't get to most emails for this discussion (I

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

2022-07-28 Thread Si-Wei Liu
On 7/27/2022 7:44 PM, Zhu, Lingshan wrote: On 7/28/2022 9:41 AM, Si-Wei Liu wrote: On 7/27/2022 4:54 AM, Zhu, Lingshan wrote: On 7/27/2022 6:09 PM, Si-Wei Liu wrote: On 7/27/2022 2:01 AM, Michael S. Tsirkin wrote: On Wed, Jul 27, 2022 at 12:50:33AM -0700, Si-Wei Liu wrote: On 7

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

2022-07-28 Thread Si-Wei Liu
On 7/28/2022 4:35 AM, Michael S. Tsirkin wrote: On Thu, Jul 28, 2022 at 12:08:53AM -0700, Si-Wei Liu wrote: On 7/27/2022 7:06 PM, Jason Wang wrote: 在 2022/7/28 08:56, Si-Wei Liu 写道: On 7/27/2022 4:47 AM, Zhu, Lingshan wrote: On 7/27/2022 5:43 PM, Si-Wei Liu wrote: Sorry to chime in

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

2022-07-29 Thread Si-Wei Liu
On 7/28/2022 7:04 PM, Zhu, Lingshan wrote: On 7/29/2022 5:48 AM, Si-Wei Liu wrote: On 7/27/2022 7:43 PM, Zhu, Lingshan wrote: On 7/28/2022 8:56 AM, Si-Wei Liu wrote: On 7/27/2022 4:47 AM, Zhu, Lingshan wrote: On 7/27/2022 5:43 PM, Si-Wei Liu wrote: Sorry to chime in late in the

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

2022-08-01 Thread Si-Wei Liu
On 7/31/2022 9:44 PM, Jason Wang wrote: 在 2022/7/30 04:55, Si-Wei Liu 写道: On 7/28/2022 7:04 PM, Zhu, Lingshan wrote: On 7/29/2022 5:48 AM, Si-Wei Liu wrote: On 7/27/2022 7:43 PM, Zhu, Lingshan wrote: On 7/28/2022 8:56 AM, Si-Wei Liu wrote: On 7/27/2022 4:47 AM, Zhu, Lingshan

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

2022-08-01 Thread Si-Wei Liu
On 8/1/2022 3:53 PM, Si-Wei Liu wrote: On 7/31/2022 9:44 PM, Jason Wang wrote: 在 2022/7/30 04:55, Si-Wei Liu 写道: On 7/28/2022 7:04 PM, Zhu, Lingshan wrote: On 7/29/2022 5:48 AM, Si-Wei Liu wrote: On 7/27/2022 7:43 PM, Zhu, Lingshan wrote: On 7/28/2022 8:56 AM, Si-Wei Liu wrote

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

2022-08-02 Thread Si-Wei Liu
On 8/1/2022 11:33 PM, Jason Wang wrote: On Tue, Aug 2, 2022 at 6:58 AM Si-Wei Liu wrote: On 8/1/2022 3:53 PM, Si-Wei Liu wrote: On 7/31/2022 9:44 PM, Jason Wang wrote: 在 2022/7/30 04:55, Si-Wei Liu 写道: On 7/28/2022 7:04 PM, Zhu, Lingshan wrote: On 7/29/2022 5:48 AM, Si-Wei Liu wrote

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

2022-08-03 Thread Si-Wei Liu
On 8/2/2022 7:30 PM, Zhu, Lingshan wrote: On 8/3/2022 9:26 AM, Si-Wei Liu wrote: On 8/1/2022 11:33 PM, Jason Wang wrote: On Tue, Aug 2, 2022 at 6:58 AM Si-Wei Liu wrote: On 8/1/2022 3:53 PM, Si-Wei Liu wrote: On 7/31/2022 9:44 PM, Jason Wang wrote: 在 2022/7/30 04:55, Si-Wei Liu 写道

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

2022-08-05 Thread Si-Wei Liu
On 8/1/2022 9:45 PM, 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 GSO is not supported, GUEST GSO (virtio term), or GRO HW (netdev core term) it should have been be called.

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

2022-08-05 Thread Si-Wei Liu
On 8/5/2022 3:11 PM, Si-Wei Liu wrote: On 8/1/2022 9:45 PM, 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 GSO is not supported, GUEST GSO (virtio term), or GRO HW (netdev

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

2022-08-08 Thread Si-Wei Liu
On 8/8/2022 12:31 AM, Gavin Li wrote: On 8/6/2022 6:11 AM, Si-Wei Liu wrote: External email: Use caution opening links or attachments On 8/1/2022 9:45 PM, Gavin Li wrote: Currently add_recvbuf_big() allocates MAX_SKB_FRAGS segments for big packets even when GUEST_* offloads are not

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

2022-08-09 Thread Si-Wei Liu
On 8/9/2022 12:06 AM, Gavin Li wrote: On 8/9/2022 7:56 AM, Si-Wei Liu wrote: External email: Use caution opening links or attachments On 8/8/2022 12:31 AM, Gavin Li wrote: On 8/6/2022 6:11 AM, Si-Wei Liu wrote: External email: Use caution opening links or attachments On 8/1/2022 9:45

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

2022-08-09 Thread Si-Wei Liu
On 8/9/2022 12:44 AM, Jason Wang wrote: On Tue, Aug 9, 2022 at 3:07 PM Gavin Li wrote: On 8/9/2022 7:56 AM, Si-Wei Liu wrote: External email: Use caution opening links or attachments On 8/8/2022 12:31 AM, Gavin Li wrote: On 8/6/2022 6:11 AM, Si-Wei Liu wrote: External email: Use

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

2022-08-09 Thread Si-Wei Liu
On 8/9/2022 11:42 AM, Parav Pandit wrote: 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

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

2022-08-09 Thread Si-Wei Liu
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 patch, but the context for the eventual goal is to allow XDP on a MTU=9000 link when guest

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

2022-08-09 Thread Si-Wei Liu
On 8/9/2022 2:34 PM, Michael S. Tsirkin wrote: On Tue, Aug 09, 2022 at 11:38:52AM -0700, Si-Wei Liu wrote: On 8/9/2022 12:44 AM, Jason Wang wrote: On Tue, Aug 9, 2022 at 3:07 PM Gavin Li wrote: On 8/9/2022 7:56 AM, Si-Wei Liu wrote: External email: Use caution opening links or

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

2022-08-09 Thread Si-Wei Liu
On 8/9/2022 2:37 PM, Michael S. Tsirkin wrote: On Tue, Aug 09, 2022 at 07:18:30PM +, 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 patch, but the context

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

2022-08-09 Thread Si-Wei Liu
On 8/9/2022 3:37 PM, Michael S. Tsirkin wrote: On Tue, Aug 09, 2022 at 03:32:26PM -0700, Si-Wei Liu wrote: On 8/9/2022 2:37 PM, Michael S. Tsirkin wrote: On Tue, Aug 09, 2022 at 07:18:30PM +, Parav Pandit wrote: From: Si-Wei Liu Sent: Tuesday, August 9, 2022 3:09 PM From: Si-Wei Liu

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

2022-08-09 Thread Si-Wei Liu
On 8/9/2022 3:49 PM, Parav Pandit wrote: 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 ; Virtio-Dev ; jesse.brandeb...@intel.com; alexander.h.du...@intel.com; kubak

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

2022-08-09 Thread Si-Wei Liu
On 8/9/2022 12:36 PM, Michael S. Tsirkin wrote: On Fri, Jul 22, 2022 at 01:14:42PM +, Parav Pandit wrote: 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 sho

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

2022-08-10 Thread Si-Wei Liu
On 8/9/2022 11:15 PM, Michael S. Tsirkin wrote: On Wed, Aug 10, 2022 at 02:14:07AM -0400, Michael S. Tsirkin wrote: On Tue, Aug 09, 2022 at 04:24:23PM -0700, Si-Wei Liu wrote: On 8/9/2022 3:49 PM, Parav Pandit wrote: From: Michael S. Tsirkin Sent: Tuesday, August 9, 2022 6:26 PM To: Parav

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

2022-08-10 Thread Si-Wei Liu
On 8/9/2022 6:09 PM, Jason Wang wrote: On Wed, Aug 10, 2022 at 8:54 AM Si-Wei Liu wrote: On 8/9/2022 12:36 PM, Michael S. Tsirkin wrote: On Fri, Jul 22, 2022 at 01:14:42PM +, Parav Pandit wrote: From: Zhu Lingshan Sent: Friday, July 22, 2022 7:53 AM If VIRTIO_NET_F_MQ == 0, the

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

2022-08-15 Thread Si-Wei Liu
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 vDPA devices through this new attr. Signed-off-by: Zhu Lingshan --- drivers/vdpa/vdpa.c | 17 + include/ua

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

2022-08-15 Thread Si-Wei Liu
On 8/15/2022 2:26 AM, Zhu Lingshan wrote: 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 exists if VIRTIO_NET_F_MQ or VIRTIO_NET

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

2022-08-16 Thread Si-Wei Liu
Hi Michael, I just noticed this patch got pulled to linux-next prematurely without getting consensus on code review, am not sure why. Hope it was just an oversight. Unfortunately this introduced functionality regression to at least two cases so far as I see: 1. (bogus) VDPA_ATTR_DEV_NEGOTI

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

2022-08-16 Thread Si-Wei Liu
On 8/15/2022 6:58 PM, Zhu, Lingshan wrote: On 8/16/2022 7:32 AM, Si-Wei Liu wrote: On 8/15/2022 2:26 AM, Zhu Lingshan wrote: 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 val

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

2022-08-16 Thread Si-Wei Liu
On 8/16/2022 12:58 AM, Si-Wei Liu wrote: Can you provide the context or link? It shouldn't work like this, otherwise it is breaking uABI. E.g. how will a legacy/BE supporting kernel/device be backward compatible with older vdpa tool (which has knowledge s/has knowledge/has no know

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

2022-08-16 Thread Si-Wei Liu
On 8/16/2022 2:13 PM, Michael S. Tsirkin wrote: On Tue, Aug 16, 2022 at 12:41:21AM -0700, Si-Wei Liu wrote: Hi Michael, I just noticed this patch got pulled to linux-next prematurely without getting consensus on code review, am not sure why. Hope it was just an oversight. Unfortunately this

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

2022-08-16 Thread Si-Wei Liu
On 8/16/2022 1:29 AM, Zhu, Lingshan wrote: On 8/16/2022 3:41 PM, Si-Wei Liu wrote: Hi Michael, I just noticed this patch got pulled to linux-next prematurely without getting consensus on code review, am not sure why. Hope it was just an oversight. Unfortunately this introduced

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

2022-08-16 Thread Si-Wei Liu
On 8/16/2022 2:08 AM, Zhu, Lingshan wrote: On 8/16/2022 3:58 PM, Si-Wei Liu wrote: On 8/15/2022 6:58 PM, Zhu, Lingshan wrote: On 8/16/2022 7:32 AM, Si-Wei Liu wrote: On 8/15/2022 2:26 AM, Zhu Lingshan wrote: Some fields of virtio-net device config space are conditional on the

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

2022-08-17 Thread Si-Wei Liu
On 8/16/2022 11:23 PM, Zhu, Lingshan wrote: On 8/17/2022 2:14 PM, Michael S. Tsirkin wrote: On Wed, Aug 17, 2022 at 10:11:36AM +0800, Zhu, Lingshan wrote: On 8/17/2022 6:48 AM, Si-Wei Liu wrote: On 8/16/2022 1:29 AM, Zhu, Lingshan wrote: On 8/16/2022 3:41 PM, Si-Wei

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

2022-08-17 Thread Si-Wei Liu
On 8/16/2022 7:14 PM, Zhu, Lingshan wrote: While the fix is fine, the comment is misleading in giving readers false hope. This is in vdpa_dev_net_config_fill() the vdpa tool query path, instead of calls from the VMM dealing with vhost/virtio plumbing specifics. I think what's missing today

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

2022-08-18 Thread Si-Wei Liu
On 8/17/2022 9:15 PM, Jason Wang wrote: 在 2022/8/17 18:37, Michael S. Tsirkin 写道: On Wed, Aug 17, 2022 at 05:43:22PM +0800, Zhu, Lingshan wrote: On 8/17/2022 5:39 PM, Michael S. Tsirkin wrote: On Wed, Aug 17, 2022 at 05:13:59PM +0800, Zhu, Lingshan wrote: On 8/17/2022 4:55 PM, Michael S.

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

2022-08-18 Thread Si-Wei Liu
On 8/17/2022 11:52 PM, Zhu, Lingshan wrote: On 8/18/2022 2:48 AM, Si-Wei Liu wrote: On 8/16/2022 11:23 PM, Zhu, Lingshan wrote: On 8/17/2022 2:14 PM, Michael S. Tsirkin wrote: On Wed, Aug 17, 2022 at 10:11:36AM +0800, Zhu, Lingshan wrote: On 8/17/2022 6:48 AM, Si-Wei Liu wrote

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

2022-08-20 Thread Si-Wei Liu
On 8/18/2022 5:42 PM, Jason Wang wrote: On Fri, Aug 19, 2022 at 7:20 AM Si-Wei Liu wrote: On 8/17/2022 9:15 PM, Jason Wang wrote: 在 2022/8/17 18:37, Michael S. Tsirkin 写道: On Wed, Aug 17, 2022 at 05:43:22PM +0800, Zhu, Lingshan wrote: On 8/17/2022 5:39 PM, Michael S. Tsirkin wrote: On

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

2022-08-25 Thread Si-Wei Liu
On 8/22/2022 8:26 PM, Jason Wang wrote: On Mon, Aug 22, 2022 at 1:08 PM Zhu, Lingshan wrote: On 8/20/2022 4:55 PM, Si-Wei Liu wrote: On 8/18/2022 5:42 PM, Jason Wang wrote: On Fri, Aug 19, 2022 at 7:20 AM Si-Wei Liu wrote: On 8/17/2022 9:15 PM, Jason Wang wrote: 在 2022/8/17 18:37

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

2022-08-26 Thread Si-Wei Liu
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. On 8/25/2022 5:38 AM, Gavin Li wrote: Currently add_recvbuf_big() allocates MAX_SKB_FRAGS segments for big packets even when GUEST_* offloads a

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

2022-08-26 Thread Si-Wei Liu
On 8/26/2022 9:41 AM, Parav Pandit wrote: 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

Re: RFC: control virtqueue size by the vdpa tool

2022-08-30 Thread Si-Wei Liu
On 8/30/2022 12:58 PM, Michael S. Tsirkin wrote: On Tue, Aug 30, 2022 at 06:22:31AM +, Eli Cohen wrote: Hi, I have been experimenting with different queue sizes with mlx5_vdpa and noticed that queue size can affect performance. I would like to propose an extension to vdpa tool t

Re: RFC: control virtqueue size by the vdpa tool

2022-08-30 Thread Si-Wei Liu
On 8/30/2022 3:01 PM, Michael S. Tsirkin wrote: On Tue, Aug 30, 2022 at 02:04:55PM -0700, Si-Wei Liu wrote: On 8/30/2022 12:58 PM, Michael S. Tsirkin wrote: On Tue, Aug 30, 2022 at 06:22:31AM +, Eli Cohen wrote: Hi, I have been experimenting with different queue sizes with mlx5_vdpa

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

2022-08-31 Thread Si-Wei Liu
On 8/29/2022 7:26 PM, Gavin Li wrote: 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 Reviewed-by: Si-Wei Liu --- changelog: v1->v2 - Add new patch --- driv

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

2022-08-31 Thread Si-Wei Liu
be a better name than big_packets_sg_num, where the comment could be written as "number of skb fragments for big packets" rather than "number of sg entries allocated for big packets". Reviewed-by: Si-Wei Liu + /* Host will merge rx buffers for big p

Re: RFC: control virtqueue size by the vdpa tool

2022-08-31 Thread Si-Wei Liu
On 8/30/2022 10:22 PM, Eli Cohen wrote: From: Si-Wei Liu Sent: Wednesday, August 31, 2022 2:23 AM To: Michael S. Tsirkin Cc: Eli Cohen ; virtualization@lists.linux-foundation.org; Jason Wang ; epere...@redhat.com Subject: Re: RFC: control virtqueue size by the vdpa tool On 8/30/2022 3:01

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

2022-09-07 Thread Si-Wei Liu
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-net backend with and without fix to compare. Since this driver fix effectively lowers d

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

2022-09-07 Thread Si-Wei Liu
On 9/7/2022 3:11 PM, Parav Pandit wrote: 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? Yo

Re: [PATCH] vdpa/mlx5: Fix MQ to support non power of two num queues

2022-09-14 Thread Si-Wei Liu
("vdpa/mlx5: Add multiqueue support") Signed-off-by: Eli Cohen Acked-by: Si-Wei Liu Thanks, -Siwei --- drivers/vdpa/mlx5/net/mlx5_vnet.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/

Re: [PATCH V2 2/3] vdpa_sim_net: support feature provisioning

2022-09-23 Thread Si-Wei Liu
On 9/21/2022 7:43 PM, Jason Wang wrote: This patch implements features provisioning for vdpa_sim_net. 1) validating the provisioned features to be a subset of the parent features. 2) clearing the features that is not wanted by the userspace For example: # vdpa mgmtdev show vdpasim_net:

Re: [PATCH V2 3/3] vp_vdpa: support feature provisioning

2022-09-23 Thread Si-Wei Liu
On 9/21/2022 7:43 PM, Jason Wang wrote: This patch allows the device features to be provisioned via netlink. This is done by: 1) validating the provisioned features to be a subset of the parent features. 2) clearing the features that is not wanted by the userspace For example: # vdpa mg

Re: [PATCH V2 2/3] vdpa_sim_net: support feature provisioning

2022-09-26 Thread Si-Wei Liu
On 9/26/2022 12:11 AM, Jason Wang wrote: On Sat, Sep 24, 2022 at 4:01 AM Si-Wei Liu wrote: On 9/21/2022 7:43 PM, Jason Wang wrote: This patch implements features provisioning for vdpa_sim_net. 1) validating the provisioned features to be a subset of the parent features. 2) clearing

Re: [PATCH V2 2/3] vdpa_sim_net: support feature provisioning

2022-09-27 Thread Si-Wei Liu
On 9/26/2022 8:59 PM, Jason Wang wrote: On Tue, Sep 27, 2022 at 9:02 AM Si-Wei Liu wrote: On 9/26/2022 12:11 AM, Jason Wang wrote: On Sat, Sep 24, 2022 at 4:01 AM Si-Wei Liu wrote: On 9/21/2022 7:43 PM, Jason Wang wrote: This patch implements features provisioning for vdpa_sim_net. 1

Re: [PATCH V2 2/3] vdpa_sim_net: support feature provisioning

2022-09-27 Thread Si-Wei Liu
On 9/26/2022 9:07 PM, Jason Wang wrote: On Tue, Sep 27, 2022 at 11:59 AM Jason Wang wrote: On Tue, Sep 27, 2022 at 9:02 AM Si-Wei Liu wrote: On 9/26/2022 12:11 AM, Jason Wang wrote: On Sat, Sep 24, 2022 at 4:01 AM Si-Wei Liu wrote: On 9/21/2022 7:43 PM, Jason Wang wrote: This patch

Re: [PATCH V2 2/3] vdpa_sim_net: support feature provisioning

2022-10-06 Thread Si-Wei Liu
On 9/28/2022 9:55 PM, Jason Wang wrote: On Tue, Sep 27, 2022 at 5:41 PM Si-Wei Liu wrote: On 9/26/2022 8:59 PM, Jason Wang wrote: On Tue, Sep 27, 2022 at 9:02 AM Si-Wei Liu wrote: On 9/26/2022 12:11 AM, Jason Wang wrote: On Sat, Sep 24, 2022 at 4:01 AM Si-Wei Liu wrote: On 9/21

Re: [PATCH V2 2/3] vdpa_sim_net: support feature provisioning

2022-10-10 Thread Si-Wei Liu
Hi Michael, Noticed that you just merged this series that we now got two nominally duplicated attributes: VDPA_ATTR_VDPA_DEV_SUPPORTED_FEATURES and VDPA_ATTR_DEV_FEATURES. I think Jason agreed to remove one of them but did not get chance to post a new series to catch up with the merge window.

[PATCH] vdpa: merge functionally duplicated dev_features attributes

2022-10-10 Thread Si-Wei Liu
inherited as a whole from the latter, or can be a subset of the latter if explicitly specified. Signed-off-by: Si-Wei Liu --- drivers/vdpa/vdpa.c | 2 +- include/uapi/linux/vdpa.h | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/vdpa/vdpa.c b/drivers/vdpa/vdpa.c

[PATCH 1/4] vdpa: save vdpa_dev_set_config in struct vdpa_device

2022-10-14 Thread Si-Wei Liu
ation are carried over. Which will be used in subsequent commits. Signed-off-by: Si-Wei Liu --- include/linux/vdpa.h | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h index 6d0f5e4..f1838f5 100644 --- a/in

[PATCH 4/4] vdpa: fix improper error message when adding vdpa dev

2022-10-14 Thread Si-Wei Liu
e vdpasim0 mtu 5000 max_vqp 2 Error: vdpa: Some provided attributes are not supported. kernel answers: Operation not supported $ vdpa dev add mgmtdev vdpasim_net name vdpasim0 max_vqp 2 Error: vdpa: All provided attributes are not supported. kernel answers: Operation not supported Signed-off-by:

[PATCH 0/4] vDPA: dev config export via "vdpa dev show" command

2022-10-14 Thread Si-Wei Liu
4.2 vendor_id max_vqs 9 max_vq_size 256 mac e4:11:c6:d3:45:f0 max_vq_pairs 4 $ vdpa dev -jp show { "dev": { "vdpa0": { "type": "network", "mgmtdev": "pci/:41:04.2", "vendor_id": 5

[PATCH 3/4] vdpa: show dev config as-is in "vdpa dev show" output

2022-10-14 Thread Si-Wei Liu
dor_id": , "max_vqs": 9, "max_vq_size": 256, "mac": "e4:11:c6:d3:45:f0", "max_vq_pairs": 4 } } } Signed-off-by: Si-Wei Liu --- drivers/vdpa/vdpa.c | 39 +

[PATCH 2/4] vdpa: pass initial config to _vdpa_register_device()

2022-10-14 Thread Si-Wei Liu
Just as _vdpa_register_device taking @nvqs as the number of queues to feed userspace inquery via vdpa_dev_fill(), we can follow the same to stash config attributes in struct vdpa_device at the time of vdpa registration. Signed-off-by: Si-Wei Liu --- drivers/vdpa/ifcvf/ifcvf_main.c | 2

Re: [PATCH V2 2/3] vdpa_sim_net: support feature provisioning

2022-10-17 Thread Si-Wei Liu
On 10/13/2022 12:10 AM, Jason Wang wrote: 在 2022/10/7 08:35, Si-Wei Liu 写道: On 9/28/2022 9:55 PM, Jason Wang wrote: On Tue, Sep 27, 2022 at 5:41 PM Si-Wei Liu wrote: On 9/26/2022 8:59 PM, Jason Wang wrote: On Tue, Sep 27, 2022 at 9:02 AM Si-Wei Liu wrote: On 9/26/2022 12:11 AM

Re: [PATCH 0/4] vDPA: dev config export via "vdpa dev show" command

2022-10-17 Thread Si-Wei Liu
On 10/17/2022 12:08 AM, Jason Wang wrote: Adding Sean and Daniel for more thoughts. On Sat, Oct 15, 2022 at 9:33 AM Si-Wei Liu wrote: Live migration of vdpa would typically require re-instate vdpa device with an idential set of configs on the destination node, same way as how source node

Re: [PATCH 0/4] vDPA: dev config export via "vdpa dev show" command

2022-10-17 Thread Si-Wei Liu
On 10/17/2022 5:28 AM, Sean Mooney wrote: On Mon, 2022-10-17 at 15:08 +0800, Jason Wang wrote: Adding Sean and Daniel for more thoughts. On Sat, Oct 15, 2022 at 9:33 AM Si-Wei Liu wrote: Live migration of vdpa would typically require re-instate vdpa device with an idential set of configs

Re: [PATCH v2 1/4] vdpa: Add resume operation

2022-10-17 Thread Si-Wei Liu
Hi, I don't know why but it looks that this series wasn't showing up in the list for some reason. Only the recipients in the To or Cc lines seemed able to get it. Would it be possible to fix the mail client or include me to the thread for review? Thanks, -Siwei On 10/17/2022 12:19 AM, Jaso

Re: [PATCH 1/4] vdpa/mlx5: Fix rule forwarding VLAN to TIR

2022-10-18 Thread Si-Wei Liu
ff-by: Eli Cohen Reviewed-by: Si-Wei Liu --- drivers/vdpa/mlx5/net/mlx5_vnet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c index 90913365def4..dd29fdfc24ed 100644 --- a/drivers/vdpa/mlx5/net/mlx5_vnet

Re: [PATCH 2/4] vdpa/mlx5: Move some definitions to a new header file

2022-10-18 Thread Si-Wei Liu
On 10/18/2022 4:12 AM, Eli Cohen wrote: Move some definitions from mlx5_vnet.c to newly added header file mlx5_vnet.h. We need these definitions for the following patches that add debugfs tree to expose information vital for debug. Signed-off-by: Eli Cohen Reviewed-by: Si-Wei Liu

Re: [PATCH 3/4] vdpa/mlx5: Add debugfs subtree

2022-10-18 Thread Si-Wei Liu
/sys/kernel/debug/mlx5/mlx5_core.sf.1/vdpa-0/rx/tirn Signed-off-by: Eli Cohen LGTM Reviewed-by: Si-Wei Liu --- drivers/vdpa/mlx5/Makefile| 2 +- drivers/vdpa/mlx5/net/debug.c | 66 +++ drivers/vdpa/mlx5/net/mlx5_vnet.c | 11 ++ drivers/vdpa/mlx5

Re: [PATCH 4/4] vdpa/mlx5: Add RX counters to debugfs

2022-10-18 Thread Si-Wei Liu
On 10/18/2022 4:12 AM, Eli Cohen wrote: For each interface, either VLAN tagged or untagged, add two hardware counters: one for unicast and another for multicast. The counters count RX packets and bytes and can be read through debugfs: $ cat /sys/kernel/debug/mlx5/mlx5_core.sf.1/vdpa-0/rx/untag

Re: [PATCH 0/4] vDPA: dev config export via "vdpa dev show" command

2022-10-18 Thread Si-Wei Liu
On 10/18/2022 1:41 AM, Jason Wang wrote: On Tue, Oct 18, 2022 at 6:58 AM Si-Wei Liu wrote: On 10/17/2022 12:08 AM, Jason Wang wrote: Adding Sean and Daniel for more thoughts. On Sat, Oct 15, 2022 at 9:33 AM Si-Wei Liu wrote: Live migration of vdpa would typically require re-instate

[PATCH v2 2/4] vdpa: pass initial config to _vdpa_register_device()

2022-10-18 Thread Si-Wei Liu
Just as _vdpa_register_device taking @nvqs as the number of queues to feed userspace inquery via vdpa_dev_fill(), we can follow the same to stash config attributes in struct vdpa_device at the time of vdpa registration. Signed-off-by: Si-Wei Liu --- drivers/vdpa/ifcvf/ifcvf_main.c | 2

[PATCH v2 1/4] vdpa: save vdpa_dev_set_config in struct vdpa_device

2022-10-18 Thread Si-Wei Liu
ation are carried over. Which will be used in subsequent commits. Signed-off-by: Si-Wei Liu --- include/linux/vdpa.h | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h index 6d0f5e4..f1838f5 100644 --- a/in

[PATCH v2 4/4] vdpa: fix improper error message when adding vdpa dev

2022-10-18 Thread Si-Wei Liu
e vdpasim0 mtu 5000 max_vqp 2 Error: vdpa: Some provided attributes are not supported. kernel answers: Operation not supported $ vdpa dev add mgmtdev vdpasim_net name vdpasim0 max_vqp 2 Error: vdpa: All provided attributes are not supported. kernel answers: Operation not supported Signed-off-by:

[PATCH v2 0/4] vDPA: dev config export via "vdpa dev show" command

2022-10-18 Thread Si-Wei Liu
or_id": , "max_vqs": 9, "max_vq_size": 256, "virtio_config": { "mac": "e4:11:c6:d3:45:f0", "max_vq_pairs": 4 } } } } --- v1 -> v2: -

[PATCH v2 3/4] vdpa: show dev config as-is in "vdpa dev show" output

2022-10-18 Thread Si-Wei Liu
2", "vendor_id": , "max_vqs": 9, "max_vq_size": 256, "virtio_config": { "mac": "e4:11:c6:d3:45:f0", "max_vq_pairs": 4 } } } } Si

[PATCH] vdpa/mlx5: should keep avail_index despite device status

2020-10-01 Thread Si-Wei Liu
index, regardless of vDPA device status. Save the index that was last seen when virtq was stopped, so that userspace doesn't complain. Signed-off-by: Si-Wei Liu --- drivers/vdpa/mlx5/net/mlx5_vnet.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/dr

[PATCH] vhost-vdpa: fix page pinning leakage in error path

2020-10-01 Thread Si-Wei Liu
5fb06 ("vhost: introduce vDPA-based backend") Signed-off-by: Si-Wei Liu --- drivers/vhost/vdpa.c | 121 +++ 1 file changed, 73 insertions(+), 48 deletions(-) diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c index 796fe97..abc4aa2 10064

[PATCH v2] vhost-vdpa: fix page pinning leakage in error path

2020-10-01 Thread Si-Wei Liu
885f6 ("vhost: introduce vDPA-based backend") Signed-off-by: Si-Wei Liu --- Changes in v2: - Fix incorrect target SHA1 referenced drivers/vhost/vdpa.c | 121 +++ 1 file changed, 73 insertions(+), 48 deletions(-) diff --git a/drivers/vhost/v

[PATCH v3 0/2] vhost-vdpa mapping error path fixes

2020-10-02 Thread Si-Wei Liu
t_vdpa_map() failure This patchset attempts to address the above issues. Changes in v3: - Factor out changes in vhost_vdpa_map() and the fix for page pinning leak to separate patches (Jason) --- Si-Wei Liu (2): vhost-vdpa: fix vhost_vdpa_map() on error condition vhost-vdpa: fix page pinning

[PATCH v3 1/2] vhost-vdpa: fix vhost_vdpa_map() on error condition

2020-10-02 Thread Si-Wei Liu
vhost_vdpa_map() should remove the iotlb entry just added if the corresponding mapping fails to set up properly. Fixes: 4c8cf31885f6 ("vhost: introduce vDPA-based backend") Signed-off-by: Si-Wei Liu --- drivers/vhost/vdpa.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dri

[PATCH v3 2/2] vhost-vdpa: fix page pinning leakage in error path

2020-10-02 Thread Si-Wei Liu
885f6 ("vhost: introduce vDPA-based backend") Signed-off-by: Si-Wei Liu --- Changes in v3: - Factor out vhost_vdpa_map() change to a separate patch Changes in v2: - Fix incorrect target SHA1 referenced drivers/vhost/vdpa.c | 119 ++- 1 f

Re: [PATCH v3 2/2] vhost-vdpa: fix page pinning leakage in error path

2020-10-13 Thread si-wei liu
On 10/9/2020 7:27 PM, Jason Wang wrote: On 2020/10/3 下午1:02, Si-Wei Liu wrote: Pinned pages are not properly accounted particularly when mapping error occurs on IOTLB update. Clean up dangling pinned pages for the error path. As the inflight pinned pages, specifically for memory region that

<    1   2   3   4   5