Re: [PATCH v5] vdpa/ifcvf: fix the calculation of queuepair

2022-09-23 Thread Michael S. Tsirkin
PA/ifcvf: detect and use the onboard number of queues > directly") > Signed-off-by: Angus Chen > Reviewed-by: Jason Wang > Reviewed-by: Michael S. Tsirkin > Acked-by: Zhu Lingshan > --- > drivers/vdpa/ifcvf/ifcvf_base.c | 4 ++-- > 1 file changed, 2 insert

Re: [PATCH v3] vdpa/ifcvf: fix the calculation of queuepair

2022-09-23 Thread Michael S. Tsirkin
On Fri, Sep 23, 2022 at 01:43:36PM +0800, Zhu, Lingshan wrote: > > > On 9/23/2022 1:32 PM, Michael S. Tsirkin wrote: > > On Fri, Sep 23, 2022 at 11:21:41AM +0800, Zhu, Lingshan wrote: > > > > > > On 9/23/2022 9:03 AM, Angus Chen wrote: > > &

Re: [PATCH v3] vdpa/ifcvf: fix the calculation of queuepair

2022-09-22 Thread Michael S. Tsirkin
On Fri, Sep 23, 2022 at 11:21:41AM +0800, Zhu, Lingshan wrote: > > > On 9/23/2022 9:03 AM, Angus Chen wrote: > > The queuepair should be divided by 2 and > > it should not be hw->nr_vring when multi-queue feature was enabled > This is not about MQ, even no MQ, there are still space in the cap

Re: [PATCH v3] vdpa/ifcvf: fix the calculation of queuepair

2022-09-22 Thread Michael S. Tsirkin
On Fri, Sep 23, 2022 at 09:03:56AM +0800, Angus Chen wrote: > The queuepair should be divided by 2 and > it should not be hw->nr_vring when multi-queue feature was enabled > > Fixes: 2ddae773c93b ("vDPA/ifcvf: detect and use the onboard number of queues > directly") > > changes in v2: > -

Re: [PATCH] vDPA/ifcvf: fix the Calculation of queuepair

2022-09-22 Thread Michael S. Tsirkin
On Thu, Sep 22, 2022 at 06:31:32PM +0800, Zhu, Lingshan wrote: > > > On 9/22/2022 6:17 PM, Michael S. Tsirkin wrote: > > On Thu, Sep 22, 2022 at 06:07:58PM +0800, Zhu, Lingshan wrote: > > > > > > On 9/22/2022 5:06 PM, Michael S. Tsirkin wrote: > > >

Re: 答复: [PATCH] vDPA/ifcvf: fix the Calculation of queuepair

2022-09-22 Thread Michael S. Tsirkin
On Thu, Sep 22, 2022 at 10:52:05AM +, Angus Chen wrote: > > > > On 9/22/2022 6:17 PM, Michael S. Tsirkin wrote: > > On Thu, Sep 22, 2022 at 06:07:58PM +0800, Zhu, Lingshan wrote: > >> > >> On 9/22/2022 5:06 PM, Michael S. Tsirkin wrote: > >>>

Re: [PATCH v2] virtio-blk: Fix WARN_ON_ONCE in virtio_queue_rq()

2022-09-22 Thread Michael S. Tsirkin
On Thu, Sep 22, 2022 at 12:57:01PM -0400, Michael S. Tsirkin wrote: > On Thu, Sep 22, 2022 at 11:45:15PM +0900, Suwan Kim wrote: > > Hi Michael, > > > > Can this patch be merged to the next rc? > > We received two bug reports about this issue and need to fix it. >

Re: [PATCH v2] virtio_blk: add SECURE ERASE command support

2022-09-22 Thread Michael S. Tsirkin
On Tue, Sep 20, 2022 at 02:10:37PM -0400, Stefan Hajnoczi wrote: > On Sun, Sep 18, 2022 at 07:07:34PM +0300, Alvaro Karsz wrote: > > > sounds good. Add a code comment? > > > > I will. > > > > > yes but I now see two places that seem to include this logic. > > > > > > Yes, this is because the

Re: [PATCH v2] virtio_blk: add SECURE ERASE command support

2022-09-22 Thread Michael S. Tsirkin
On Tue, Sep 20, 2022 at 02:11:40PM -0400, Stefan Hajnoczi wrote: > On Mon, Sep 19, 2022 at 09:09:05PM +0300, Alvaro Karsz wrote: > > Thanks for the reply. > > > > > This can be simplified with min_not_zero(). > > > > Ok, I will do it in the next version. > > > > > It's worth including a comment

Re: [PATCH v2] virtio-blk: Fix WARN_ON_ONCE in virtio_queue_rq()

2022-09-22 Thread Michael S. Tsirkin
On Thu, Sep 22, 2022 at 11:45:15PM +0900, Suwan Kim wrote: > Hi Michael, > > Can this patch be merged to the next rc? > We received two bug reports about this issue and need to fix it. > > Regards, > Suwan Kim > > > On Wed, Aug 31, 2022 at 9:44 PM Pankaj Raghav wrote: > > > > On Wed, Aug 31,

