From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id AE4C8A04B5; Thu, 29 Oct 2020 21:00:51 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 586FFC99C; Thu, 29 Oct 2020 21:00:49 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id C4615C988 for ; Thu, 29 Oct 2020 21:00:47 +0100 (CET) IronPort-SDR: eavxSai3rQSz3f0o9pdKThL28VI/WPqR8NkLjyISd0/TGbypaTObXMH+eBDmV0sBGHQDyXBBaR U8cbueIhYPUA== X-IronPort-AV: E=McAfee;i="6000,8403,9789"; a="156276412" X-IronPort-AV: E=Sophos;i="5.77,430,1596524400"; d="scan'208";a="156276412" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Oct 2020 13:00:45 -0700 IronPort-SDR: bGxgYyKI36mHZwWugb3Rn7f0eIGfvgKlWNuvva0VnWKXtWZ4VNaG9tH/LnrCYlxpmHvyIzMyY2 pNdebO1mzDyA== X-IronPort-AV: E=Sophos;i="5.77,430,1596524400"; d="scan'208";a="536798602" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.213.251.183]) ([10.213.251.183]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Oct 2020 13:00:44 -0700 To: Long Li , Stephen Hemminger Cc: dev@dpdk.org, Stephen Hemminger , Long Li References: <1603490075-6840-1-git-send-email-longli@linuxonhyperv.com> From: Ferruh Yigit Message-ID: <70a124b3-f694-7853-ffc9-6cea888a0818@intel.com> Date: Thu, 29 Oct 2020 20:00:40 +0000 MIME-Version: 1.0 In-Reply-To: <1603490075-6840-1-git-send-email-longli@linuxonhyperv.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH V2 1/2] net/netvsc: allow setting rx and tx copy break X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 10/23/2020 10:54 PM, Long Li wrote: > From: Stephen Hemminger > > 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 > Signed-off-by: Long Li <...> > @@ -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". Thanks, ferruh