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 53A20A0C4F; Thu, 15 Jul 2021 04:29:38 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DD2684014D; Thu, 15 Jul 2021 04:29:37 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id E664B40143; Thu, 15 Jul 2021 04:29:35 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10045"; a="274289795" X-IronPort-AV: E=Sophos;i="5.84,240,1620716400"; d="scan'208";a="274289795" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jul 2021 19:29:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,240,1620716400"; d="scan'208";a="430643022" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by orsmga002.jf.intel.com with ESMTP; 14 Jul 2021 19:29:34 -0700 Received: from fmsmsx604.amr.corp.intel.com (10.18.126.84) by fmsmsx604.amr.corp.intel.com (10.18.126.84) 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:29:34 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx604.amr.corp.intel.com (10.18.126.84) 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:29:34 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.108) by edgegateway.intel.com (192.55.55.68) 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:29:33 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eCylw5u0bQNDT3ECdJ9mTw0dhJzosAz5CO87tWdZsxFO6+9stvTgkSk7Yxtn1CyhhAq0rhJRVldBX7Id93OBufd1dn6Sg+cKZIr0srerWzAhqt7fjqZGmAYuz4EGW4oml0y/LUxUqz2uea8TTsJ4QNxQP8fu9/Ve4wma7kxt+5pxi3yivN0cMgmrmViyp3yJEpcyp9GOadt7y6zGZijqw2xwO/tHDV21Go3vuTOigNSvpLGlzWktGzCWSp1k8X1GHXMRfKjDcfLCHSr3uvPawbyManT41BCecb6h2+X7CynB9Y7QuWAJ6eDKqXoTtZaUbDqowxH//D9boL4+QVBV2g== 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=dHCyVa4Tn8qtixF0X/snSye8pHF0D5dfrqsP8zMTSHM=; b=lCGmDwLg7KMwMVOPp8U7yEimoLCd2zGoC/WFiUvGeocqAu5qiMUGnpxcbZj/RIaeqsgTcCmCUidoBITx4XoGY9CSd+FI4R5BLKl5aoeM5xdM9CN5wvU9MklCVoSS65U94a2+5R9kCn6+yg91GDPuk6lFSIce4sBwYK9lAl5Gke58zwK/JAe/qcj9+t14jfQ4gylkGq71sbP7adACy+9ki44Qcfx/4QCI95KFUB7ORFBUXB1GlBslQSEUZF98wPPUOUcvXl6Ra9eRwPC9y4DUdftEckdqGkCv8r7D+Wwp00x5ZEakXigc0wX26yx+rh5dnnWoLpJZCv487OZQ4Adwfw== 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=dHCyVa4Tn8qtixF0X/snSye8pHF0D5dfrqsP8zMTSHM=; b=JCdY+udZajIoQG0XpDEGEaBrLnb1RkP2V7fKAtiRrTVKUMTo0cD/31kD0pqJGIkWhPNk6I6btvXPRiYdyDb5cAzKNw97t5WA2Q386LSbd//WZoLRkuLUUaW6voK9uMJpJnLiPHsP6XnG99DNy9cpphdjTkyb2L5fdN4cupo/el0= Received: from DM4PR11MB5534.namprd11.prod.outlook.com (2603:10b6:5:391::22) by DM5PR11MB1387.namprd11.prod.outlook.com (2603:10b6:3:7::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.21; Thu, 15 Jul 2021 02:29:33 +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:29:33 +0000 From: "Li, Xiaoyun" To: "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+vGj6tDUQLQ Date: Thu, 15 Jul 2021 02:29:32 +0000 Message-ID: References: <20210709155717.103425-1-jie1x.wang@intel.com> <20210713170401.252445-1-jie1x.wang@intel.com> In-Reply-To: <20210713170401.252445-1-jie1x.wang@intel.com> 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: 150980d5-4d64-4fbf-29a3-08d947386194 x-ms-traffictypediagnostic: DM5PR11MB1387: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5797; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 1/FaucgCWocRaJRJWe0/TpvRlCjC9LPu7Tttp8Rl6uwv/dI9tpK6z5GhNSyQj08tVYYKQsRpR/NtNbXbLeGVZlGUi1KWurVO6wSwv+XDWbA0b0chWa02xSygBcvJXEHmfR1Pqfhy637DY81daCnEchbDF06n6CdEvCx5Ep9wsJ2oB80WJS4g2xUPoa725tKe5VhM9h/Fv+2PFojiGqsYXrZScVfV5UrK9aP46Nqqp6WXXhJLwqXM7lAi3E9uIt3zVDp4N1zssVlmzGyOuoEGpEMGx0u/USai0g/3ZBPDZyf6OdGbg2J29t1+4Ig/qZ0Yw7BFKZgJoq5PK5n1ibiAqoREfrElu83kzQBxb/T6ZUClTZTm6tDhkjGYGBpJPP5S+Nug2jBFWHgoYbk0GmYBlYGdWIwSJWy+BOYMa/kSYla09yRoDZblz1SERNmLH8TjymIK6mGUTBjEr2tvA6ZSs6O8IvcVImyuTO9voHeyzDAyArG9/zyAnR0+jFACbITAHjfSQtdz0OY5XRyIhT/kA9v7UABn9L1sASgFAIco1oaFsIwnLT16kKUnJjcHjhViry0V8Tylecc7tUtuWNPofpbMSbSOeEtKqnzivAnxzRMOID/UBQ5nnmw5axa6jLF9WNn2ncC9bHfZokN99rfanJ7XwDJebBQnLeYZ0hnwyIl0escOW+xlcdOwSZ8hl13YNlEhRmpz6wUl+0hcmHUWdA== 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)(376002)(39860400002)(136003)(346002)(396003)(366004)(316002)(71200400001)(9686003)(66446008)(55016002)(2906002)(66556008)(66476007)(478600001)(76116006)(64756008)(52536014)(4326008)(110136005)(5660300002)(8936002)(8676002)(66946007)(26005)(54906003)(6506007)(53546011)(33656002)(86362001)(38100700002)(122000001)(83380400001)(186003)(7696005)(38070700004); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?2VPwVmQV6Qgk1DG+wpK1KM9Hn1l5iL/dZ9p0DJFuZ8chJA/Zt3GBUR5GYxeU?= =?us-ascii?Q?cZdTGTpneU4q6vQGbQuuvZLZ+Td/vX7zRttRb3Tx98imOdNqEholI8H2EJx/?= =?us-ascii?Q?TyRpFWF2gKmwO4QheU6sFNcH6Ny9PXSOyGd825//SWO4SkKap3dgF22cHtx0?= =?us-ascii?Q?L946mxQ+I/GNbrR5bla6NvTgrWGLMAgR9RsWn7pOVo67vn15dDFbYpr7t0rj?= =?us-ascii?Q?wNz9jopceJ9rSDy6SUu28+7JCK4Z56sFLXNgNfBs1bAzzDYV2htKtJ/IPvrb?= =?us-ascii?Q?pkrtK9zjh56i5sUwqOS5RioL4SYU5audSXguIlL6O/uIZJaZbbimJO1AhzwE?= =?us-ascii?Q?A+E23gLQ9hpYgtL9INxJSmNNKZ10dcR0FDNgLv6S8VW2xDs8myRi4v1VSLG0?= =?us-ascii?Q?jDjhCdu627D4xuthfr2dHSyHGiN7WHtDQ6xmJBqsj9j8zOi00kO8zA4G63zG?= =?us-ascii?Q?tuQlf21OvifI7rEPKRvkzdlWkTpDuLo20kibFTuw54nb0I87LbmO2WS9Bozf?= =?us-ascii?Q?COMOFcI1KPzUxeMujfp30Ps4kZEdgXBRhVrftBcjnsEeTR48pTTzPyk5cGPu?= =?us-ascii?Q?gPFCrLDf2d4HZUocSgwUF/7tH6ZPiFgKKPiejsEYi5ToqX77ZKSeASNLzepo?= =?us-ascii?Q?QeK6pyOgUadiGWAxv18WirSXWmvKoz7RYyujacvN35t5yr/m51mXBefjdFH0?= =?us-ascii?Q?QfOp0WpsbEKRekOLy5cDX1tKwJZCvZR+5T5Bbq9MuQtFrOwXRdxbIQx/T1s7?= =?us-ascii?Q?YEls+CTnVrEdKuzo3eYcPopOwW2l6A6Vf9juiBmFUhV38PFdZKelbjbirAKe?= =?us-ascii?Q?CofNXEl762Pl0U3Ff1xv8rufzC+RUrHUO1I5d84rWVRMlHtnzAirD/6fzXCw?= =?us-ascii?Q?VuoGm5G1WVrh1sOdxa03cV65hBx/C5sjzW3/etV+PwMlUErc1vEfdhkhkTb3?= =?us-ascii?Q?wGXCNDAw3nA/j0Mvx1XSDTcHJ6gMAaI6nwFasTnCAcEMkytvd/PA0i+04dW3?= =?us-ascii?Q?eta1igzbIYpMKyfBQKGsCw4HfAen9UjkI9mfnuiESpq8PgZLoUKnwV2HkaPr?= =?us-ascii?Q?kw/GIO6cyn1OdZsXdoOQzcLLkPMgCB6ajd41efAAI1D/drCVTrT8so8ydBkp?= =?us-ascii?Q?oJibS0OwOcKvU2g4eWx/4qS4yjqSamjzRj1gzZiZOre5ihk+/wvvpvJKdG2j?= =?us-ascii?Q?a405Fw4Ncud4A8wD4ccZtopwHfkObb/2MktN17eDplpxfC0VXBYLRsBdGB3p?= =?us-ascii?Q?DmYEd7xPNb6qwoJCSKBIj9B7ycCYV6u4E5FFI8aCbd2Pxq8ZkhqAC3zNJ7Hs?= =?us-ascii?Q?jttRUZkJPj5TxZOQ99fGY7y2?= 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: 150980d5-4d64-4fbf-29a3-08d947386194 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Jul 2021 02:29:33.0063 (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: tp/4MO5Bk2y25gdbOsQZj2Xrn1NMmGKFeFCST7I1oN/t0esXPDG9cQKaEE6mHUtZbXdK2YR3dc+8lhvRjFfSxA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR11MB1387 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: Wang, Jie1X > Sent: Wednesday, July 14, 2021 01:04 > To: dev@dpdk.org > Cc: Li, Xiaoyun ; andrew.rybchenko@oktetlabs.ru; Wa= ng, > Jie1X ; stable@dpdk.org > Subject: [PATCH v2] app/testpmd: fix testpmd doesn't show RSS hash offloa= d >=20 > This patch reapply Rx/Tx offloads configuration for all ports after the p= rogram > configuring the device port. When the program configures the ports, the d= efault > Rx/Tx offloads are modified in > dev->data->dev_conf. >=20 > So it is need to reapply Rx/Tx offloads configuration after dev_configure= . >=20 > Fixes: ce8d561418d4 ("app/testpmd: add port configuration settings") > Cc: stable@dpdk.org >=20 > 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(+) >=20 > 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) > } >=20 > 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; >=20 > 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; > + } 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 } Not only check and change queue offload. > + /* 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