Re: [PATCH] vDPA/ifcvf: fix the Calculation of queuepair

2022-09-22 Thread Michael S. Tsirkin
Thanks! Let's see if we get an ack. Minor things for the future (in case a new version will be needed): Subject should include the patch version. Also pls avoid capital letters in the middle of the sentence. E.g. [PATCH v3] vDPA/ifcvf: fix the calculation of queuepair On Thu, Sep 22, 2022 at

Re: [PATCH] vDPA/ifcvf: fix the Calculation of queuepair

2022-09-22 Thread Michael S. Tsirkin
On Thu, Sep 22, 2022 at 06:07:58PM +0800, Zhu, Lingshan wrote: > > > On 9/22/2022 5:06 PM, Michael S. Tsirkin wrote: > > On Thu, Sep 22, 2022 at 08:55:26AM +, Angus Chen wrote: > > > >From 4f65eae86ab15d7abb8bd30401187cb195dfd27b Mon Sep 17 00:00:00 2001 > >

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

2022-09-22 Thread Michael S. Tsirkin
On Thu, Sep 22, 2022 at 10:04:53AM +, Parav Pandit wrote: > > > 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_

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

2022-09-22 Thread Michael S. Tsirkin
d-by: Parav Pandit > Reviewed-by: Xuan Zhuo > Reviewed-by: Si-Wei Liu OK I think the logic is correct, it's just a bit harder to read than necessary. Small improvement suggestions: > --- > changelog: > v4->v5 > - Addressed comments from Michael S. Tsirkin > - Improve commit

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

2022-09-22 Thread Michael S. Tsirkin
On Wed, Sep 07, 2022 at 07:51:38PM +, Parav Pandit wrote: > > > 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. Tsirk

Re: [PATCH] Do not name control queue for virtio-net

2022-09-22 Thread Michael S. Tsirkin
On Thu, Sep 22, 2022 at 11:10:37AM +0200, Paolo Abeni wrote: > On Sun, 2022-09-18 at 08:17 -0400, Michael S. Tsirkin wrote: > > On Sun, Sep 18, 2022 at 05:00:20PM +0800, Junbo wrote: > > > hi Michael > > > > > > in virtio-net.c > > >  

Re: [PATCH] Do not name control queue for virtio-net

2022-09-22 Thread Michael S. Tsirkin
On Sun, Sep 18, 2022 at 05:00:20PM +0800, Junbo wrote: > hi Michael > > in virtio-net.c >     /* Parameters for control virtqueue, if any */ >     if (vi->has_cvq) { >         callbacks[total_vqs - 1] = NULL; >         names[total_vqs - 1] = "control"; >     } > > I think the Author who write

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

2022-09-22 Thread Michael S. Tsirkin
On Thu, Sep 22, 2022 at 08:01:23AM +, Eli Cohen wrote: > > From: Michael S. Tsirkin > > Sent: Thursday, 22 September 2022 10:53 > > To: Eli Cohen > > Cc: Jason Wang ; si-wei@oracle.com; Parav > > Pandit ; wuzongy...@linux.alibaba.com; > > virtualizati

Re: [PATCH] vDPA/ifcvf: fix the Calculation of queuepair

2022-09-22 Thread Michael S. Tsirkin
hw->lm_cfg; > - q_pair_id = qid / hw->nr_vring; > + q_pair_id = qid / 2; > avail_idx_addr = _lm->vring_lm_cfg[q_pair_id].idx_addr[qid % 2]; > hw->vring[qid].last_avail_idx = num; > vp_iowrite16(num, avail_idx_addr); Pls CC more

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

2022-09-22 Thread Michael S. Tsirkin
On Thu, Sep 22, 2022 at 07:47:40AM +, Eli Cohen wrote: > > > > -Original Message- > > From: Michael S. Tsirkin > > Sent: Thursday, 22 September 2022 10:30 > > To: Eli Cohen > > Cc: Jason Wang ; si-wei@oracle.com; Parav >

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

2022-09-22 Thread Michael S. Tsirkin
On Thu, Sep 22, 2022 at 05:13:59AM +, Eli Cohen wrote: > > From: Jason Wang > > Sent: Thursday, 22 September 2022 5:43 > > To: m...@redhat.com; jasow...@redhat.com > > Cc: Eli Cohen ; si-wei@oracle.com; Parav Pandit > > ; wuzongy...@linux.alibaba.com; > >

Re: [PATCH v2] virtio_blk: add SECURE ERASE command support

