All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	virtualization@lists.linux-foundation.org,
	Jason Wang <jasowang@redhat.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Jesper Dangaard Brouer <hawk@kernel.org>,
	John Fastabend <john.fastabend@gmail.com>,
	netdev@vger.kernel.org, bpf@vger.kernel.org
Subject: Re: [PATCH vhost v11 05/10] virtio_ring: introduce virtqueue_dma_dev()
Date: Mon, 24 Jul 2023 16:05:50 -0400	[thread overview]
Message-ID: <20230724160511-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <1689838441.2670174-9-xuanzhuo@linux.alibaba.com>

On Thu, Jul 20, 2023 at 03:34:01PM +0800, Xuan Zhuo wrote:
> On Wed, 19 Jul 2023 23:57:51 -0700, Christoph Hellwig <hch@infradead.org> wrote:
> > On Thu, Jul 20, 2023 at 02:45:14PM +0800, Xuan Zhuo wrote:
> > >  virtqueue_dma_dev() return the device that working with the DMA APIs.
> > >  Then that can be used like other devices. So what is the problem.
> > >
> > >  I always think the code path without the DMA APIs is the trouble for you.
> >
> > Because we now have an API where the upper level drivers sometimes
> > see the dma device and sometimes not.
> 
> No dma device is just for the old devices.
> 
> The API without DMA dev are only compatible with older devices. We can't give up
> these old devices, but we also have to embrace new features.
> 
> > This will be abused and cause
> > trouble sooner than you can say "layering".
> 
> I don't understand what the possible trouble here is.
> 
> When no dma device, the driver just does the same thing as before.
> 
> Thanks.

Instead of skipping operations, Christoph wants wrappers that
do nothing for non dma case.

-- 
MST


WARNING: multiple messages have this Message-ID (diff)
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Cc: Jesper Dangaard Brouer <hawk@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	netdev@vger.kernel.org, John Fastabend <john.fastabend@gmail.com>,
	Alexei Starovoitov <ast@kernel.org>,
	virtualization@lists.linux-foundation.org,
	Christoph Hellwig <hch@infradead.org>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>,
	bpf@vger.kernel.org, Paolo Abeni <pabeni@redhat.com>,
	"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH vhost v11 05/10] virtio_ring: introduce virtqueue_dma_dev()
Date: Mon, 24 Jul 2023 16:05:50 -0400	[thread overview]
Message-ID: <20230724160511-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <1689838441.2670174-9-xuanzhuo@linux.alibaba.com>

On Thu, Jul 20, 2023 at 03:34:01PM +0800, Xuan Zhuo wrote:
> On Wed, 19 Jul 2023 23:57:51 -0700, Christoph Hellwig <hch@infradead.org> wrote:
> > On Thu, Jul 20, 2023 at 02:45:14PM +0800, Xuan Zhuo wrote:
> > >  virtqueue_dma_dev() return the device that working with the DMA APIs.
> > >  Then that can be used like other devices. So what is the problem.
> > >
> > >  I always think the code path without the DMA APIs is the trouble for you.
> >
> > Because we now have an API where the upper level drivers sometimes
> > see the dma device and sometimes not.
> 
> No dma device is just for the old devices.
> 
> The API without DMA dev are only compatible with older devices. We can't give up
> these old devices, but we also have to embrace new features.
> 
> > This will be abused and cause
> > trouble sooner than you can say "layering".
> 
> I don't understand what the possible trouble here is.
> 
> When no dma device, the driver just does the same thing as before.
> 
> Thanks.

Instead of skipping operations, Christoph wants wrappers that
do nothing for non dma case.

-- 
MST

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

  reply	other threads:[~2023-07-24 20:05 UTC|newest]

