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 BE5FCA0096 for ; Thu, 9 May 2019 09:49:43 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B3A664CAB; Thu, 9 May 2019 09:49:43 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 5B4624CAB; Thu, 9 May 2019 09:49:42 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 May 2019 00:49:42 -0700 X-ExtLoop1: 1 Received: from dpdk6.bj.intel.com ([172.16.182.192]) by orsmga005.jf.intel.com with ESMTP; 09 May 2019 00:49:39 -0700 From: Wei Zhao To: dev@dpdk.org Cc: stable@dpdk.org, yuan.peng@intel.com, ferruh.yigit@intel.com, wenzhuo.lu@intel.com, Wei Zhao Date: Thu, 9 May 2019 15:20:47 +0800 Message-Id: <1557386447-57225-1-git-send-email-wei.zhao1@intel.com> X-Mailer: git-send-email 2.7.5 Subject: [dpdk-stable] [PATCH] app/testpmd: fix offloads overwrite by default configuration 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" 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; /* 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) -- 2.7.5