2022-09-18 Thread Michael S. Tsirkin
On Sun, Sep 18, 2022 at 05:01:53PM +0300, Alvaro Karsz wrote: > Thanks for the reply. > > > why minimum? > > > why is that? > > This was discussed in the previous version > (https://www.spinics.net/lists/linux-virtualization/msg58232.html). > As far as I know, the Linux kernel uses the same

Re: [PATCH v2] virtio_blk: add SECURE ERASE command support

2022-09-18 Thread Michael S. Tsirkin
On Mon, Aug 29, 2022 at 11:23:13AM +0300, Alvaro Karsz wrote: > Support for the VIRTIO_BLK_F_SECURE_ERASE VirtIO feature. > > A device that offers this feature can receive VIRTIO_BLK_T_SECURE_ERASE > commands. > > A device which supports this feature has the following fields in the > virtio

Re: [PATCH] Do not name control queue for virtio-net

2022-09-18 Thread Michael S. Tsirkin
upt always named > 'virtioX-config'. > > So I think it's better to not explicitly give the "control" here, it's > useless...   > > > Michael S. Tsirkin 于2022年9月18日周日 14:56写道: > > On Sat, Sep 17, 2022 at 09:28:57AM +, junbo4...@gmail.com wrote: >

Re: [PATCH] Do not name control queue for virtio-net

2022-09-18 Thread Michael S. Tsirkin
On Sat, Sep 17, 2022 at 09:28:57AM +, junbo4...@gmail.com wrote: > From: Junbo > > In virtio drivers, the control queue always named -config. > > Signed-off-by: Junbo I don't think that's right. config is the config interrupt. > --- > drivers/net/virtio_net.c | 3 ++- > 1 file

Re: [PATCH] virtio_bt: Fix alignment in configuration struct

2022-09-08 Thread Michael S. Tsirkin
On Tue, Aug 30, 2022 at 09:45:02AM -0400, Michael S. Tsirkin wrote: > On Thu, Aug 11, 2022 at 10:02:31AM -0700, Luiz Augusto von Dentz wrote: > > Hi Michael, > > > > On Thu, Aug 11, 2022 at 1:00 AM Michael S. Tsirkin wrote: > > > > > > On Mon, Aug 08, 2022

Re: [PATCH net] virtio-net: add cond_resched() to the command waiting loop

2022-09-07 Thread Michael S. Tsirkin
On Thu, Sep 08, 2022 at 10:21:45AM +0800, Jason Wang wrote: > > 在 2022/9/7 15:46, Michael S. Tsirkin 写道: > > On Wed, Sep 07, 2022 at 09:07:20AM +0200, Paolo Abeni wrote: > > > On Wed, 2022-09-07 at 10:09 +0800, Jason Wang wrote: > > > > On Tue, Sep 6, 2

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

2022-09-07 Thread Michael S. Tsirkin
On Wed, Sep 07, 2022 at 03:36:16PM -0400, Michael S. Tsirkin wrote: > 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,

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

2022-09-07 Thread Michael S. Tsirkin
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: > > > > > > > From: Michael S. Tsirk

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

2022-09-07 Thread Michael S. Tsirkin
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 why is the queue just 16 entries? > I explain

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

2022-09-07 Thread Michael S. Tsirkin
On Wed, Sep 07, 2022 at 07:06:09PM +, Parav Pandit wrote: > > 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 >

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

2022-09-07 Thread Michael S. Tsirkin
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: > > > > > > > From: Michael S. Tsi

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

2022-09-07 Thread Michael S. Tsirkin
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 because your device does > > > > no

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

2022-09-07 Thread Michael S. Tsirkin
On Wed, Sep 07, 2022 at 02:08:18PM +, Parav Pandit wrote: > > > 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

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

2022-09-07 Thread Michael S. Tsirkin
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 05:10:38AM +0300, Gavin Li wrote: > > >

Re: [PATCH net] virtio-net: add cond_resched() to the command waiting loop

2022-09-07 Thread Michael S. Tsirkin
On Wed, Sep 07, 2022 at 09:07:20AM +0200, Paolo Abeni wrote: > On Wed, 2022-09-07 at 10:09 +0800, Jason Wang wrote: > > On Tue, Sep 6, 2022 at 6:56 PM Paolo Abeni wrote: > > > > > > On Mon, 2022-09-05 at 15:49 +0800, Jason Wang wrote: > > > > On Mon, Se

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

2022-09-06 Thread Michael S. Tsirkin
-by: Parav Pandit > Reviewed-by: Xuan Zhuo > Reviewed-by: Si-Wei Liu Which configurations were tested? Did you test devices without VIRTIO_NET_F_MTU ? > --- > changelog: > v4->v5 > - Addressed comments from Michael S. Tsirkin > - Improve commit message > v3->

Re: [PATCH 3/6] vsock: add netdev to vhost/virtio vsock

2022-09-06 Thread Michael S. Tsirkin
On Mon, Aug 15, 2022 at 10:56:06AM -0700, Bobby Eshleman wrote: > In order to support usage of qdisc on vsock traffic, this commit > introduces a struct net_device to vhost and virtio vsock. > > Two new devices are created, vhost-vsock for vhost and virtio-vsock > for virtio. The devices are

Re: [PATCH net] virtio-net: add cond_resched() to the command waiting loop

2022-09-05 Thread Michael S. Tsirkin
On Mon, Sep 05, 2022 at 12:53:41PM +0800, Jason Wang wrote: > Adding cond_resched() to the command waiting loop for a better > co-operation with the scheduler. This allows to give CPU a breath to > run other task(workqueue) instead of busy looping when preemption is > not allowed. > > What's more

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

2022-09-02 Thread Michael S. Tsirkin
> > > >> > > >> 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: > > >>>&

Re: [PATCH v2] vduse: prevent uninitialized memory accesses

2022-08-31 Thread Michael S. Tsirkin
On Wed, Aug 31, 2022 at 05:01:11PM +0200, Maxime Coquelin wrote: > On 8/29/22 09:48, Greg KH wrote: > > On Mon, Aug 29, 2022 at 09:34:24AM +0200, Maxime Coquelin wrote: > > > If the VDUSE application provides a smaller config space > > > than the driver expects, the driver may use uninitialized >

Re: [PATCH v2] vduse: prevent uninitialized memory accesses

2022-08-31 Thread Michael S. Tsirkin
On Wed, Aug 31, 2022 at 05:01:11PM +0200, Maxime Coquelin wrote: > On 8/29/22 09:48, Greg KH wrote: > > On Mon, Aug 29, 2022 at 09:34:24AM +0200, Maxime Coquelin wrote: > > > If the VDUSE application provides a smaller config space > > > than the driver expects, the driver may use uninitialized >

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

2022-08-31 Thread Michael S. Tsirkin
On Wed, Aug 31, 2022 at 04:05:41PM +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 guest GSO is not supported, it would be sufficient to > allocate segments to cover just

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

2022-08-31 Thread Michael S. Tsirkin
On Wed, Aug 31, 2022 at 04:05:40PM +0300, 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: Xuan Zhuo > Reviewed-by: Si-Wei Liu

Re: [PATCH] virtio_net: Abort driver initialization if device fails

2022-08-31 Thread Michael S. Tsirkin
On Mon, Aug 29, 2022 at 04:49:02AM +, Eli Cohen wrote: > > From: Michael S. Tsirkin > > Sent: Sunday, August 28, 2022 11:08 PM > > To: Eli Cohen > > Cc: jasow...@redhat.com; epere...@redhat.com; si-wei@oracle.com; > > virtualization@lists.linux-foundati

Re: RFC: control virtqueue size by the vdpa tool

2022-08-30 Thread Michael S. Tsirkin
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

Re: RFC: control virtqueue size by the vdpa tool

2022-08-30 Thread Michael S. Tsirkin
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 to allow to specify the > queue >

Re: [PATCH] virtio_bt: Fix alignment in configuration struct

2022-08-30 Thread Michael S. Tsirkin
On Thu, Aug 11, 2022 at 10:02:31AM -0700, Luiz Augusto von Dentz wrote: > Hi Michael, > > On Thu, Aug 11, 2022 at 1:00 AM Michael S. Tsirkin wrote: > > > > On Mon, Aug 08, 2022 at 08:16:11AM -0400, Michael S. Tsirkin wrote: > > > On Mon, Aug 08, 2022 at 02:04:

Re: RFC: control virtqueue size by the vdpa tool

2022-08-30 Thread Michael S. Tsirkin
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. Absolutely. Can you share the results btw? Would be very interesting. > I would like to

Re: [PATCH] virtio_net: Abort driver initialization if device fails

2022-08-28 Thread Michael S. Tsirkin
On Sun, Aug 28, 2022 at 06:48:20PM +0300, Eli Cohen wrote: > Read the status bit after virtio_device_ready() to check if device > initialization was successful. If it was not, abort driver > initialization to avoid further attempts to access device resources. > > Abort is required per virtio spec

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

2022-08-18 Thread Michael S. Tsirkin
On Fri, Aug 19, 2022 at 08:42:32AM +0800, 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 W

Re: [PATCH 0/6] virtio/vsock: introduce dgrams, sk_buff, and qdisc

2022-08-17 Thread Michael S. Tsirkin
On Tue, Aug 16, 2022 at 11:08:26AM +, Bobby Eshleman wrote: > On Wed, Aug 17, 2022 at 01:02:52PM -0400, Michael S. Tsirkin wrote: > > On Tue, Aug 16, 2022 at 09:42:51AM +, Bobby Eshleman wrote: > > > > The basic question to answer then is this: with a net dev

Re: [PATCH 3/6] vsock: add netdev to vhost/virtio vsock

2022-08-17 Thread Michael S. Tsirkin
On Tue, Aug 16, 2022 at 10:50:55AM +, Bobby Eshleman wrote: > > > > Eh, I was hoping it was a side channel of an existing virtio_net > > > > which is not the case. Given the zero-config requirement IDK if > > > > we'll be able to fit this into netdev semantics :( > > > > > > It's

Re: IOTLB support for vhost/vsock breaks crosvm on Android

2022-08-17 Thread Michael S. Tsirkin
On Wed, Aug 17, 2022 at 02:48:22PM +0100, Will Deacon wrote: > On Mon, Aug 08, 2022 at 08:45:48AM -0400, Michael S. Tsirkin wrote: > > > > Also yes, I think it's a good idea to change crosvm anyway. While the > > > > work around I describe might make sense

Re: [PATCH 0/6] virtio/vsock: introduce dgrams, sk_buff, and qdisc

2022-08-17 Thread Michael S. Tsirkin
On Tue, Aug 16, 2022 at 09:42:51AM +, Bobby Eshleman wrote: > > The basic question to answer then is this: with a net device qdisc > > etc in the picture, how is this different from virtio net then? > > Why do you still want to use vsock? > > > > When using virtio-net, users looking for

Re: upstream kernel crashes

2022-08-17 Thread Michael S. Tsirkin
On Wed, Aug 17, 2022 at 02:36:31PM +0800, Xuan Zhuo wrote: > On Wed, 17 Aug 2022 08:13:59 +0200, Dmitry Vyukov wrote: > > On Mon, 15 Aug 2022 17:32:06 -0400, Michael wrote: > > > So if you pass the size parameter for a legacy device it will > > > try to make the ring smaller and that is not legal

[GIT PULL] virtio: fixes

2022-08-17 Thread Michael S. Tsirkin
. Signed-off-by: Michael S. Tsirkin Michael S. Tsirkin (6): virtio_net: Revert "virtio_net: set the default max ring size by find_vqs()" virtio: Revert "virtio: add helper virtio_find_vqs_ctx_size()"

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

2022-08-17 Thread 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. Tsirkin wrote: > > >

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

2022-08-17 Thread Michael S. Tsirkin
On Wed, Aug 17, 2022 at 05:13:59PM +0800, Zhu, Lingshan wrote: > > > On 8/17/2022 4:55 PM, Michael S. Tsirkin wrote: > > On Wed, Aug 17, 2022 at 10:14:26AM +0800, Zhu, Lingshan wrote: > > > Yes it is a little messy, and we can not check _F_VERSION_1 because of > &

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

2022-08-17 Thread Michael S. Tsirkin
On Wed, Aug 17, 2022 at 10:14:26AM +0800, Zhu, Lingshan wrote: > Yes it is a little messy, and we can not check _F_VERSION_1 because of > transitional devices, so maybe this is the best we can do for now I think vhost generally needs an API to declare config space endian-ness to kernel. vdpa can

Re: [PATCH 0/6] virtio/vsock: introduce dgrams, sk_buff, and qdisc

2022-08-17 Thread Michael S. Tsirkin
On Mon, Aug 15, 2022 at 10:56:03AM -0700, Bobby Eshleman wrote: > Hey everybody, > > This series introduces datagrams, packet scheduling, and sk_buff usage > to virtio vsock. > > The usage of struct sk_buff benefits users by a) preparing vsock to use > other related systems that require sk_buff,

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

