Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6DBC0C282DD for ; Mon, 10 Jun 2019 10:09:39 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 3093D20859 for ; Mon, 10 Jun 2019 10:09:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3093D20859 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 23AFE1BFCB; Mon, 10 Jun 2019 12:09:38 +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-dev] [PATCH] app/testpmd: fix offloads default set error 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/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) >