> 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 <step...@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 <step...@networkplumber.org> > > Signed-off-by: Long Li <lon...@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