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 511D0A0C5C; Wed, 8 Sep 2021 18:51:19 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 16FF240E25; Wed, 8 Sep 2021 18:51:19 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id A3B634003E for ; Wed, 8 Sep 2021 18:51:16 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10101"; a="207649856" X-IronPort-AV: E=Sophos;i="5.85,278,1624345200"; d="scan'208";a="207649856" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Sep 2021 09:50:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,278,1624345200"; d="scan'208";a="606316830" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmsmga001.fm.intel.com with ESMTP; 08 Sep 2021 09:50:55 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Wed, 8 Sep 2021 09:50:54 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Wed, 8 Sep 2021 09:50:54 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.103) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Wed, 8 Sep 2021 09:50:52 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SVQIwF/iJ/ohpENNV+XMsxuogTKG6afXKpEw8V8yWGnXvXS8LrEW6HmNM6cOY/J1oTs/hmM+3ScrUujp49YvoUTLfAdPSn45lwx2LG55Izx+R2rdQLFAz5b5Et65NyZPEymOG7Uo2TzxwIyv/To9uUE/Ii9GaDvPzT5NeEARgmUvtThx4vbrUEpRavtYPGwnKOoW22IyyXlJDKDoKDrCydVxYLCy6B4GlAwaHPpJs3MfTTf/ZC7ZFI0ShP53cBI4tOl6bQ55Qkc3S10O23UGxDvEn5AG7PAor+w/UVfTeQGgDZdujVhIWQH5BZS62UFILEM+2ehGCSVTn1sh/mLetQ== 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; bh=kZH7M/Nb39WrHZdPkBM/pvz9d1QhbaLyi2pkmK9iAT8=; b=VHALULh5fNd3VO9Y48CeNOrEXyBPf7R/omqV2oFLqVjl9eQFzKUKnv7g4Nt5M9TxZ8TugDPbRDNvrj4fesfe+q/qhr0iBfJ3bWmkUCZYKrp5IV/3aGcXP/lvmgKHP8Fl5ueaeKljZYzBuX0AhLbruXD4i6UvicQxzfV0fuEmsjxLtzTsXHmZso/bBjX2TMmxvSEdlYWxlFp4SRpMr/mNMXFXXSGkCwxka89wJekf+Yr+fabBAteQ1CAL5U1+pH2bitFxI3CjzonYJHMmbYpJMwGuOIrTjOR2h7fb6iSdd0/I5uwOUIGgJml6O7J4KANU7U3ZzBEYGTfv95KuZmKJSw== 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=kZH7M/Nb39WrHZdPkBM/pvz9d1QhbaLyi2pkmK9iAT8=; b=EI4w3njYQ2Zz+REXCD3lYdFsmixig3a/hfehpTqUL7aG5r50q5oP2hyZrfOcuGeFsTJ6+nMZ2DIUFVNF9plwa4Q287BChTRoyi/G7ZRd1XMW//LAiKA1WqTagjEJqIfMIjarVNUcYi4E1MWDSmel5UF05j84RZJjtc6U5xVRF8c= Authentication-Results: monjalon.net; dkim=none (message not signed) header.d=none;monjalon.net; dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by PH0PR11MB4902.namprd11.prod.outlook.com (2603:10b6:510:37::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14; Wed, 8 Sep 2021 16:50:47 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::747b:3a08:d1ec:31fc]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::747b:3a08:d1ec:31fc%5]) with mapi id 15.20.4478.025; Wed, 8 Sep 2021 16:50:47 +0000 To: Jie Wang , , CC: , References: <20210826070924.308368-1-jie1x.wang@intel.com> <20210827081740.365037-1-jie1x.wang@intel.com> <20210827081740.365037-3-jie1x.wang@intel.com> From: Ferruh Yigit X-User: ferruhy Message-ID: Date: Wed, 8 Sep 2021 17:50:41 +0100 In-Reply-To: <20210827081740.365037-3-jie1x.wang@intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-ClientProxiedBy: DB6PR1001CA0007.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:4:b7::17) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 Received: from [192.168.0.206] (37.228.236.146) by DB6PR1001CA0007.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:4:b7::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.15 via Frontend Transport; Wed, 8 Sep 2021 16:50:45 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4af64d02-8257-4d04-dd37-08d972e8ce4c X-MS-TrafficTypeDiagnostic: PH0PR11MB4902: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4714; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WL159lmrUqZYPX2QBaD/AvNzA//+qTmNiNTpXCHHsM2Z8/4j22dvsjTy812lddPsTGdZm1BaC491H3jVODjNskimiX6bujxq5UNcAMnpoo+zCW7Z2EgX7Oky8rJDfz2ygmCzixwz4FcAwcZ4cGXZjvzGVVYRcAXom8oOcBwZLZy5wSjfHNucgjr9HNo4SgoHtv1D2Uy2kR6Egam+UqcUYklEQaQxGSiMOryx+Y6JrmmtYAAZzGGeYt5bRZdT2Yq+Ba3a1crLdk/tHmTwynvA+kRLJrfnC+2Bi6s9MNRGYRGxNScxb30UjwTjLs0MjhJ2SUX3urDoWh4OQt82QDv9BUyuZKy2MBi4/q+3/0VDBbkzAtzb3D9FS/Pd+4Ihk7UbBCp7GqHcNFQfpm+ehgTXRNLmHiYKXTdmk1s9klV2VCBZ5fRsC/Ai6eOPXl0eh/b9wptUqSj/R+UWF3YH7ZZu/avWMZgoSl+xNFPs9f5YiMhWKiJu2R2B0ZpPuEiUH8MozdLHoGMAdfZA24fX6h1gZOqUVYZAYMUPCKNJBmMuXh6vt37LeqwM+z+C8CxeHkwNfcNr16g4yd7nxnPGwQjeQifekvEikTxeSNeDa74OEl9cizYD1ImWhVPdAQ7CVJUyrnNJvfeMUM7098pYg/v9n/IKTvVrpsUsh8dyHs7ferPtqYV+jrrsvCar94NTcPTLdEsBux5PKteGqPD71svvPQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5000.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(346002)(39860400002)(136003)(366004)(396003)(8676002)(2906002)(31696002)(16576012)(8936002)(66476007)(66946007)(478600001)(6666004)(316002)(956004)(53546011)(31686004)(38100700002)(36756003)(6486002)(2616005)(66556008)(44832011)(4326008)(26005)(186003)(6636002)(83380400001)(5660300002)(86362001)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ZDlRL3VFUU1qSUgzS0xmdVUzTWcvVGtlanVsZncxQStDbjFreG1UMHNyTy8y?= =?utf-8?B?MHh0d1lpbE1ZUWI4R3Nzc0tqVHJYOWFQdE9nb0tDV2xsL0hibk9DMkJJUmRM?= =?utf-8?B?L2poTmJTZXlJZENPOTBuaWJjOHVhd0RmZ3JzVVZxTzFta3lzOW9MTEFBVTJN?= =?utf-8?B?R0ZXSW9NNDdvMTQ0c2Z0ckUwVW1VRlAwL25xcXhBbloxNDNZK2gzS0VZdjJo?= =?utf-8?B?Z01OdVhDL3pQOWNLWVFWSU91WThlRmFVR0c1WTBGUkg3L0tVZy91S3JuNktP?= =?utf-8?B?NVdxcExwcDZsTit3eXQ0bjFJYzgxeGY2dUgvU2NDZ21COHpQdmxlVnFsUVM3?= =?utf-8?B?cmxDcnl2MjhNTVRoSGtzaU01STBPMFk3M0VjdDlTM29KN0MzdEI1N0tUZE8r?= =?utf-8?B?TkZLUmNnMmtoY3lVTTlRVUpuNmRBWlgvWm1ybytsMFRBOUQxRXFpdUNYQjU0?= =?utf-8?B?b2EvZTNMQTlZemNzVTUxZzU4ZWlhQndjTG51ZE5lbzBydURRNUhHdWFNNEZ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l0VnozcE5acFZqSlVD?= =?utf-8?B?aG9KaTRZRW5ERWg3YVBkRkh2MUFOQ3d4L1RLejE2TVpGQUltdkMwcWFlUnNr?= =?utf-8?B?NVoyVFBXT1MzQlYyck9uczVHbXk1bUJ4dEdiNHBvNFQ4cWtTOEZGWmNnSTFI?= =?utf-8?B?TThCcGs1NEtISmhOKzlSRHNMRFlEQWEwbWFQbXNNZzU0R0FxQlNJSW1KTUVk?= =?utf-8?B?MldmV0tSMDQwNjBSQzhBeGllekJXRTNTMTAvMlVnRzRjRUYxQTZjVDFuekdQ?= =?utf-8?B?aG9lRU1sZFhTSFBLd1hReFFPQWpCZVdWKy9YSWdydFFsMU1ZWEtMMEJaaTFD?= =?utf-8?Q?UVHFG0rjmC4Pbyef3GOvdOMVuwkl6zIqfXXuxj8?= X-MS-Exchange-CrossTenant-Network-Message-Id: 4af64d02-8257-4d04-dd37-08d972e8ce4c X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Sep 2021 16:50:46.9794 (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: tMY7rQ38x5vRGn5iZQukDhGRppL94bGZhiO0Q2VmT8v/BaIypsw/BiFMgGzSwDXrSTADs3dni5xkQCMwP53Myw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4902 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v8 2/2] 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" On 8/27/2021 9:17 AM, Jie Wang wrote: > The driver may change offloads info into dev->data->dev_conf > in dev_configure 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") > > Signed-off-by: Jie Wang > --- > app/test-pmd/testpmd.c | 34 ++++++++++++++++++++++++++++++++++ > app/test-pmd/testpmd.h | 2 ++ > app/test-pmd/util.c | 15 +++++++++++++++ > 3 files changed, 51 insertions(+) > > diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c > index 6cbe9ba3c8..bd67291160 100644 > --- a/app/test-pmd/testpmd.c > +++ b/app/test-pmd/testpmd.c > @@ -2461,6 +2461,9 @@ start_port(portid_t pid) > } > > if (port->need_reconfig > 0) { > + struct rte_eth_conf dev_conf_info; > + int k; > + > port->need_reconfig = 0; > > if (flow_isolate_all) { > @@ -2498,6 +2501,37 @@ start_port(portid_t pid) > port->need_reconfig = 1; > return -1; > } > + /* get rte_eth_conf info */ > + if (0 != > + eth_dev_conf_info_get_print_err(pi, > + &dev_conf_info)) { > + fprintf(stderr, > + "port %d can not get device configuration info\n", > + pi); > + return -1; > + } > + /* Apply Rx offloads configuration */ > + if (dev_conf_info.rxmode.offloads != > + port->dev_conf.rxmode.offloads) { > + port->dev_conf.rxmode.offloads = > + dev_conf_info.rxmode.offloads; > + for (k = 0; > + k < port->dev_info.max_rx_queues; > + k++) > + port->rx_conf[k].offloads = > + dev_conf_info.rxmode.offloads; > + } > + /* Apply Tx offloads configuration */ > + if (dev_conf_info.txmode.offloads != > + port->dev_conf.txmode.offloads) { > + port->dev_conf.txmode.offloads = > + dev_conf_info.txmode.offloads; > + for (k = 0; > + k < port->dev_info.max_tx_queues; > + k++) > + port->tx_conf[k].offloads = > + dev_conf_info.txmode.offloads; > + } > } Above implementation gets the configuration from device and applies it to the testpmd configuration. Instead, what about a long level target to get rid of testpmd specific copy of the configuration and rely and the config provided by devices. @Xiaoyun, what do you think, does this make sense? So instead of above code, update where RSS hash offload information printed to use device retrieved config instead of testpmd config, will it work?