DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Long Li <longli@linuxonhyperv.com>,
	Stephen Hemminger <sthemmin@microsoft.com>
Cc: dev@dpdk.org, Long Li <longli@microsoft.com>
Subject: Re: [dpdk-dev] [PATCH 2/2] net/netvsc: introduce driver parameter to control the use of external mbuf on receiving data
Date: Fri, 23 Oct 2020 17:23:23 +0100
Message-ID: <fcb623ec-8412-47a5-9140-f574a7a129cb@intel.com> (raw)
In-Reply-To: <1603395970-26797-2-git-send-email-longli@linuxonhyperv.com>

On 10/22/2020 8:46 PM, Long Li wrote:
> From: Long Li <longli@microsoft.com>
> 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@microsoft.com>
> ---
>   drivers/net/netvsc/hn_ethdev.c | 11 +++++++++++
>   drivers/net/netvsc/hn_rxtx.c   |  2 +-
>   drivers/net/netvsc/hn_var.h    |  3 +++
>   3 files changed, 15 insertions(+), 1 deletion(-)
> diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
> index e4f13b962c..735fc6d236 100644
> --- a/drivers/net/netvsc/hn_ethdev.c
> +++ b/drivers/net/netvsc/hn_ethdev.c
> @@ -48,6 +48,7 @@
>   #define NETVSC_ARG_LATENCY "latency"
>   #define NETVSC_ARG_RXBREAK "rx_copybreak"
>   #define NETVSC_ARG_TXBREAK "tx_copybreak"
> +#define NETVSC_ARG_RX_EXTMBUF_ENABLE "rx_extmbuf_enable"

Same comments for with previous patch, can you please document the new devarg 
and 'rte_kvargs_process()' can be used to parse it.

  reply	other threads:[~2020-10-23 16:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-22 19:46 [dpdk-dev] [PATCH 1/2] net/netvsc: allow setting rx and tx copy break Long Li
2020-10-22 19:46 ` [dpdk-dev] [PATCH 2/2] net/netvsc: introduce driver parameter to control the use of external mbuf on receiving data Long Li
2020-10-23 16:23   ` Ferruh Yigit [this message]
2020-10-23 16:21 ` [dpdk-dev] [PATCH 1/2] net/netvsc: allow setting rx and tx copy break Ferruh Yigit
2020-10-23 19:49   ` Long Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fcb623ec-8412-47a5-9140-f574a7a129cb@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=dev@dpdk.org \
    --cc=longli@linuxonhyperv.com \
    --cc=longli@microsoft.com \
    --cc=sthemmin@microsoft.com \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git