2022-08-17 Thread Michael S. Tsirkin
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 Liu wrote: > > Hi Michael, > > I just noticed this

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

2022-08-16 Thread Michael S. Tsirkin
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 introduced functionality regression to

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

2022-08-16 Thread Michael S. Tsirkin
On Tue, Aug 16, 2022 at 09:02:17PM +, Parav Pandit wrote: > > > 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

Re: [PATCH 3/6] vsock: add netdev to vhost/virtio vsock

2022-08-16 Thread Michael S. Tsirkin
On Mon, Aug 15, 2022 at 10:56:06AM -0700, Bobby Eshleman wrote: > In order to support usage of qdisc on vsock traffic, this commit > introduces a struct net_device to vhost and virtio vsock. > > Two new devices are created, vhost-vsock for vhost and virtio-vsock > for virtio. The devices are

Re: [PATCH] drivers/virtio: fix repeated words in comments

2022-08-16 Thread Michael S. Tsirkin
On Tue, Aug 16, 2022 at 08:59:59PM +0800, Jilin Yuan wrote: > Delete the redundant word 'the'. > > Signed-off-by: Jilin Yuan send this kind of thing to trivial pls. > --- > drivers/virtio/virtio_mmio.c | 2 +- > drivers/virtio/virtio_pci_modern_dev.c | 2 +- > 2 files changed, 2

