[dpdk-stable] [PATCH 19.11 2/2] net/netvsc: control use of external mbuf on Rx

Luca Boccassi bluca at debian.org
Thu Dec 10 19:28:50 CET 2020


On Wed, 2020-12-09 at 16:27 -0800, Long Li wrote:
> From: Long Li <longli at microsoft.com>
> 
> [ upstream commit 096b31fc0d8c989cc455c35f4d1def24a4ed6dee ]
> 
> When receiving packets, netvsp puts data in a buffer mapped through UIO.
> Depending on packet size, netvsc may attach the buffer as an external
> mbuf. This is not a problem if this mbuf is consumed in the application,
> and the application can correctly read data out of an external mbuf.
> 
> However, there are two problems with data in an external mbuf.
> 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.
> 
> Introduce a driver parameter "rx_extmbuf_enable" to control if netvsc
> should use external mbuf for receiving packets. The default value is 0.
> (netvsc doesn't use external mbuf, it always allocates mbuf and copy
> data to mbuf) A non-zero value tells netvsc to attach external buffers
> to mbuf on receiving packets, thus avoid copying memory.
> 
> Signed-off-by: Long Li <longli at microsoft.com>
> ---
>  doc/guides/nics/netvsc.rst     |  8 ++++++++
>  drivers/net/netvsc/hn_ethdev.c | 10 +++++++++-
>  drivers/net/netvsc/hn_rxtx.c   |  2 +-
>  drivers/net/netvsc/hn_var.h    |  3 +++
>  4 files changed, 21 insertions(+), 2 deletions(-)

Correct me if I'm wrong, but these 2 patches look a bit more like new
features than bug fixes? It's new options for the PMD, right?

In general, we do not take new features in LTS releases. Stable means
stable - we make very few exceptions.

Is the PMD broken/unusable without these options?

-- 
Kind regards,
Luca Boccassi


More information about the stable mailing list