From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 8C5C8A00E6 for ; Mon, 13 May 2019 18:35:58 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4194C4C95; Mon, 13 May 2019 18:35:57 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 881CE2BCE; Mon, 13 May 2019 18:35:55 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 May 2019 09:35:54 -0700 X-ExtLoop1: 1 Received: from fyigit-mobl.ger.corp.intel.com (HELO [10.237.221.36]) ([10.237.221.36]) by orsmga002.jf.intel.com with ESMTP; 13 May 2019 09:35:52 -0700 To: Wei Zhao , dev@dpdk.org Cc: stable@dpdk.org, yuan.peng@intel.com, wenzhuo.lu@intel.com References: <1557386447-57225-1-git-send-email-wei.zhao1@intel.com> From: Ferruh Yigit Openpgp: preference=signencrypt Autocrypt: addr=ferruh.yigit@intel.com; prefer-encrypt=mutual; keydata= mQINBFXZCFABEADCujshBOAaqPZpwShdkzkyGpJ15lmxiSr3jVMqOtQS/sB3FYLT0/d3+bvy qbL9YnlbPyRvZfnP3pXiKwkRoR1RJwEo2BOf6hxdzTmLRtGtwWzI9MwrUPj6n/ldiD58VAGQ +iR1I/z9UBUN/ZMksElA2D7Jgg7vZ78iKwNnd+vLBD6I61kVrZ45Vjo3r+pPOByUBXOUlxp9 GWEKKIrJ4eogqkVNSixN16VYK7xR+5OUkBYUO+sE6etSxCr7BahMPKxH+XPlZZjKrxciaWQb +dElz3Ab4Opl+ZT/bK2huX+W+NJBEBVzjTkhjSTjcyRdxvS1gwWRuXqAml/sh+KQjPV1PPH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PKTzI2RRTx8m 20MM3SjxxKwxSoWnQmbrJMvLqWcfJ00k44nxh48s/X8+ywuKbJoh8ZXyy7ZCWKCXePJ1DaMW QQy3E19BpgVswZjYsAji71VnY4Mwebilj6lJx1sCTgQavtvVRI6swDCQlfhmnw21tq+6YfiW GayFyOLzhEr6yTTb0U+LXK8A+gcHgkeD62JmVdrOToFuq7i+CYDZZlCmnu0S+EDku5TDACca jrfa/XxNrwOS5MQz9VjyYbj9exGpKnk7jFsoLnG5VzpXkXjEZZen0lwGKZRDHuG2P4jR9dH0 cXr9AOvnF/lQAJHcGdMX9wPZcgdTCMHboBU9I0gbZiicvkiuyaT+OAO9MYkIp2mfpAV92BcP TyLaLSDgrgj/Bjhwunrm4qm27RI6pNoBtIlGGDW8t0yMlQ8ykNK3AGpGD7wVm0iKPl9GzCqA qU+n3U/KO6lgw4Xa4/FHkEbZi5jQto5GwfKKsmrN/mhzV7JtihZGunscbB0ZiDbyGLB1YXu6 34s= Message-ID: <703bdff4-70c3-2c95-ac49-6ecb0165a3cc@intel.com> Date: Mon, 13 May 2019 17:35:51 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <1557386447-57225-1-git-send-email-wei.zhao1@intel.com> Content-Type: text/plain; charset="UTF-8" Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH] app/testpmd: fix offloads overwrite by default configuration 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" Message-ID: <20190513163551.yW70Xl5-uU3Cdquo1Pz9HjlyJHyePh5Tg6rLTxmFDkQ@z> On 5/9/2019 8:20 AM, Wei Zhao wrote: > There is an error in function rxtx_port_config(), which may overwrite > offloads configuration get from function launch_args_parse() when run > testpmd app. So rxtx_port_config() should do "or" for port offloads. > > Fixes: d44f8a485f5d ("app/testpmd: enable per queue configure") > cc: stable@dpdk.org > > Signed-off-by: Wei Zhao > --- > app/test-pmd/testpmd.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c > index 6fbfd29..f0061d9 100644 > --- a/app/test-pmd/testpmd.c > +++ b/app/test-pmd/testpmd.c > @@ -2809,9 +2809,12 @@ static void > rxtx_port_config(struct rte_port *port) > { > uint16_t qid; > + uint64_t offloads; > > for (qid = 0; qid < nb_rxq; qid++) { > + offloads = port->rx_conf[qid].offloads; > port->rx_conf[qid] = port->dev_info.default_rxconf; > + port->rx_conf[qid].offloads |= offloads; OK to this changes as a fix for this release. But I think intention is, if no offload information is provided by user to use use the driver provided defaults, if user explicitly provided some values to use them, instead of OR these two. With this approach it is not possible to disable a driver default value, so it becomes mandatory offload instead of default offload values. Wei, what do you think, does it make sense? > > /* Check if any Rx parameters have been passed */ > if (rx_pthresh != RTE_PMD_PARAM_UNSET) > @@ -2833,7 +2836,9 @@ rxtx_port_config(struct rte_port *port) > } > > for (qid = 0; qid < nb_txq; qid++) { > + offloads = port->tx_conf[qid].offloads; > port->tx_conf[qid] = port->dev_info.default_txconf; > + port->tx_conf[qid].offloads |= offloads; > > /* Check if any Tx parameters have been passed */ > if (tx_pthresh != RTE_PMD_PARAM_UNSET) >