DPDK patches and discussions
 help / color / mirror / Atom feed
From: Long Li <longli@microsoft.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>,
	Long Li <longli@linuxonhyperv.com>,
	 Stephen Hemminger <sthemmin@microsoft.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	Stephen Hemminger <stephen@networkplumber.org>
Subject: Re: [dpdk-dev] [PATCH V2 1/2] net/netvsc: allow setting rx and tx copy break
Date: Sat, 31 Oct 2020 05:59:35 +0000	[thread overview]
Message-ID: <BN8PR21MB11551BF25CCABE3C8CF09261CE120@BN8PR21MB1155.namprd21.prod.outlook.com> (raw)
In-Reply-To: <70a124b3-f694-7853-ffc9-6cea888a0818@intel.com>

> Subject: Re: [dpdk-dev] [PATCH V2 1/2] net/netvsc: allow setting rx and tx
> copy break
> 
> 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:
> 'RTE_PMD_REGISTER_PARAM_STRING'
> This is to get PMD supported devargs from .so, using "./usertools/dpdk-
> pmdinfo.py".

I have sent V3 to address comments.

Thanks!

Long

> 
> Thanks,
> ferruh

      reply	other threads:[~2020-10-31  5:59 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 ` [dpdk-dev] [PATCH V2 1/2] net/netvsc: allow setting rx and tx copy break Ferruh Yigit
2020-10-31  5:59   ` Long Li [this message]

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=BN8PR21MB11551BF25CCABE3C8CF09261CE120@BN8PR21MB1155.namprd21.prod.outlook.com \
    --to=longli@microsoft.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=longli@linuxonhyperv.com \
    --cc=stephen@networkplumber.org \
    --cc=sthemmin@microsoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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).