Re: [PATCH v2 1/4] Make place for common balloon code

2022-08-16 Thread Michael S. Tsirkin
On Tue, Aug 16, 2022 at 01:56:32PM +0200, Greg Kroah-Hartman wrote: > On Tue, Aug 16, 2022 at 02:47:22PM +0300, Alexander Atanasov wrote: > > Hello, > > > > On 16.08.22 12:49, Greg Kroah-Hartman wrote: > > > On Tue, Aug 16, 2022 at 12:41:14PM +0300, Alexander Atanasov wrote: > > > > > > rename

Re: [PATCH] vduse: Remove include of rwlock.h

2022-08-16 Thread Michael S. Tsirkin
On Tue, Aug 16, 2022 at 12:45:27PM +0200, Sebastian Andrzej Siewior wrote: > On 2022-08-16 04:39:29 [-0400], Michael S. Tsirkin wrote: > > rwlock: detect use outside of spinlock.h > > > > current ifndef does not really prevent including rwlock.h > > directly. > &

Re: [PATCH] crypto-virtio: fix memory-leak

2022-08-16 Thread Michael S. Tsirkin
022 +0800 > # > # On branch master > # Your branch is ahead of 'origin/master' by 1 commit. > # (use "git push" to publish your local commits) > # > # Changes to be committed: > # modified: drivers/crypto/virtio/virtio_crypto_akcipher_algs.c > # > # Untracked files: &

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

