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, Stephen Hemminger <stephen@networkplumber.org>,
	Long Li <longli@microsoft.com>
Subject: Re: [dpdk-dev] [PATCH V2 1/2] net/netvsc: allow setting rx and tx copy break
Date: Thu, 29 Oct 2020 20:00:40 +0000	[thread overview]
Message-ID: <70a124b3-f694-7853-ffc9-6cea888a0818@intel.com> (raw)
In-Reply-To: <1603490075-6840-1-git-send-email-longli@linuxonhyperv.com>

On 10/23/2020 10:54 PM, Long Li wrote:
> From: Stephen Hemminger <stephen@networkplumber.org>
> The values for Rx and Tx copy break should be tunable rather
> than hard coded constants.
> The rx_copybreak sets the threshold where the driver uses an
> external mbuf to avoid having to copy data. Setting 0 for copybreak
> will cause driver to always create an external mbuf. Setting
> a value greater than the MTU would prevent it from ever making
> an external mbuf and always copy. The default value is 256 (bytes).
> Likewise the tx_copybreak sets the threshold where the driver
> aggregates multiple small packets into one request. If tx_copybreak
> is 0 then each packet goes as a VMBus request (no copying).
> If tx_copybreak is set larger than the MTU, then all packets smaller
> than the chunk size of the VMBus send buffer will be copied; larger
> packets always have to go as a single direct request. The default
> value is 512 (bytes).
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> Signed-off-by: Long Li <longli@microsoft.com>


> @@ -181,9 +195,14 @@ static int hn_parse_args(const struct rte_eth_dev *dev)
>   		return -EINVAL;
>   	}
> -	ret = rte_kvargs_process(kvlist, "latency", hn_set_latency, hv);
> -	if (ret)
> -		PMD_DRV_LOG(ERR, "Unable to process latency arg\n");
> +	for (i = 0; i < sizeof(valid_keys) / sizeof(valid_keys[0]) - 1; i++) {
> +		ret = rte_kvargs_process(kvlist, valid_keys[i],
> +					 hn_set_parameter, hv);
> +		if (ret) {
> +			PMD_DRV_LOG(ERR, "Unable to process latency arg\n");

Need to update the log, it is not only 'latency' anymore.

> +			break;
> +		}
> +	}

Since there is single callback for all args, and there is already a 'key' check 
in the callback function, why not call the 'rte_kvargs_process()' with NULL 
argument and drop the for loop:
  ret = rte_kvargs_process(kvlist, NULL, hn_set_parameter, hv);

Can you also register the devargs in .c file:
This is to get PMD supported devargs from .so, using "./usertools/dpdk-pmdinfo.py".


  parent reply	other threads:[~2020-10-29 20:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-23 21:54 Long Li
2020-10-23 21:54 ` [dpdk-dev] [PATCH V2 2/2] net/netvsc: introduce driver parameter to control the use of external mbuf on receiving data Long Li
2020-10-29 20:00 ` Ferruh Yigit [this message]
2020-10-31  5:59   ` [dpdk-dev] [PATCH V2 1/2] net/netvsc: allow setting rx and tx copy break 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=70a124b3-f694-7853-ffc9-6cea888a0818@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=dev@dpdk.org \
    --cc=longli@linuxonhyperv.com \
    --cc=longli@microsoft.com \
    --cc=stephen@networkplumber.org \
    --cc=sthemmin@microsoft.com \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).