[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1709118325-120336-1-git-send-email-wangyunjian@huawei.com>
Date: Wed, 28 Feb 2024 19:05:25 +0800
From: Yunjian Wang <wangyunjian@...wei.com>
To: <mst@...hat.com>, <willemdebruijn.kernel@...il.com>,
<jasowang@...hat.com>, <kuba@...nel.org>, <bjorn@...nel.org>,
<magnus.karlsson@...el.com>, <maciej.fijalkowski@...el.com>,
<jonathan.lemon@...il.com>, <davem@...emloft.net>
CC: <bpf@...r.kernel.org>, <netdev@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <kvm@...r.kernel.org>,
<virtualization@...ts.linux.dev>, <xudingke@...wei.com>,
<liwei395@...wei.com>, Yunjian Wang <wangyunjian@...wei.com>
Subject: [PATCH net-next v2 1/3] xsk: Remove non-zero 'dma_page' check in xp_assign_dev
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.
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 ce60ecd48a4d..a5af75b1f43c 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.41.0
Powered by blists - more mailing lists