[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1708515555.2820647-2-xuanzhuo@linux.alibaba.com>
Date: Wed, 21 Feb 2024 19:39:15 +0800
From: Xuan Zhuo <xuanzhuo@...ux.alibaba.com>
To: wangyunjian <wangyunjian@...wei.com>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"virtualization@...ts.linux.dev" <virtualization@...ts.linux.dev>,
xudingke <xudingke@...wei.com>,
"mst@...hat.com" <mst@...hat.com>,
"willemdebruijn.kernel@...il.com" <willemdebruijn.kernel@...il.com>,
"jasowang@...hat.com" <jasowang@...hat.com>,
"kuba@...nel.org" <kuba@...nel.org>,
"davem@...emloft.net" <davem@...emloft.net>,
"magnus.karlsson@...el.com" <magnus.karlsson@...el.com>
Subject: Re: RE: [PATCH net-next 1/2] xsk: Remove non-zero 'dma_page' check in xp_assign_dev
On Wed, 21 Feb 2024 11:37:22 +0000, wangyunjian <wangyunjian@...wei.com> wrote:
> > -----Original Message-----
> > From: Xuan Zhuo [mailto:xuanzhuo@...ux.alibaba.com]
> > Sent: Wednesday, February 21, 2024 5:53 PM
> > To: wangyunjian <wangyunjian@...wei.com>
> > Cc: netdev@...r.kernel.org; linux-kernel@...r.kernel.org;
> > kvm@...r.kernel.org; virtualization@...ts.linux.dev; xudingke
> > <xudingke@...wei.com>; wangyunjian <wangyunjian@...wei.com>;
> > mst@...hat.com; willemdebruijn.kernel@...il.com; jasowang@...hat.com;
> > kuba@...nel.org; davem@...emloft.net; magnus.karlsson@...el.com
> > Subject: Re: [PATCH net-next 1/2] xsk: Remove non-zero 'dma_page' check in
> > xp_assign_dev
> >
> > On Wed, 24 Jan 2024 17:37:38 +0800, Yunjian Wang
> > <wangyunjian@...wei.com> wrote:
> > > Now dma mappings are used by the physical NICs. However the vNIC maybe
> > > do not need them. So remove non-zero 'dma_page' check in
> > > xp_assign_dev.
> >
> > Could you tell me which one nic can work with AF_XDP without DMA?
>
> TUN will support AF_XDP Tx zero-copy, which does not require DMA mappings.
Great. Though I do not know how it works, but I think a new option or feature
is better.
Thanks.
>
> Thanks
>
> >
> > Thanks.
> >
> >
> > >
> > > Signed-off-by: Yunjian Wang <wangyunjian@...wei.com>
> > > ---
> > > net/xdp/xsk_buff_pool.c | 7 -------
> > > 1 file changed, 7 deletions(-)
> > >
> > > diff --git a/net/xdp/xsk_buff_pool.c b/net/xdp/xsk_buff_pool.c index
> > > 28711cc44ced..939b6e7b59ff 100644
> > > --- a/net/xdp/xsk_buff_pool.c
> > > +++ b/net/xdp/xsk_buff_pool.c
> > > @@ -219,16 +219,9 @@ int xp_assign_dev(struct xsk_buff_pool *pool,
> > > if (err)
> > > goto err_unreg_pool;
> > >
> > > - if (!pool->dma_pages) {
> > > - WARN(1, "Driver did not DMA map zero-copy buffers");
> > > - err = -EINVAL;
> > > - goto err_unreg_xsk;
> > > - }
> > > pool->umem->zc = true;
> > > return 0;
> > >
> > > -err_unreg_xsk:
> > > - xp_disable_drv_zc(pool);
> > > err_unreg_pool:
> > > if (!force_zc)
> > > err = 0; /* fallback to copy mode */
> > > --
> > > 2.33.0
> > >
> > >
Powered by blists - more mailing lists