From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B3B5BA0C4F; Thu, 15 Jul 2021 04:40:43 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 70B824014D; Thu, 15 Jul 2021 04:40:43 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 9590040143; Thu, 15 Jul 2021 04:40:40 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10045"; a="296106614" X-IronPort-AV: E=Sophos;i="5.84,240,1620716400"; d="scan'208";a="296106614" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jul 2021 19:40:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,240,1620716400"; d="scan'208";a="562644754" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orsmga004.jf.intel.com with ESMTP; 14 Jul 2021 19:40:39 -0700 Received: from orsmsx606.amr.corp.intel.com (10.22.229.19) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10; Wed, 14 Jul 2021 19:40:38 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10 via Frontend Transport; Wed, 14 Jul 2021 19:40:38 -0700 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (104.47.51.46) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.10; Wed, 14 Jul 2021 19:40:38 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DCJv6olyr/ZtoNmeNTQ5tI1pXxVBLh1OB8FOcmaLuS2Qx2EjaC6k88RjYmMpi1lnpK7YX4b8FCurQlXpGBZzcsokFwMxt8p8p4Ne/sF6bdhchKnehxOyBzCnmagDZw82zAy3viCVp/0apcHAjsIHkrLkSsYgaeRATJjKCz25wkom7SZ9+pifOt+V3MT9tXtYOcSGtEFH8weSjgMqJyu1L9B3dBam3rcJkTq64v1frFmNDsgC+Q3clxJVSALQpoOxs7cmTxpUmx9/EAGtzzal8wOwgTbaMs5yWdwgWYXUkqHAo6FRodM4CPMYNfh9I+KAOMEj46N4iSwUZZQJRVPjdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=15RIzhCthzfQqqDkii48tPxRA3Y3Rp9c8NUKLEbt3Ws=; b=BQoWQ6FVHdwf9m6rxVpeAVE8fH1OATN0V2/3YH1n+uNcgl4G1uqXOBVJwNqbUVwnnLxihuBZ8AthtW44+IieWBSgXAYUArv/sQsgcM4ik/0rmk111lc3xSDRGvxHuFypBazaqwqQvSnY0nuMStcWnFcX/ZKxdFgGnr2+POcf48JTCz3QICnp+9BXulBN5bd0o0M0shE86oFWI/w0knt71a54xXTo54ZQ5sHfDMxTP9ez2qoarnarWpkuSQdBnu3YO+MQvnK1QFUYwC/FNp9+OvR4ddgaTF0pi2j2RaGVazTmc5s0DSceBPFUXMNaNYOkZufLkTQETii/W1B9C1Zdog== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=15RIzhCthzfQqqDkii48tPxRA3Y3Rp9c8NUKLEbt3Ws=; b=G4o53n/LdnoceToWtW0BOMZxiifjz152DFxs1Z7BgK+1WdiWI9ptN2uAjpHbvBEYiSe0PaHhE7jRI8CQX6tf8C8ESBBWjkQqE0P8Hm8H5i+xXqg1rR8jIKK8Kxe/X8hOnN9j0AaxOsQUc9U9jjfpygvdkb48dFvSd9a7tf+sgLg= Received: from DM4PR11MB5534.namprd11.prod.outlook.com (2603:10b6:5:391::22) by DM5PR1101MB2170.namprd11.prod.outlook.com (2603:10b6:4:54::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.23; Thu, 15 Jul 2021 02:40:37 +0000 Received: from DM4PR11MB5534.namprd11.prod.outlook.com ([fe80::87d:1217:a7cc:dd72]) by DM4PR11MB5534.namprd11.prod.outlook.com ([fe80::87d:1217:a7cc:dd72%9]) with mapi id 15.20.4308.027; Thu, 15 Jul 2021 02:40:37 +0000 From: "Li, Xiaoyun" To: "Li, Xiaoyun" , "Wang, Jie1X" , "dev@dpdk.org" CC: "andrew.rybchenko@oktetlabs.ru" , "stable@dpdk.org" Thread-Topic: [PATCH v2] app/testpmd: fix testpmd doesn't show RSS hash offload Thread-Index: AQHXd8d/LdoBZGBSukC2CP0Ha+vGj6tDUQLQgAACRNA= Date: Thu, 15 Jul 2021 02:40:37 +0000 Message-ID: References: <20210709155717.103425-1-jie1x.wang@intel.com> <20210713170401.252445-1-jie1x.wang@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: f8b4b5e5-95cb-4185-2e88-08d94739ed7a x-ms-traffictypediagnostic: DM5PR1101MB2170: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1284; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: rZUFtRd3MKWnL0Mh0JmuEnei4CNqgyME/WwiFoQb89IHVxuo2zqjY1Wsgk8HSSytmYXdiYXXxyK8Z8ulajc7v8fd/EucTsXX8c/iYT4AwzX2DMt0m2Sy3h/8iVYAKVwAiTtc8Zb62UzitO61YiaiC0zAiH5ljQ6dMnIvm4gHmRJ9mr9T4FzWaZFbuWSRZG8xdVh/4F0BrRc8ENJufSfT8yb0SSFi9P3zTxDWDx8EjDUdPJfqOBScUp+n75UjI8rFhkA6YcPWp34UWq7Ss/S+151bPptcxxtFbbIYfwRCJJZm0Emel4O3jd8kBhNEsMy11n543n8OfIFzoE0yw7HH5uOEki3OPJa+HNIJjvMW+wPkqDyZgP52VCFt08u3+RwEYXwtYdEqzynJxStdtYp0f4zVXAvFGPvXPqKCnXCR7kSqU1FrtPG1BtNd02JBe78Mb+dq0bomH7Dj52d/xSNDI8mdlI8rGv+vXP3w8q9xPd41OBJV95bBvXuNRnWglfoY2PwiU/C4C/DMK651xKtd27fIbIdIA4I7XDjewpxCGqjjCNW8VBXsFymnteuavh+1zYB2gVM46WOK6kEgdJHkj6SpwFtXRFk93/HXTkRKbSi8JlEyCPnermMR7TfOsZv4Ou2RejmKxUwrd2Mk6Nj7Z+W6sTAmG6IG3XONkFpLFZR892IyK1R7GZKPPHRf6vEkSdw7tlXk1lvljz2rQ3DFxg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR11MB5534.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39860400002)(376002)(396003)(346002)(136003)(366004)(8936002)(26005)(38100700002)(86362001)(8676002)(316002)(2940100002)(6506007)(71200400001)(4326008)(53546011)(33656002)(7696005)(66556008)(76116006)(64756008)(5660300002)(9686003)(66446008)(186003)(110136005)(66946007)(122000001)(54906003)(478600001)(55016002)(83380400001)(52536014)(2906002)(66476007)(38070700004); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?moSJgS18sK7HNATmLssm1gJgps02lrv6dbxTglqW2au596Fs+XmfFFZWRRL5?= =?us-ascii?Q?S4P+focgfVbuaYuK0z0DlN+HczxuEP8vo0XA3oQ2boIqoS+wmz++Bltyn0lx?= =?us-ascii?Q?e6EEZMklS/jSNrCybvZ3JG+hIVDfGRniDq15nxNZeNLwfNxQY4an6IjakMPY?= =?us-ascii?Q?sJDczZTHq8HS84SUkA2k+9P9Mf66nWqei5lVAvXj1TXQ1Low1EpoUyfhx8bR?= =?us-ascii?Q?p92ekosZbcz1pQadNmjrRhbyDtb4WKesbLyoXEAcD69XYEMIkcgNtbfT7Ue3?= =?us-ascii?Q?0gb5knmMdDS9gJY9jM5QU6J9KJwGdxt+Hf9XMXJN7KMkJHS6fqQQJ4Iy1eSM?= =?us-ascii?Q?qmSficPtUv3Hb/rkpzd0lt8WAL6wjoOhEUlmXCbFEXS/QNYDPCQOe6R8Ipzx?= =?us-ascii?Q?h16Ff1oHPgZ49ZTeA8YnF9XZWccfmc47pOlYr5Nt13lQLYWIUyXPTCQ66HBo?= =?us-ascii?Q?SsFaS9kA9VqaWLJJy5cM0NxnDqYqOGoYpyMp6wJUBhnvnoME5+sQzTwbg1Vz?= =?us-ascii?Q?R1hLj5ZBOE9bDaXSCYom2hyxqaOJooTuNxKA3R5pJYONPbixVRUXdsu3vDlA?= =?us-ascii?Q?JqAu1xpQbvHwLVGHl/0oROC/gs7RmEquKa0cP+spcPbfBqp26nvdnOoG8MlU?= =?us-ascii?Q?N5zAWxSeU6lAhrV0UmwQk9HZuNt1QCgU6rf9b1t7hgA63BL07yvKVovS6yco?= =?us-ascii?Q?JlOtj8lBSEtN9BYXTc/AhjXK+2mvSsfIma1qctADUsEZPfDFjylcduh48CyQ?= =?us-ascii?Q?wHaCoDGBxkWOWtOWk2Jk16iUYnJWHukX7LLQ5OZoxvk9iD6aj04AmjexL+os?= =?us-ascii?Q?cS9zZazBsXW+keTgJ1G39X2j3Pl5H9A4KlZgFPAqx0vQXMvJK8UxrFH9TyGD?= =?us-ascii?Q?uh4ndoa0+a+eZOG1zRDGT6Z1dIDBrqlLb3/FiDs6Gs+pO50dae4xmTz/nT+w?= =?us-ascii?Q?yQknTBg6aEh1ksVo9y//sT+Ax69C4b+xvp4YD71XOro9vArzg9lrIfakknV5?= =?us-ascii?Q?9+tilPQ891iSkbCIZb+yFmtQTrE/z/iltXLRmhmXXyHeGNRDnngFq7RpkYII?= =?us-ascii?Q?77V68bd91I5Ed6wDKMggOlS6fLULgNHok/NRIxzdFjN70TB/uzr2Lfsimlrc?= =?us-ascii?Q?CPSheHFx4WZ4IUKlCA7U7LluL9uyFKwefQFFliutp1hTF04YokQ2fApFMZSg?= =?us-ascii?Q?3xri3qeLNw/sfr3BI3TVV8zIez/D0Ts/gvcMFnjmRH2Qptfor9z7Wd++5jyr?= =?us-ascii?Q?O2gzZcthVa/pCsUTueso2+FfyJ8j+poFJNg8mpJmYHsSCvTtgLMtsYavDpVA?= =?us-ascii?Q?pXOG7KmOXHsREmQng+K1JKHu?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM4PR11MB5534.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f8b4b5e5-95cb-4185-2e88-08d94739ed7a X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Jul 2021 02:40:37.1361 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 4XNXKNSDXzjIghtNI0E3Gn4Onm1A/I50zED49340LnzSfUmeQE/s+mrgl5ZMKqWY9LBNnW8T8QO0wNyO0UtPIA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR1101MB2170 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v2] app/testpmd: fix testpmd doesn't show RSS hash offload X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" Hi > -----Original Message----- > From: stable On Behalf Of Li, Xiaoyun > Sent: Thursday, July 15, 2021 10:30 > To: Wang, Jie1X ; dev@dpdk.org > Cc: andrew.rybchenko@oktetlabs.ru; stable@dpdk.org > Subject: Re: [dpdk-stable] [PATCH v2] app/testpmd: fix testpmd doesn't sh= ow > RSS hash offload >=20 > Hi >=20 > > -----Original Message----- > > From: Wang, Jie1X > > Sent: Wednesday, July 14, 2021 01:04 > > To: dev@dpdk.org > > Cc: Li, Xiaoyun ; andrew.rybchenko@oktetlabs.ru; > > Wang, Jie1X ; stable@dpdk.org > > Subject: [PATCH v2] app/testpmd: fix testpmd doesn't show RSS hash > > offload > > > > This patch reapply Rx/Tx offloads configuration for all ports after > > the program configuring the device port. When the program configures > > the ports, the default Rx/Tx offloads are modified in > > dev->data->dev_conf. > > > > So it is need to reapply Rx/Tx offloads configuration after dev_configu= re. Forgot to mention. The commit log has many grammar mistakes especially time= tense. You can use the following: The driver may change offloads info into dev->data->dev_conf in dev_configu= re which may cause port->dev_conf and port->rx_conf contain outdated values= . This patch updates the offloads info if it changes to fix this issue. > > > > Fixes: ce8d561418d4 ("app/testpmd: add port configuration settings") > > Cc: stable@dpdk.org > > > > Signed-off-by: Jie Wang > > --- > > v2: copy "rx/txmode.offloads", instead of copying the entire struct > > "dev->data- > > >dev_conf.rx/txmode". > > --- > > app/test-pmd/testpmd.c | 19 +++++++++++++++++++ > > 1 file changed, 19 insertions(+) > > > > diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index > > 1cdd3cdd12..dc9ce5330b 100644 > > --- a/app/test-pmd/testpmd.c > > +++ b/app/test-pmd/testpmd.c > > @@ -2475,6 +2475,11 @@ start_port(portid_t pid) > > } > > > > if (port->need_reconfig > 0) { > > + const struct rte_eth_dev *dev =3D &rte_eth_devices[pi]; > > + struct rte_eth_conf *dev_conf; > > + int k; > > + > > + dev_conf =3D &dev->data->dev_conf; > > port->need_reconfig =3D 0; > > > > if (flow_isolate_all) { > > @@ -2508,6 +2513,20 @@ start_port(portid_t pid) > > port->need_reconfig =3D 1; > > return -1; > > } > > + /* Apply Rx offloads configuration */ > > + for (k =3D 0; k < port->dev_info.max_rx_queues; k++) { > > + if (port->rx_conf[k].offloads !=3D > > + dev_conf->rxmode.offloads) > > + port->rx_conf[k].offloads =3D > > + dev_conf->rxmode.offloads; > > + } >=20 > I was suggesting something like: > if (dev_conf->rxmode.offloads !=3D port->dev_conf->rxmode.offloads) { > port->dev_conf->rxmode.offloads =3D dev_conf- > >rxmode.offloads; > for (queues) > update offloads for each queue of this port > } >=20 > Not only check and change queue offload. >=20 > > + /* Apply Tx offloads configuration */ > > + for (k =3D 0; k < port->dev_info.max_tx_queues; k++) { > > + if (port->tx_conf[k].offloads !=3D > > + dev_conf->txmode.offloads) > > + port->tx_conf[k].offloads =3D > > + dev_conf->txmode.offloads; > > + } > > } > > if (port->need_reconfig_queues > 0) { > > port->need_reconfig_queues =3D 0; > > -- > > 2.25.1