Thread overview: 176+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-10  3:42 [PATCH vhost v11 00/10] virtio core prepares for AF_XDP Xuan Zhuo
2023-07-10  3:42 ` Xuan Zhuo
2023-07-10  3:42 ` [PATCH vhost v11 01/10] virtio_ring: check use_dma_api before unmap desc for indirect Xuan Zhuo
2023-07-10  3:42   ` Xuan Zhuo
2023-07-10  3:42 ` [PATCH vhost v11 02/10] virtio_ring: put mapping error check in vring_map_one_sg Xuan Zhuo
2023-07-10  3:42   ` Xuan Zhuo
2023-07-10  3:42 ` [PATCH vhost v11 03/10] virtio_ring: introduce virtqueue_set_premapped() Xuan Zhuo
2023-07-10  3:42   ` Xuan Zhuo
2023-07-12  8:24   ` Jason Wang
2023-07-12  8:35     ` Xuan Zhuo
2023-07-12  8:35       ` Xuan Zhuo
2023-07-13 11:14   ` Christoph Hellwig
2023-07-13 11:14     ` Christoph Hellwig
2023-07-13 14:47     ` Michael S. Tsirkin
2023-07-13 14:47       ` Michael S. Tsirkin
2023-07-20  6:22       ` Christoph Hellwig
2023-07-20  6:22         ` Christoph Hellwig
2023-07-13 14:52     ` Michael S. Tsirkin
2023-07-13 14:52       ` Michael S. Tsirkin
2023-07-10  3:42 ` [PATCH vhost v11 04/10] virtio_ring: support add premapped buf Xuan Zhuo
2023-07-10  3:42   ` Xuan Zhuo
2023-07-12  8:31   ` Jason Wang
2023-07-12  8:31     ` Jason Wang
2023-07-12  8:33     ` Xuan Zhuo
2023-07-12  8:33       ` Xuan Zhuo
2023-07-10  3:42 ` [PATCH vhost v11 05/10] virtio_ring: introduce virtqueue_dma_dev() Xuan Zhuo
2023-07-10  3:42   ` Xuan Zhuo
2023-07-12  8:33   ` Jason Wang
2023-07-12  8:33     ` Jason Wang
2023-07-13 11:15   ` Christoph Hellwig
2023-07-13 11:15     ` Christoph Hellwig
2023-07-13 14:51     ` Michael S. Tsirkin
2023-07-13 14:51       ` Michael S. Tsirkin
2023-07-20  6:22       ` Christoph Hellwig
2023-07-20  6:22         ` Christoph Hellwig
2023-07-20  6:45         ` Xuan Zhuo
2023-07-20  6:45           ` Xuan Zhuo
2023-07-20  6:57           ` Christoph Hellwig
2023-07-20  6:57             ` Christoph Hellwig
2023-07-20  7:34             ` Xuan Zhuo
2023-07-20  7:34               ` Xuan Zhuo
2023-07-24 20:05               ` Michael S. Tsirkin [this message]
2023-07-24 20:05                 ` Michael S. Tsirkin
2023-07-20 17:21         ` Michael S. Tsirkin
2023-07-20 17:21           ` Michael S. Tsirkin
2023-07-24 16:43           ` Christoph Hellwig
2023-07-24 16:43             ` Christoph Hellwig
2023-07-25  2:13             ` Xuan Zhuo
2023-07-25  2:13               ` Xuan Zhuo
2023-07-25  7:34               ` Michael S. Tsirkin
2023-07-25  7:34                 ` Michael S. Tsirkin
2023-07-25 11:07                 ` Xuan Zhuo
2023-07-25 11:07                   ` Xuan Zhuo
2023-07-28  6:02                   ` Xuan Zhuo
2023-07-28  6:02                     ` Xuan Zhuo
2023-07-28 15:03                     ` Jakub Kicinski
2023-07-31  1:23                       ` Jason Wang
2023-07-31  1:23                         ` Jason Wang
2023-07-31 15:46                         ` Jakub Kicinski
2023-08-01  2:03                           ` Xuan Zhuo
2023-08-01  2:03                             ` Xuan Zhuo
2023-08-01  2:36                             ` Jakub Kicinski
2023-08-01  2:57                               ` Xuan Zhuo
2023-08-01  2:57                                 ` Xuan Zhuo
2023-08-01 15:45                                 ` Jakub Kicinski
2023-08-02  1:36                                   ` Xuan Zhuo
2023-08-02  1:36                                     ` Xuan Zhuo
2023-08-02 11:12                                     ` Pavel Begunkov
2023-07-31  2:34                       ` Xuan Zhuo
2023-07-31  2:34                         ` Xuan Zhuo
2023-08-01 16:17                     ` Michael S. Tsirkin
2023-08-01 16:17                       ` Michael S. Tsirkin
2023-08-02  1:49                       ` Xuan Zhuo
2023-08-02  1:49                         ` Xuan Zhuo
2023-08-07  6:14                         ` Xuan Zhuo
2023-08-07  6:14                           ` Xuan Zhuo
2023-08-08  2:26                           ` Jason Wang
2023-08-08  2:26                             ` Jason Wang
2023-08-08  2:47                             ` Xuan Zhuo
2023-08-08  2:47                               ` Xuan Zhuo
2023-08-08  3:08                               ` Jason Wang
2023-08-08  3:08                                 ` Jason Wang
2023-08-08  3:09                                 ` Xuan Zhuo
2023-08-08  3:09                                   ` Xuan Zhuo
2023-08-08  3:49                                   ` Jason Wang
2023-08-08  3:49                                     ` Jason Wang
2023-08-08  3:54                                     ` Xuan Zhuo
2023-08-08  3:59                                       ` Jason Wang
2023-08-08  3:59                                         ` Jason Wang
2023-08-08  4:07                                         ` Xuan Zhuo
2023-08-10  1:56                           ` Xuan Zhuo
2023-08-10  1:56                             ` Xuan Zhuo
2023-08-10  6:37                             ` Jason Wang
2023-08-10  6:37                               ` Jason Wang
2023-08-10  6:40                               ` Michael S. Tsirkin
2023-08-10  6:40                                 ` Michael S. Tsirkin
2023-08-10  6:39                             ` Michael S. Tsirkin
2023-08-10  6:39                               ` Michael S. Tsirkin
2023-08-10  6:47                               ` Xuan Zhuo
2023-08-10  6:47                                 ` Xuan Zhuo
2023-07-10  3:42 ` [PATCH vhost v11 06/10] virtio_ring: skip unmap for premapped Xuan Zhuo
2023-07-10  3:42   ` Xuan Zhuo
2023-07-13  3:50   ` Jason Wang
2023-07-13  3:50     ` Jason Wang
2023-07-13  4:02     ` Xuan Zhuo
2023-07-13  4:02       ` Xuan Zhuo
2023-07-13  4:21       ` Jason Wang
2023-07-13  4:21         ` Jason Wang
2023-07-13  5:45         ` Xuan Zhuo
2023-07-13  5:45           ` Xuan Zhuo
2023-07-10  3:42 ` [PATCH vhost v11 07/10] virtio_ring: correct the expression of the description of virtqueue_resize() Xuan Zhuo
2023-07-10  3:42   ` Xuan Zhuo
2023-07-10  3:42 ` [PATCH vhost v11 08/10] virtio_ring: separate the logic of reset/enable from virtqueue_resize Xuan Zhuo
2023-07-10  3:42   ` Xuan Zhuo
2023-07-10  3:42 ` [PATCH vhost v11 09/10] virtio_ring: introduce virtqueue_reset() Xuan Zhuo
2023-07-10  3:42   ` Xuan Zhuo
2023-07-10  3:42 ` [PATCH vhost v11 10/10] virtio_net: merge dma operation for one page Xuan Zhuo
2023-07-10  3:42   ` Xuan Zhuo
2023-07-10  9:40   ` Michael S. Tsirkin
2023-07-10  9:40     ` Michael S. Tsirkin
2023-07-10 10:18     ` Xuan Zhuo
2023-07-10 10:18       ` Xuan Zhuo
2023-07-10 11:59       ` Michael S. Tsirkin
2023-07-10 11:59         ` Michael S. Tsirkin
2023-07-10 12:38         ` Xuan Zhuo
2023-07-10 12:38           ` Xuan Zhuo
2023-07-11  2:36           ` Jason Wang
2023-07-11  2:36             ` Jason Wang
2023-07-11  2:40             ` Xuan Zhuo
2023-07-11  2:40               ` Xuan Zhuo
2023-07-11  2:58               ` Jason Wang
2023-07-11  2:58                 ` Jason Wang
2023-07-12  7:54                 ` Xuan Zhuo
2023-07-12  7:54                   ` Xuan Zhuo
2023-07-12  8:32                   ` Xuan Zhuo
2023-07-12  8:32                     ` Xuan Zhuo
2023-07-12  8:37                     ` Jason Wang
2023-07-12  8:37                       ` Jason Wang
2023-07-12  8:38                       ` Xuan Zhuo
2023-07-12  8:38                         ` Xuan Zhuo
2023-07-14 10:37                         ` Michael S. Tsirkin
2023-07-14 10:37                           ` Michael S. Tsirkin
2023-07-19  3:21                           ` Xuan Zhuo
2023-07-19  3:21                             ` Xuan Zhuo
2023-07-19  8:55                             ` Michael S. Tsirkin
2023-07-19  8:55                               ` Michael S. Tsirkin
2023-07-19  9:38                               ` Jason Wang
2023-07-19  9:38                                 ` Jason Wang
2023-07-19  9:51                                 ` Michael S. Tsirkin
2023-07-19  9:51                                   ` Michael S. Tsirkin
2023-07-20  2:26                                   ` Xuan Zhuo
2023-07-20  2:26                                     ` Xuan Zhuo
2023-07-20  2:24                               ` Xuan Zhuo
2023-07-20  2:24                                 ` Xuan Zhuo
2023-07-13  4:20   ` Jason Wang
2023-07-13  4:20     ` Jason Wang
2023-07-13  5:53     ` Xuan Zhuo
2023-07-13  5:53       ` Xuan Zhuo
2023-07-13  6:51     ` Xuan Zhuo
2023-07-13  6:51       ` Xuan Zhuo
2023-07-14  3:56       ` Jason Wang
2023-07-14  3:56         ` Jason Wang
2023-07-20  6:23         ` Christoph Hellwig
2023-07-20  6:23           ` Christoph Hellwig
2023-07-20  7:41           ` Jason Wang
2023-07-20  7:41             ` Jason Wang
2023-07-20  8:21             ` Christoph Hellwig
2023-07-20  8:21               ` Christoph Hellwig
2023-07-13  7:00     ` Xuan Zhuo
2023-07-13  7:00       ` Xuan Zhuo
2023-07-14  3:57       ` Jason Wang
2023-07-14  3:57         ` Jason Wang
2023-07-14  3:58         ` Xuan Zhuo
2023-07-14  3:58           ` Xuan Zhuo
2023-07-14  5:45           ` Jason Wang
2023-07-14  5:45             ` Jason Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230724160511-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hawk@kernel.org \
    --cc=hch@infradead.org \
    --cc=jasowang@redhat.com \
    --cc=john.fastabend@gmail.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=xuanzhuo@linux.alibaba.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.