2022-08-16 Thread Michael S. Tsirkin
On Tue, Aug 16, 2022 at 04:29:04PM +0800, 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 >

Re: [PATCH] vduse: Remove include of rwlock.h

2022-08-16 Thread Michael S. Tsirkin
On Tue, Aug 16, 2022 at 10:33:57AM +0200, Sebastian Andrzej Siewior wrote: > On 2022-08-16 04:26:59 [-0400], Michael S. Tsirkin wrote: > > #ifndef __LINUX_SPINLOCK_H > > # error "please don't include this file directly" > > #endif > > > > I wonder how

Re: [PATCH] vduse: Remove include of rwlock.h

2022-08-16 Thread Michael S. Tsirkin
an Andrzej Siewior Acked-by: Michael S. Tsirkin in fact #ifndef __LINUX_SPINLOCK_H # error "please don't include this file directly" #endif I wonder how does it build. > --- > drivers/vdpa/vdpa_user/iova_domain.h | 1 - > 1 file changed, 1 deletion(-) > > diff --git

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

2022-08-16 Thread Michael S. Tsirkin
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 introduced functionality regression to

[PATCH v4 6/6] virtio: Revert "virtio: find_vqs() add arg sizes"

2022-08-15 Thread Michael S. Tsirkin
not sure what the benefit is in any case, so let's drop it. Fixes: a10fba037714 ("virtio: find_vqs() add arg sizes") Signed-off-by: Michael S. Tsirkin --- arch/um/drivers/virtio_uml.c | 2 +- drivers/platform/mellanox/mlxbf-tmfifo.c | 1 - drivers/remoteproc/remoteproc_virti

[PATCH v4 5/6] virtio: Revert "virtio_vdpa: support the arg sizes of find_vqs()"

2022-08-15 Thread Michael S. Tsirkin
what the benefit is in any case, so let's drop it. Fixes: 99e8927d8a4d ("virtio_vdpa: support the arg sizes of find_vqs()") Signed-off-by: Michael S. Tsirkin --- drivers/virtio/virtio_vdpa.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/driv

[PATCH v4 5/6] virtio_vdpa: Revert "virtio_vdpa: support the arg sizes of find_vqs()"

2022-08-15 Thread Michael S. Tsirkin
what the benefit is in any case, so let's drop it. Fixes: 99e8927d8a4d ("virtio_vdpa: support the arg sizes of find_vqs()") Signed-off-by: Michael S. Tsirkin --- drivers/virtio/virtio_vdpa.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/driv

[PATCH v4 4/6] virtio_pci: Revert "virtio_pci: support the arg sizes of find_vqs()"

2022-08-15 Thread Michael S. Tsirkin
sizes of find_vqs()") Signed-off-by: Michael S. Tsirkin --- drivers/virtio/virtio_pci_common.c | 18 -- drivers/virtio/virtio_pci_common.h | 1 - drivers/virtio/virtio_pci_legacy.c | 6 +- drivers/virtio/virtio_pci_modern.c | 10 +++--- 4 files changed, 12 inserti

[PATCH v4 3/6] virtio-mmio: Revert "virtio_mmio: support the arg sizes of find_vqs()"

2022-08-15 Thread Michael S. Tsirkin
This reverts commit fbed86abba6e0472d98079790e58060e4332608a. The API is now unused, let's not carry dead code around. Fixes: fbed86abba6e ("virtio_mmio: support the arg sizes of find_vqs()") Signed-off-by: Michael S. Tsirkin --- drivers/virtio/virtio_mmio.c | 8 ++-- 1 file

[PATCH v4 2/6] virtio: Revert "virtio: add helper virtio_find_vqs_ctx_size()"

2022-08-15 Thread Michael S. Tsirkin
This reverts commit fe3dc04e31aa51f91dc7f741a5f76cc4817eb5b4: the API is now unused and in fact can't be implemented on top of a legacy device. Fixes: fe3dc04e31aa ("virtio: add helper virtio_find_vqs_ctx_size()") Cc: "Xuan Zhuo" Signed-off-by: Michael S. Tsirkin

[PATCH v4 1/6] virtio_net: Revert "virtio_net: set the default max ring size by find_vqs()"

