[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1683342535.4073727-5-xuanzhuo@linux.alibaba.com>
Date: Sat, 6 May 2023 11:08:55 +0800
From: Xuan Zhuo <xuanzhuo@...ux.alibaba.com>
To: Christoph Hellwig <hch@...radead.org>
Cc: virtualization@...ts.linux-foundation.org,
"Michael S. Tsirkin" <mst@...hat.com>,
Jason Wang <jasowang@...hat.com>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
"David S. Miller" <davem@...emloft.net>,
Jesper Dangaard Brouer <hawk@...nel.org>,
John Fastabend <john.fastabend@...il.com>,
netdev@...r.kernel.org,
bpf@...r.kernel.org,
Christoph Hellwig <hch@...radead.org>,
Jakub Kicinski <kuba@...nel.org>,
Alexander Lobakin <aleksander.lobakin@...el.com>
Subject: Re: [PATCH vhost v7 01/11] virtio_ring: split: separate dma codes
On Sun, 30 Apr 2023 21:24:52 -0700, Christoph Hellwig <hch@...radead.org> wrote:
> > +static dma_addr_t vring_sg_address(struct scatterlist *sg)
> > +{
> > + if (sg->dma_address)
> > + return sg->dma_address;
>
> 0 is a perfectly valid DMA address. So I have no idea how this is
> even supposed to work.
Yes.
I think I can change it here to judge based on sg_page(sg). If there is no page,
I assume this sg already has DMA Address.
Thanks
Powered by blists - more mailing lists