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 377D6A0547; Mon, 19 Jul 2021 18:18:20 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EB6CF410D8; Mon, 19 Jul 2021 18:18:19 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id C275440E28; Mon, 19 Jul 2021 18:18:17 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10050"; a="211144745" X-IronPort-AV: E=Sophos;i="5.84,252,1620716400"; d="scan'208";a="211144745" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jul 2021 09:18:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,252,1620716400"; d="scan'208";a="431745552" Received: from orsmsx604.amr.corp.intel.com ([10.22.229.17]) by fmsmga007.fm.intel.com with ESMTP; 19 Jul 2021 09:18:13 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10; Mon, 19 Jul 2021 09:18:13 -0700 Received: from orsmsx609.amr.corp.intel.com (10.22.229.22) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10; Mon, 19 Jul 2021 09:18:12 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx609.amr.corp.intel.com (10.22.229.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10 via Frontend Transport; Mon, 19 Jul 2021 09:18:12 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.174) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.10; Mon, 19 Jul 2021 09:18:12 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=a1Pwo/9Zerq2GXkUPaji2ofb+v9Zw0xoHqMfJIzuTIjdNzcS3TPxWtVY16uieXmIFHLpf7/Hx19AwSa3CdNRxCZjXwEf8j3MP41ImIH1u5IheStRFK42KK9YYXAb14x/+jbT1eFB3mF0i55ho+elUX/TTgHYts4Sc24oN/kK0uakjdBxk/OeFzw2zejJ46CJkZuYyry6K91wqBMKbYvQg2qg/dcp3/EnBVg7tIVoDcbsbm31J61IbUBVJobro3qiKfCbf4l5GcNHM4XaGCvv3HwHluiX37fiu/XRWVsAenZ+3nukdCfCSArNd+/nfOXo0vBKgQCnZ+UBkhqKSpGLdg== 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=y3z37fRDujCDZN2mrKLAhqb/x2VIi3jzWBzmwtxl1OM=; b=KbPQCAVn6nXOjGME7fmW0DGsuEiLv7Cj+fe2KoJlRkgYvzWUroiPTNOJXcPhFpQkY4eIyGksNlPuh5XFoxajk8BUaW7cHxdbmkltd6TksWGf9AtKMllpwH+wzIpS2+Vrs09kR7fFaNwAUOlGmpYG60N/pi9L5DXAdNOcM5CSd9ihvk1ym4484zZcvJ2xJ4ku9RMsG4Q6zKrv/xZeCaXqh8rmkrNkgN2fLIOHL8Vuyn46Ab4WyBQhWef8tZQZce50EmhpLbmXvr+QGN0BgsTqMWs/Mg/SjOnMgE0tVq4AMDDPt7AKpqTYfapprggw7mZo+kGkhBsIBe1Al3+O1H4mnQ== 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=y3z37fRDujCDZN2mrKLAhqb/x2VIi3jzWBzmwtxl1OM=; b=Mpptg41bqm0khQ/4qM+5w5iRCqKWVYuc7JZtKn6UbyL1AeyDsXjrFVbK0vvqkkJSehQ4FeFWwEJxjYECFPlPBtE+reQHhimEH1qEcF1n19yY2+n7qe8o2TljMIHcPSjh43OhDtFq39GMhR/LlTOBCU3mc/sBvEWozwhvZ4nPO9U= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by PH0PR11MB4903.namprd11.prod.outlook.com (2603:10b6:510:36::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.21; Mon, 19 Jul 2021 16:18:11 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bde5:66de:e755:c5bb]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bde5:66de:e755:c5bb%4]) with mapi id 15.20.4331.032; Mon, 19 Jul 2021 16:18:11 +0000 To: "Wang, Jie1X" , "Li, Xiaoyun" , "dev@dpdk.org" CC: "andrew.rybchenko@oktetlabs.ru" , "stable@dpdk.org" References: <20210715113314.8837-1-jie1x.wang@intel.com> <20210715115720.9981-1-jie1x.wang@intel.com> <2102efc6-84e4-f9e2-9053-d5c1a9119a22@intel.com> From: Ferruh Yigit X-User: ferruhy Message-ID: <6ccf6403-7103-d397-83fa-de233959db78@intel.com> Date: Mon, 19 Jul 2021 17:18:05 +0100 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LNXP265CA0025.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:5c::13) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.0.206] (37.228.236.146) by LNXP265CA0025.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:5c::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.21 via Frontend Transport; Mon, 19 Jul 2021 16:18:09 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 39f7d737-84e3-4b67-8dfe-08d94ad0cda9 X-MS-TrafficTypeDiagnostic: PH0PR11MB4903: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:252; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: SPHeafm90CQ+7k/GuXGF0cOJHYVATextrx5ZMHkGEFXFeDAoQ1Npw+sJgS2IUzxvfgKQEfOoYSq0/VgQoMfI+niCvkcIq/Oq0vM/J9OKZDxOrERYY9D1p6QUjDz042IcODN+mNNWnhI2fWOAJqGf78TGrXVejSfqs9aKPvnQylCpYuOocB3kXcGIyCktelF8FZBXuDhY0Ztyi+yPrM/IU+ofHYxB5JTejnszfIN+q6cAtIco4LZnkE4L0DAvsiHHQ+qngWlonooGbA7YGqENgUGRG1D15rK9sU8g9Vd26Pl4c/vh0JkDeEHa7SgAwiLm2N7FFy8jmj5cn33EpamgwSVMOdVqbC2E6uM2/X+16uCbiyd8K6+ZinWl+1XluFz/MLBBXUfzvGaUlf1FGPgaHx2Xge5Bj5EY7LzNJUV79adfBXccUTT5QdQiPKYdLzvoXgBpSrPBGmHUWBU6z2Tn6oCHYe+oB9KZnhV7a4fkC2gpOO3bw0XDbgODtfnPhmN4y6abpkkMG7W9hKD+YALKOmnCFYoIRz6T6WeBz/oO1M7ApOrcpOO+bqyEYp1DROlxf4gBiAU1g+mvKArz7rFgks2ctDqt/QPPjyVFzA3rq+tlZ5yD8NbXNRlvJXCUaj/HsaQ8w8wWFgAf/hWHTWUco5Q7H7NBKaNY8e/OWreZDRfxnvvQ4+RWNyb0tS81k05KF5nC2UfaNRYWNxrSs5n46Q== 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)(346002)(376002)(39860400002)(136003)(366004)(396003)(31696002)(38100700002)(83380400001)(86362001)(6486002)(66476007)(66556008)(36756003)(8676002)(66946007)(31686004)(5660300002)(478600001)(8936002)(6666004)(956004)(54906003)(53546011)(2906002)(316002)(16576012)(110136005)(186003)(2616005)(4326008)(26005)(44832011)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?dUtBVlQ0SVlNdnR5VENjdFRPN2JjY3JLRC9mcE9SUHFXOWQ1WnJ2MUFRNDFs?= =?utf-8?B?enlDSC9RR0Jwb2hJNmhFaFZOSU5xOUpXZWFnb2tidEh1Zld2OTVQNjg1djFS?= =?utf-8?B?c3pWMVpUUU5pOUY2SUZZZmxublRSRWx3cVlSbGd6Ui9UVStQN3dxaXJrdFlW?= =?utf-8?B?WjFBTk5vVUlveXh2L2ZWQ1pKNlJZZlJheGNSQVF4cTRPRi81QVhSbFhtVmpp?= =?utf-8?B?bGRBNnUyWkphODdwUzJwSUU5UVB5VHhzUEVkaVM2T2RWRkc5dzd3MVVhUTVO?= =?utf-8?B?cFNxNl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jlJ?= =?utf-8?B?Uklod2c3UktHNlh5a0Q5WmNRWFlTTU9ESG1SM3pzVzRyMCtzc0VPbDJJSUV5?= =?utf-8?B?SHNhbkZhZnNWSEVIT3JRUlVpMVMxa081Rzd2akNzYncvMEpjNFZHeDFQSVFK?= =?utf-8?B?MnA1cnAzYW1vTlJ4Mi9KNXIxR0V3OUU5NmdkYSt0c0ZzMXlqbEw5b3M3Zm1U?= =?utf-8?B?R2JxTlg5dFRnd2VoT2RHUGVlRzRJOVZvK2dabEo1clNKUmxnK1BnODdBZWJ2?= =?utf-8?B?QjFmeXJJNHlqSVhOWkJFa2Z6Tm5zYkJENFpqaG53MTRzd05aYXcyUnFTUC9x?= =?utf-8?B?Tk0zc0xwY2NoOHYySVZEejYvczFHK3hIRUdUaTlvMUNidkU3L3JWb2hMaVFl?= =?utf-8?B?a1ZHTFhJRVJtL1NWaDFvR3RNSkRzWk5RYzBlVXpPVk8vTE5RWE1XWlJ1Yzli?= =?utf-8?B?UmxxQXp3Y3A1cUFMYzdDVnRvYUc1MUtITHN4NG5MTnhYbmNyL0pIUndtOFhD?= =?utf-8?B?L3JPdWx4Ny9MS3pLSlZCOEErSVpPa1ZMRnRQQlFoK0VwMjJmR0cxNUZ1eVcx?= =?utf-8?Q?uTvO/sY6IGHyZo2Qt8EmavBEMZGXOvc2xdS+rRB?= X-MS-Exchange-CrossTenant-Network-Message-Id: 39f7d737-84e3-4b67-8dfe-08d94ad0cda9 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jul 2021 16:18:11.4914 (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: Uue0qTv/1MykrdSNEawjMK8H70Lsq0iIXcKBwpZTgK5UImwyDpEqGXBT6/pmCCP8nG4UycY/nAdjXkdxnAaXVQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4903 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH v4] 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 7/19/2021 10:55 AM, Wang, Jie1X wrote: > > >> -----Original Message----- >> From: Yigit, Ferruh >> Sent: Friday, July 16, 2021 4:52 PM >> To: Li, Xiaoyun ; Wang, Jie1X ; >> dev@dpdk.org >> Cc: andrew.rybchenko@oktetlabs.ru; stable@dpdk.org >> Subject: Re: [dpdk-stable] [PATCH v4] app/testpmd: fix testpmd doesn't show >> RSS hash offload >> >> On 7/16/2021 9:30 AM, Li, Xiaoyun wrote: >>>> -----Original Message----- >>>> From: stable On Behalf Of Li, Xiaoyun >>>> Sent: Thursday, July 15, 2021 12:54 >>>> To: Wang, Jie1X ; dev@dpdk.org >>>> Cc: andrew.rybchenko@oktetlabs.ru; stable@dpdk.org >>>> Subject: Re: [dpdk-stable] [PATCH v4] app/testpmd: fix testpmd >>>> doesn't show RSS hash offload >>>> >>>>> -----Original Message----- >>>>> From: Wang, Jie1X >>>>> Sent: Thursday, July 15, 2021 19:57 >>>>> To: dev@dpdk.org >>>>> Cc: Li, Xiaoyun ; >>>>> andrew.rybchenko@oktetlabs.ru; Wang, Jie1X ; >>>>> stable@dpdk.org >>>>> Subject: [PATCH v4] app/testpmd: fix testpmd doesn't show RSS hash >>>>> offload >>>>> >>>>> 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") >>>>> Cc: stable@dpdk.org >>>>> >>>>> Signed-off-by: Jie Wang >>>>> --- >>>>> v4: delete the whitespace at the end of the line. >>>>> v3: >>>>> - check and update the "offloads" of "port->dev_conf.rx/txmode". >>>>> - update the commit log. >>>>> v2: copy "rx/txmode.offloads", instead of copying the entire struct >>>>> "dev->data- >>>>>> dev_conf.rx/txmode". >>>>> --- >>>>> app/test-pmd/testpmd.c | 27 +++++++++++++++++++++++++++ >>>>> 1 file changed, 27 insertions(+) >>>> >>>> Acked-by: Xiaoyun Li >>> >>> Although I gave my ack, app shouldn't touch rte_eth_devices which this patch >> does. Usually, testpmd should only call function like >> eth_dev_info_get_print_err(). >>> But dev_info doesn't contain the info dev->data->dev_conf which the driver >> modifies. >>> >>> Probably we need a better fix. >>> >> >> Agree, an application accessing directly to 'rte_eth_devices' is sign of something >> missing/wrong. >> >> In this case there is no way for application to know what is the configured >> offload settings per port and queue. Which is missing part I think. >> >> As you said normally we get data from PMD mainly via 'rte_eth_dev_info_get()', >> which is an overloaded function, it provides many different things, like driver >> default values, limitations, current config/status, capabilities etc... >> >> So I think we can do a few things: >> 1) Add current offload configuration to 'rte_eth_dev_info_get()', so application >> can get it and use it. >> The advantage is this API already called many places, many times, so there is a >> big chance that application already have this information when it needs. >> Disadvantage is, as mentioned above the API already big and messy, making it >> bigger makes more error prone and makes easier to break ABI. >> > I prefer to choose the 1st suggestion. > > Normally PMD gets data via 'rte_eth_dev_info_get()'. When we add offloads configuration > to it, we can get offloads as same as getting other info. > Most probably it is easier to implement 1), I see your point but as said before I think 'rte_eth_dev_info_get()' is already messy and I am worried to make it even bigger. I prefer option 2). @Thomas, @Andrew, what do you think? >> 2) Add a new API to get configured offload information, so a specific API for it. >> >> 3) Get a more generic API to get configured config (dev_conf) which will cover >> offloads too. >> Disadvantage can be leaking out too many internal config to user unintentionally.