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 0828BA00E6 for ; Mon, 10 Jun 2019 12:09:38 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E4B29F64; Mon, 10 Jun 2019 12:09:37 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id F3B9CF64; Mon, 10 Jun 2019 12:09:36 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 67683C04B2F6; Mon, 10 Jun 2019 10:09:36 +0000 (UTC) Received: from [10.36.116.175] (ovpn-116-175.ams2.redhat.com [10.36.116.175]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3C3D61001B15; Mon, 10 Jun 2019 10:09:32 +0000 (UTC) To: Wei Zhao , dev@dpdk.org Cc: stable@dpdk.org, ferruh.yigit@intel.com References: <1560149110-58407-1-git-send-email-wei.zhao1@intel.com> From: Kevin Traynor Message-ID: Date: Mon, 10 Jun 2019 11:09:32 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <1560149110-58407-1-git-send-email-wei.zhao1@intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Mon, 10 Jun 2019 10:09:36 +0000 (UTC) Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] app/testpmd: fix offloads default set error X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" On 10/06/2019 07:45, Wei Zhao wrote: > There is no need to use default offloads configuration > if offloads configuration has been pass down from uplayer. > It doesn't seem like the right fix to me. It means if a user enable/disable one offload in the command line they are silently changing from the default behaviour of other offloads? I could understand if the user set all offloads in one go through a mask but not when they are set seemingly independent. It looks like you need to track which ones have been enabled/disabled by the user, and use the default for for the other offloads. > Fixes: 5e91aeef218c ("app/testpmd: fix offload flags after port config") > > Signed-off-by: Wei Zhao > --- > app/test-pmd/testpmd.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c > index 0148b0a..b5f5801 100644 > --- a/app/test-pmd/testpmd.c > +++ b/app/test-pmd/testpmd.c > @@ -2815,7 +2815,8 @@ rxtx_port_config(struct rte_port *port) > 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; > + if (offloads) > + port->rx_conf[qid].offloads = offloads; > > /* Check if any Rx parameters have been passed */ > if (rx_pthresh != RTE_PMD_PARAM_UNSET) > @@ -2839,7 +2840,8 @@ 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; > + if (offloads) > + port->tx_conf[qid].offloads = offloads; > > /* Check if any Tx parameters have been passed */ > if (tx_pthresh != RTE_PMD_PARAM_UNSET) >