2022-08-15 Thread Michael S. Tsirkin
s()") Cc: Xuan Zhuo Cc: Jason Wang Signed-off-by: Michael S. Tsirkin Tested-by: Andres Freund Tested-by: Guenter Roeck --- drivers/net/virtio_net.c | 42 1 file changed, 4 insertions(+), 38 deletions(-) diff --git a/drivers/net/virtio_net.c

[PATCH v4 0/6] virtio: drop sizing vqs during init

2022-08-15 Thread Michael S. Tsirkin
to Andres Freund for the effort spent reproducing and debugging! Thanks to Guenter Roeck for help with testing! changes from v3 added a vdpa revert changes from v2 drop unrelated patches changes from v1 revert the ring size api, it's unused now Michael S. Tsirkin (5

Re: [PATCH v3 0/5] virtio: drop sizing vqs during init

2022-08-15 Thread Michael S. Tsirkin
On Mon, Aug 15, 2022 at 03:24:28PM -0700, Linus Torvalds wrote: > On Mon, Aug 15, 2022 at 3:00 PM Michael S. Tsirkin wrote: > > > > But the benefit is unclear in any case, so let's revert for now. > > Should I take this patch series directly, or will you be sending a >

[PATCH] virtio: drop vp_legacy_set_queue_size

2022-08-15 Thread Michael S. Tsirkin
There's actually no way to set queue size on legacy virtio pci. Signed-off-by: Michael S. Tsirkin --- include/linux/virtio_pci_legacy.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/linux/virtio_pci_legacy.h b/include/linux/virtio_pci_legacy.h index e5d665faf00e..a8dc757d0367

[PATCH v3 5/5] virtio: Revert "virtio: find_vqs() add arg sizes"

2022-08-15 Thread Michael S. Tsirkin
not sure what the benefit is in any case, so let's drop it. Fixes: a10fba037714 ("virtio: find_vqs() add arg sizes") Signed-off-by: Michael S. Tsirkin --- arch/um/drivers/virtio_uml.c | 2 +- drivers/platform/mellanox/mlxbf-tmfifo.c | 1 - drivers/remoteproc/remoteproc_virti

[PATCH v3 4/5] virtio_pci: Revert "virtio_pci: support the arg sizes of find_vqs()"

2022-08-15 Thread Michael S. Tsirkin
sizes of find_vqs()") Signed-off-by: Michael S. Tsirkin --- drivers/virtio/virtio_pci_common.c | 18 -- drivers/virtio/virtio_pci_common.h | 1 - drivers/virtio/virtio_pci_legacy.c | 6 +- drivers/virtio/virtio_pci_modern.c | 10 +++--- 4 files changed, 12 inserti

[PATCH v3 3/5] virtio-mmio: Revert "virtio_mmio: support the arg sizes of find_vqs()"

2022-08-15 Thread Michael S. Tsirkin
This reverts commit fbed86abba6e0472d98079790e58060e4332608a. The API is now unused, let's not carry dead code around. Fixes: fbed86abba6e ("virtio_mmio: support the arg sizes of find_vqs()") Signed-off-by: Michael S. Tsirkin --- drivers/virtio/virtio_mmio.c | 8 ++-- 1 file

[PATCH v3 2/5] virtio: Revert "virtio: add helper virtio_find_vqs_ctx_size()"

2022-08-15 Thread Michael S. Tsirkin
This reverts commit fe3dc04e31aa51f91dc7f741a5f76cc4817eb5b4: the API is now unused and in fact can't be implemented on top of a legacy device. Fixes: fe3dc04e31aa ("virtio: add helper virtio_find_vqs_ctx_size()") Cc: "Xuan Zhuo" Signed-off-by: Michael S. Tsirkin

[PATCH v3 1/5] virtio_net: Revert "virtio_net: set the default max ring size by find_vqs()"

2022-08-15 Thread Michael S. Tsirkin
s()") Cc: Xuan Zhuo Cc: Jason Wang Signed-off-by: Michael S. Tsirkin Tested-by: Andres Freund Tested-by: From: Guenter Roeck --- drivers/net/virtio_net.c | 42 1 file changed, 4 insertions(+), 38 deletions(-) diff --git a/drivers/net/virtio_net.c

[PATCH v3 0/5] virtio: drop sizing vqs during init

2022-08-15 Thread Michael S. Tsirkin
- report of testing on legacy devices Huge shout out to Andres Freund for the effort spent reproducing and debugging! Thanks to Guenter Roeck for help with testing! changes from v2 drop unrelated patches changes from v1 revert the ring size api, it's unused now Michael S

Re: [PATCH v2 1/1] virtio: kerneldocs fixes and enhancements

2022-08-15 Thread Michael S. Tsirkin
On Mon, Aug 15, 2022 at 05:53:24PM -0400, Michael S. Tsirkin wrote: > From: Ricardo Cañuelo > > Fix variable names in some kerneldocs, naming in others. > Add kerneldocs for struct vring_desc and vring_interrupt. > > Signed-off-by: Ricardo Cañuelo > Message-Id: &

[PATCH v2 5/5] virtio: Revert "virtio: find_vqs() add arg sizes"

