public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 1/2] xsk: Remove non-zero 'dma_page' check in xp_assign_dev
@ 2024-01-24  9:37 Yunjian Wang
  2024-02-21  9:52 ` Xuan Zhuo
  0 siblings, 1 reply; 4+ messages in thread
From: Yunjian Wang @ 2024-01-24  9:37 UTC (permalink / raw)
  To: mst, willemdebruijn.kernel, jasowang, kuba, davem,
	magnus.karlsson
  Cc: netdev, linux-kernel, kvm, virtualization, xudingke, Yunjian Wang

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@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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-02-21 11:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-24  9:37 [PATCH net-next 1/2] xsk: Remove non-zero 'dma_page' check in xp_assign_dev Yunjian Wang
2024-02-21  9:52 ` Xuan Zhuo
2024-02-21 11:37   ` wangyunjian
2024-02-21 11:39     ` Xuan Zhuo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox