[dpdk-stable] [PATCH 19.11 2/2] net/netvsc: control use of external mbuf on Rx
Stephen Hemminger
stephen at networkplumber.org
Wed Dec 16 02:09:23 CET 2020
On Tue, 15 Dec 2020 13:48:57 +0000
Luca Boccassi <bluca at debian.org> wrote:
> On Thu, 2020-12-10 at 19:44 +0000, Long Li wrote:
> > > Subject: Re: [dpdk-stable] [PATCH 19.11 2/2] net/netvsc: control use of
> > > external mbuf on Rx
> > >
> > > 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?
> >
> > This patch changes the default behavior of netvsc PMD to not use external mbufs on receiving data.
> >
> > Using external mbufs has shown problems in many applications. Changing the default behavior will fix those.
>
> Sorry but I don't think adding new options is appropriate for an LTS
> release.
> The expectations is that everything works as-is without any need to
> even recompile, let alone changing options.
>
Can we just turn external mbuf usage in this driver off for the stable version instead?
More information about the stable
mailing list