patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 19.11] net/netvsc: disable external mbuf on Rx by default
@ 2020-12-16 18:27 Long Li
  2020-12-17  9:29 ` Luca Boccassi
  0 siblings, 1 reply; 2+ messages in thread
From: Long Li @ 2020-12-16 18:27 UTC (permalink / raw)
  To: stable; +Cc: abmarath, Long Li

From: Long Li <longli@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@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


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

* Re: [dpdk-stable] [PATCH 19.11] net/netvsc: disable external mbuf on Rx by default
  2020-12-16 18:27 [dpdk-stable] [PATCH 19.11] net/netvsc: disable external mbuf on Rx by default Long Li
@ 2020-12-17  9:29 ` Luca Boccassi
  0 siblings, 0 replies; 2+ messages in thread
From: Luca Boccassi @ 2020-12-17  9:29 UTC (permalink / raw)
  To: Long Li, stable; +Cc: abmarath, Long Li

On Wed, 2020-12-16 at 10:27 -0800, Long Li wrote:
> From: Long Li <longli@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@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 {

Thank you - given the widespread breakage, adding this workaround in
19.11 looks like a good solution to me. It has been tested by QA
already, so applied.

-- 
Kind regards,
Luca Boccassi

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

end of thread, other threads:[~2020-12-17  9:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-16 18:27 [dpdk-stable] [PATCH 19.11] net/netvsc: disable external mbuf on Rx by default Long Li
2020-12-17  9:29 ` Luca Boccassi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).