From: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
To: Yunjian Wang <wangyunjian@huawei.com>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<kvm@vger.kernel.org>, <virtualization@lists.linux.dev>,
<xudingke@huawei.com>, Yunjian Wang <wangyunjian@huawei.com>,
<mst@redhat.com>, <willemdebruijn.kernel@gmail.com>,
<jasowang@redhat.com>, <kuba@kernel.org>, <davem@davemloft.net>,
<magnus.karlsson@intel.com>
Subject: Re: [PATCH net-next 1/2] xsk: Remove non-zero 'dma_page' check in xp_assign_dev
Date: Wed, 21 Feb 2024 17:52:32 +0800 [thread overview]
Message-ID: <1708509152.9501102-1-xuanzhuo@linux.alibaba.com> (raw)
In-Reply-To: <1706089058-1364-1-git-send-email-wangyunjian@huawei.com>
On Wed, 24 Jan 2024 17:37:38 +0800, Yunjian Wang <wangyunjian@huawei.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?
Thanks.
>
> Signed-off-by: Yunjian Wang <wangyunjian@huawei.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
>
>
next prev parent reply other threads:[~2024-02-21 9:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-24 9:37 Yunjian Wang
2024-02-21 9:52 ` Xuan Zhuo [this message]
2024-02-21 11:37 ` wangyunjian
2024-02-21 11:39 ` 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=1708509152.9501102-1-xuanzhuo@linux.alibaba.com \
--to=xuanzhuo@linux.alibaba.com \
--cc=davem@davemloft.net \
--cc=jasowang@redhat.com \
--cc=kuba@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=magnus.karlsson@intel.com \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=virtualization@lists.linux.dev \
--cc=wangyunjian@huawei.com \
--cc=willemdebruijn.kernel@gmail.com \
--cc=xudingke@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®