From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id DC5042BBD; Mon, 13 May 2019 05:31:37 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 May 2019 20:31:36 -0700 X-ExtLoop1: 1 Received: from pgsmsx107.gar.corp.intel.com ([10.221.44.105]) by fmsmga004.fm.intel.com with ESMTP; 12 May 2019 20:31:35 -0700 Received: from pgsmsx103.gar.corp.intel.com ([169.254.2.111]) by PGSMSX107.gar.corp.intel.com ([169.254.7.67]) with mapi id 14.03.0415.000; Mon, 13 May 2019 11:30:59 +0800 From: "Zhao1, Wei" To: "dev@dpdk.org" CC: "stable@dpdk.org" , "Peng, Yuan" , "Yigit, Ferruh" , "Lu, Wenzhuo" Thread-Topic: [PATCH] app/testpmd: fix offloads overwrite by default configuration Thread-Index: AQHVBjvTtkfi4wci80O5n6Bd6U+6/qZobA4g Date: Mon, 13 May 2019 03:30:59 +0000 Message-ID: References: <1557386447-57225-1-git-send-email-wei.zhao1@intel.com> In-Reply-To: <1557386447-57225-1-git-send-email-wei.zhao1@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [172.30.20.206] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [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: , X-List-Received-Date: Mon, 13 May 2019 03:31:38 -0000 Tested-by: Peng Yuan > -----Original Message----- > From: Zhao1, Wei > Sent: Thursday, May 9, 2019 3:21 PM > To: dev@dpdk.org > Cc: stable@dpdk.org; Peng, Yuan ; Yigit, Ferruh > ; Lu, Wenzhuo ; Zhao1, Wei > > Subject: [PATCH] app/testpmd: fix offloads overwrite by default configura= tion >=20 > There is an error in function rxtx_port_config(), which may overwrite off= loads > configuration get from function launch_args_parse() when run testpmd app.= So > rxtx_port_config() should do "or" for port offloads. >=20 > Fixes: d44f8a485f5d ("app/testpmd: enable per queue configure") > cc: stable@dpdk.org >=20 > Signed-off-by: Wei Zhao > --- > app/test-pmd/testpmd.c | 5 +++++ > 1 file changed, 5 insertions(+) >=20 > 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; >=20 > for (qid =3D 0; qid < nb_rxq; qid++) { > + offloads =3D port->rx_conf[qid].offloads; > port->rx_conf[qid] =3D port->dev_info.default_rxconf; > + port->rx_conf[qid].offloads |=3D offloads; >=20 > /* Check if any Rx parameters have been passed */ > if (rx_pthresh !=3D RTE_PMD_PARAM_UNSET) @@ -2833,7 > +2836,9 @@ rxtx_port_config(struct rte_port *port) > } >=20 > for (qid =3D 0; qid < nb_txq; qid++) { > + offloads =3D port->tx_conf[qid].offloads; > port->tx_conf[qid] =3D port->dev_info.default_txconf; > + port->tx_conf[qid].offloads |=3D offloads; >=20 > /* Check if any Tx parameters have been passed */ > if (tx_pthresh !=3D RTE_PMD_PARAM_UNSET) > -- > 2.7.5 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 3B094A00E6 for ; Mon, 13 May 2019 05:31:40 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0731E4C95; Mon, 13 May 2019 05:31:40 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id DC5042BBD; Mon, 13 May 2019 05:31:37 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 May 2019 20:31:36 -0700 X-ExtLoop1: 1 Received: from pgsmsx107.gar.corp.intel.com ([10.221.44.105]) by fmsmga004.fm.intel.com with ESMTP; 12 May 2019 20:31:35 -0700 Received: from pgsmsx103.gar.corp.intel.com ([169.254.2.111]) by PGSMSX107.gar.corp.intel.com ([169.254.7.67]) with mapi id 14.03.0415.000; Mon, 13 May 2019 11:30:59 +0800 From: "Zhao1, Wei" To: "dev@dpdk.org" CC: "stable@dpdk.org" , "Peng, Yuan" , "Yigit, Ferruh" , "Lu, Wenzhuo" Thread-Topic: [PATCH] app/testpmd: fix offloads overwrite by default configuration Thread-Index: AQHVBjvTtkfi4wci80O5n6Bd6U+6/qZobA4g Date: Mon, 13 May 2019 03:30:59 +0000 Message-ID: References: <1557386447-57225-1-git-send-email-wei.zhao1@intel.com> In-Reply-To: <1557386447-57225-1-git-send-email-wei.zhao1@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [172.30.20.206] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [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: <20190513033059.ucfQyJybNM5resOLmqG7AsqKN6Bc9_87_sT5P1ZOC3U@z> Tested-by: Peng Yuan > -----Original Message----- > From: Zhao1, Wei > Sent: Thursday, May 9, 2019 3:21 PM > To: dev@dpdk.org > Cc: stable@dpdk.org; Peng, Yuan ; Yigit, Ferruh > ; Lu, Wenzhuo ; Zhao1, Wei > > Subject: [PATCH] app/testpmd: fix offloads overwrite by default configura= tion >=20 > There is an error in function rxtx_port_config(), which may overwrite off= loads > configuration get from function launch_args_parse() when run testpmd app.= So > rxtx_port_config() should do "or" for port offloads. >=20 > Fixes: d44f8a485f5d ("app/testpmd: enable per queue configure") > cc: stable@dpdk.org >=20 > Signed-off-by: Wei Zhao > --- > app/test-pmd/testpmd.c | 5 +++++ > 1 file changed, 5 insertions(+) >=20 > 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; >=20 > for (qid =3D 0; qid < nb_rxq; qid++) { > + offloads =3D port->rx_conf[qid].offloads; > port->rx_conf[qid] =3D port->dev_info.default_rxconf; > + port->rx_conf[qid].offloads |=3D offloads; >=20 > /* Check if any Rx parameters have been passed */ > if (rx_pthresh !=3D RTE_PMD_PARAM_UNSET) @@ -2833,7 > +2836,9 @@ rxtx_port_config(struct rte_port *port) > } >=20 > for (qid =3D 0; qid < nb_txq; qid++) { > + offloads =3D port->tx_conf[qid].offloads; > port->tx_conf[qid] =3D port->dev_info.default_txconf; > + port->tx_conf[qid].offloads |=3D offloads; >=20 > /* Check if any Tx parameters have been passed */ > if (tx_pthresh !=3D RTE_PMD_PARAM_UNSET) > -- > 2.7.5