virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
To: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Cc: "Maciej Fijalkowski" <maciej.fijalkowski@intel.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	virtualization@lists.linux-foundation.org,
	"Christoph Hellwig" <hch@infradead.org>,
	"Björn Töpel" <bjorn@kernel.org>,
	"Magnus Karlsson" <magnus.karlsson@intel.com>,
	"Guenter Roeck" <linux@roeck-us.net>
Subject: Re: [PATCH vhost v6 08/11] virtio_ring: introduce virtqueue_dma_dev()
Date: Tue, 11 Apr 2023 15:04:31 +0800	[thread overview]
Message-ID: <1681196671.8643467-6-xuanzhuo@linux.alibaba.com> (raw)
In-Reply-To: <1681195889.6079998-5-xuanzhuo@linux.alibaba.com>

On Tue, 11 Apr 2023 14:51:29 +0800, Xuan Zhuo <xuanzhuo@linux.alibaba.com> wrote:
> On Mon, 10 Apr 2023 23:46:56 -0700, Christoph Hellwig <hch@infradead.org> wrote:
> > On Tue, Apr 11, 2023 at 02:28:00PM +0800, Xuan Zhuo wrote:
> > > > That is just completely broken, virtio or not.  Highlevel code like
> > > > sockets must never do dma mappings themselves.
> > >
> > > AF_XDP provides some API for net driver. This API will do dma map or dma sync.
> > >
> > > cc AF_XDP maintainers.
> >
> > So in that case AF_XDP doesn't actually require a dma device as you
> > claimed early and gets the layering right after all.  Just don't use that
> > API from a network driver that doesn't need to do dma mappings like
> > virtio for the !platform_access case then.
>
>
> Yes


For Virtio-Net support AF_XDP, if we cannot provide a direct DMA map device,
then we have two solutions now, but we need to cooperate with AF_XDP.

1. pass NULL as dev, then AF_XDP use phy memory as dma address, and skip sync
2. do dma/sync by callback from virtio-net


Thanks.



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

  reply	other threads:[~2023-04-11  7:09 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-27  4:05 [PATCH vhost v6 00/11] virtio core prepares for AF_XDP Xuan Zhuo
2023-03-27  4:05 ` [PATCH vhost v6 01/11] virtio_ring: split: separate dma codes Xuan Zhuo
2023-03-28  6:26   ` Jason Wang
2023-03-27  4:05 ` [PATCH vhost v6 02/11] virtio_ring: packed: " Xuan Zhuo
2023-03-27  4:05 ` [PATCH vhost v6 03/11] virtio_ring: packed-indirect: " Xuan Zhuo
2023-03-27  4:05 ` [PATCH vhost v6 04/11] virtio_ring: split: support premapped Xuan Zhuo
2023-03-28  6:27   ` Jason Wang
2023-03-27  4:05 ` [PATCH vhost v6 05/11] virtio_ring: packed: " Xuan Zhuo
2023-03-28  6:27   ` Jason Wang
2023-03-27  4:05 ` [PATCH vhost v6 06/11] virtio_ring: packed-indirect: " Xuan Zhuo
2023-03-28  6:29   ` Jason Wang
2023-03-27  4:05 ` [PATCH vhost v6 07/11] virtio_ring: update document for virtqueue_add_* Xuan Zhuo
2023-03-28  6:30   ` Jason Wang
2023-03-27  4:05 ` [PATCH vhost v6 08/11] virtio_ring: introduce virtqueue_dma_dev() Xuan Zhuo
2023-04-06 17:20   ` Guenter Roeck
2023-04-07  3:17     ` Xuan Zhuo
2023-04-07 12:34       ` Guenter Roeck
2023-04-07 11:02     ` Michael S. Tsirkin
2023-04-10  3:29       ` Xuan Zhuo
2023-04-10  5:14         ` Jason Wang
2023-04-10  6:03           ` Xuan Zhuo
2023-04-10  6:40             ` Michael S. Tsirkin
2023-04-10  6:42               ` Xuan Zhuo
2023-04-10 15:27           ` Christoph Hellwig
2023-04-11  1:56             ` Xuan Zhuo
2023-04-11  2:09               ` Jason Wang
2023-04-11  3:31                 ` Christoph Hellwig
2023-04-11  3:56                   ` Jason Wang
2023-04-11  4:09                     ` Christoph Hellwig
2023-04-11  4:54                       ` Jason Wang
2023-04-11  5:14                         ` Christoph Hellwig
2023-04-11  5:19                           ` Jason Wang
2023-04-11  8:55                         ` Gerd Hoffmann
2023-04-11  6:11                     ` Xuan Zhuo
2023-04-11  6:20                       ` Christoph Hellwig
2023-04-11  6:28                         ` Xuan Zhuo
2023-04-11  6:46                           ` Christoph Hellwig
2023-04-11  6:51                             ` Xuan Zhuo
2023-04-11  7:04                               ` Xuan Zhuo [this message]
2023-04-12  2:03                           ` Xuan Zhuo
2023-04-12 11:54                             ` Christoph Hellwig
2023-04-11  3:26               ` Christoph Hellwig
2023-04-11  6:23                 ` Xuan Zhuo
2023-04-11  6:30                   ` Christoph Hellwig
2023-04-11  6:33                     ` Xuan Zhuo
2023-04-11  6:45                       ` Christoph Hellwig
2023-04-11  7:23                         ` Xuan Zhuo
2023-04-11 12:16                           ` Christoph Hellwig
2023-04-18  6:18                             ` Xuan Zhuo
2023-04-19  5:10                               ` Christoph Hellwig
2023-04-19  6:16                                 ` Xuan Zhuo
2023-04-11  7:12           ` Xuan Zhuo
2023-04-11  8:59             ` Jason Wang
2023-04-11 12:17             ` Christoph Hellwig
2023-03-27  4:05 ` [PATCH vhost v6 09/11] virtio_ring: correct the expression of the description of virtqueue_resize() Xuan Zhuo
2023-03-27  4:05 ` [PATCH vhost v6 10/11] virtio_ring: separate the logic of reset/enable from virtqueue_resize Xuan Zhuo
2023-03-27  4:05 ` [PATCH vhost v6 11/11] virtio_ring: introduce virtqueue_reset() Xuan Zhuo

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=1681196671.8643467-6-xuanzhuo@linux.alibaba.com \
    --to=xuanzhuo@linux.alibaba.com \
    --cc=bjorn@kernel.org \
    --cc=hch@infradead.org \
    --cc=linux@roeck-us.net \
    --cc=maciej.fijalkowski@intel.com \
    --cc=magnus.karlsson@intel.com \
    --cc=mst@redhat.com \
    --cc=virtualization@lists.linux-foundation.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).