[dpdk-stable] [PATCH 19.11] net/netvsc: disable external mbuf on Rx by default

Long Li longli at linuxonhyperv.com
Wed Dec 16 19:27:39 CET 2020


From: Long Li <longli at microsoft.com>

[ upstream commit 096b31fc0d8c989cc455c35f4d1def24a4ed6dee ]

The upstream commit introduces a new driver parameter and disable the use
of external mbuf by default. The same can be done by defining a max value
for the RX threshold for external mbuf.

The use of external mbuf is disabled by default for two reasons:
    1. Due to the limitation of the kernel UIO implementation, physical
       address of this external buffer is not exposed to the user-mode. If
       this mbuf is passed to another driver, the other driver is unable to
       map this buffer to iova.
    2. Some DPDK applications are not aware of external mbuf, and may bug
       when they receive an mbuf with external buffer attached.

Signed-off-by: Long Li <longli at microsoft.com>
---
 drivers/net/netvsc/hn_rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c
index 19f00a0..d618c17 100644
--- a/drivers/net/netvsc/hn_rxtx.c
+++ b/drivers/net/netvsc/hn_rxtx.c
@@ -42,7 +42,7 @@
 #define HN_TXD_CACHE_SIZE	32 /* per cpu tx_descriptor pool cache */
 #define HN_TXCOPY_THRESHOLD	512
 
-#define HN_RXCOPY_THRESHOLD	256
+#define HN_RXCOPY_THRESHOLD	UINT_MAX
 #define HN_RXQ_EVENT_DEFAULT	2048
 
 struct hn_rxinfo {
-- 
1.8.3.1



More information about the stable mailing list