2022-08-15 Thread Michael S. Tsirkin
not sure what the benefit is in any case, so let's drop it. Fixes: a10fba037714 ("virtio: find_vqs() add arg sizes") Signed-off-by: Michael S. Tsirkin --- arch/um/drivers/virtio_uml.c | 2 +- drivers/platform/mellanox/mlxbf-tmfifo.c | 1 - drivers/remoteproc/remoteproc_virti

[PATCH v2 2/5] virtio: Revert "virtio: add helper virtio_find_vqs_ctx_size()"

2022-08-15 Thread Michael S. Tsirkin
This reverts commit fe3dc04e31aa51f91dc7f741a5f76cc4817eb5b4: the API is now unused and in fact can't be implemented on top of a legacy device. Fixes: fe3dc04e31aa ("virtio: add helper virtio_find_vqs_ctx_size()") Cc: "Xuan Zhuo" Signed-off-by: Michael S. Tsirkin

[PATCH v2 4/5] virtio_pci: Revert "virtio_pci: support the arg sizes of find_vqs()"

2022-08-15 Thread Michael S. Tsirkin
sizes of find_vqs()") Signed-off-by: Michael S. Tsirkin --- drivers/virtio/virtio_pci_common.c | 18 -- drivers/virtio/virtio_pci_common.h | 1 - drivers/virtio/virtio_pci_legacy.c | 6 +- drivers/virtio/virtio_pci_modern.c | 10 +++--- 4 files changed, 12 inserti

[PATCH v2 3/5] virtio-mmio: Revert "virtio_mmio: support the arg sizes of find_vqs()"

2022-08-15 Thread Michael S. Tsirkin
This reverts commit fbed86abba6e0472d98079790e58060e4332608a. The API is now unused, let's not carry dead code around. Fixes: fbed86abba6e ("virtio_mmio: support the arg sizes of find_vqs()") Signed-off-by: Michael S. Tsirkin --- drivers/virtio/virtio_mmio.c | 8 ++-- 1 file

[PATCH v2 1/1] virtio: Revert "virtio: find_vqs() add arg sizes"

2022-08-15 Thread Michael S. Tsirkin
not sure what the benefit is in any case, so let's drop it. Fixes: a10fba037714 ("virtio: find_vqs() add arg sizes") Signed-off-by: Michael S. Tsirkin diff --git a/arch/um/drivers/virtio_uml.c b/arch/um/drivers/virtio_uml.c index 79e38afd4b91..e719af8bdf56 100644 --- a/arch/um/drivers/vi

[PATCH v2 1/5] virtio_net: Revert "virtio_net: set the default max ring size by find_vqs()"

2022-08-15 Thread Michael S. Tsirkin
s()") Cc: Xuan Zhuo Cc: Jason Wang Signed-off-by: Michael S. Tsirkin Tested-by: Andres Freund Tested-by: From: Guenter Roeck --- drivers/net/virtio_net.c | 42 1 file changed, 4 insertions(+), 38 deletions(-) diff --git a/drivers/net/virtio_net.c

[PATCH v2 1/1] virtio: kerneldocs fixes and enhancements

2022-08-15 Thread Michael S. Tsirkin
From: Ricardo Cañuelo Fix variable names in some kerneldocs, naming in others. Add kerneldocs for struct vring_desc and vring_interrupt. Signed-off-by: Ricardo Cañuelo Message-Id: <20220810094004.1250-2-ricardo.canu...@collabora.com> Signed-off-by: Michael S. Tsirkin Reviewed-by: Co

[PATCH v2 0/5] virtio: drop sizing vqs during init

2022-08-15 Thread Michael S. Tsirkin
Freund for the effort spent reproducing and debugging! Thanks to Guenter Roeck for help with testing! Michael S. Tsirkin (5): virtio_net: Revert "virtio_net: set the default max ring size by find_vqs()" virtio: Revert "virtio: add helper virtio_find_vqs_ctx_size()"

Re: [PATCH] virtio_net: Revert "virtio_net: set the default max ring size by find_vqs()"

2022-08-15 Thread Michael S. Tsirkin
On Mon, Aug 15, 2022 at 02:46:04PM -0700, Andres Freund wrote: > Hi, > > On 2022-08-15 17:39:08 -0400, Michael S. Tsirkin wrote: > > On Mon, Aug 15, 2022 at 02:28:39PM -0700, Andres Freund wrote: > > > On 2022-08-15 17:04:10 -0400, Michael S. Tsirkin wrote: > >

Re: [PATCH] virtio_net: Revert "virtio_net: set the default max ring size by find_vqs()"

2022-08-15 Thread Michael S. Tsirkin
On Mon, Aug 15, 2022 at 02:28:39PM -0700, Andres Freund wrote: > Hi, > > On 2022-08-15 17:04:10 -0400, Michael S. Tsirkin wrote: > > So virtio has a queue_size register. When read, it will give you > > originally the maximum queue size. Normally we just read it and >

  1   2   3   4   5   6   7   8   9   10   >