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 BA7CAA0C4F; Mon, 9 Aug 2021 10:54:18 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 728934069D; Mon, 9 Aug 2021 10:54:18 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id B99C74068A; Mon, 9 Aug 2021 10:54:16 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10070"; a="214639234" X-IronPort-AV: E=Sophos;i="5.84,307,1620716400"; d="scan'208";a="214639234" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Aug 2021 01:54:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,307,1620716400"; d="scan'208";a="670717582" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga006.fm.intel.com with ESMTP; 09 Aug 2021 01:54:15 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) 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; Mon, 9 Aug 2021 01:54:14 -0700 Received: from orsmsx605.amr.corp.intel.com (10.22.229.18) 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, 9 Aug 2021 01:54:14 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx605.amr.corp.intel.com (10.22.229.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4 via Frontend Transport; Mon, 9 Aug 2021 01:54:14 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.171) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.10; Mon, 9 Aug 2021 01:54:11 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LJBl+ZxXkRPo/bQSXLtEwwmEsiEQv420XPWd/aUhHPLEtUwZ0sPpWbqKW89e/2aR03PBtIUgsWwViBSu0H2a6t+x5NCxB9D1E20Z4UonGEoxJXTTkWvef28H3fnWUXjwoSB6cMfUwInFJvFMtF0cIQX+f5aVOJPHCVGsRSuUHkXx+6PNj359T4YWNhK12Ru8OBk7Fr07dP7HrFGWfwcZm0INmUG441+hcM+1a8CDf2ABj3Qjl6DbXE/1CimVaTpcx1ZpI38O8moNCWzFqqZs7+tWRQhDZxgWpFB5IYOQhz4Lw5Tpmh+ie5grltsSXoaUkUQl1vRxK7setiyVRX3c5Q== 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=rPCpsjruwjsC91YLqgbryxyWk6F9j6gxBarEslIpUvk=; b=PsCof+wQ8PwKUc2AnxMaRI981YCXVCZKLujEGZqeI1Ujmvia7tZ/8hdsgTYwZTQdyoy5JXrH88RDNpe5yhVeYT7MYjKThXMgxH5k0ddE1hP1qiu5F1cy3iSNWFNAs+SBmWAR4/a09w4R85Z0Cq/nrM/EKEtjgeKoM18Idkj6oa6RECCseZpieF6hS8AlC3NXUsPyztVn9dTloRm0ijn+14bA825o2bjuXyajM1bm6vyZibjgXyxpteTmfzZ4J7OuD/rEwdAXv12uQB9rBe8nkasMGYNubSatVJ5TcaezbjbVXUsyZOiK75qZ8APQecTseGtbxqHhivU3fMH95LoW6A== 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=rPCpsjruwjsC91YLqgbryxyWk6F9j6gxBarEslIpUvk=; b=az6QGDnfWKU4hkJtdcOllT5dnG4KXdFY/mS6xFZ3jdiiVY1G/p64AQfxi8i5T02FHR4W8x4pDo0kj0bifl0RRDyP530kReqC13Dg+rQdMTAdRSV9fpu4HXIwT5Ldc7XPh5ay/3gXqzVXYPvbSbycIWhSlNDotxvsbtlv3d8D0/Q= 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 PH0PR11MB4983.namprd11.prod.outlook.com (2603:10b6:510:40::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4394.17; Mon, 9 Aug 2021 08:54:03 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::2979:70ca:38a:dbaf]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::2979:70ca:38a:dbaf%6]) with mapi id 15.20.4394.023; Mon, 9 Aug 2021 08:54:03 +0000 To: Andrew Rybchenko , "Wang, Jie1X" , "Li, Xiaoyun" , "dev@dpdk.org" CC: "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> <6ccf6403-7103-d397-83fa-de233959db78@intel.com> From: Ferruh Yigit X-User: ferruhy Message-ID: <7108639a-dbbe-6a95-0e50-553455760cd3@intel.com> Date: Mon, 9 Aug 2021 09:53:57 +0100 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-ClientProxiedBy: FR0P281CA0087.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:1e::12) 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 FR0P281CA0087.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:1e::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.4 via Frontend Transport; Mon, 9 Aug 2021 08:54:02 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: cfb8449d-56e9-4aee-24f1-08d95b133ce8 X-MS-TrafficTypeDiagnostic: PH0PR11MB4983: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:352; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Lomnxocrx48sgRwPTVojs2XiLB98BleSeJWt4Yb6BAviCNAI2F00xCdLkkCiJRtUloZ7E29jqfgb4JFA87r4yNBekYaUBrsdp/DjYeIlsuhM4LsP5SEVyoqkprd7Bmt4P5YvgxaAPw79cZ1XmjZe/7fyUQAygifHLAeMiJS8QOcSXDroKJ2lhmcfzjPE0yglck577HAYzlOCfDDtBg76k0WZn3Z19eFbPqSyoeW0BWR43/TWVQ2FeJBhjZJ73pcKgFPmwbJhDrJPQ3rx3dy4GXpDzcPO+FWYoz4zrGh/BSlJtgtHoeiyLPsh0xHcauXrNkrR1eDWpEAfHyhJNNTKXtgu7Tr9TgJzkItI6ID9I5WnT0SIy9NEl1pZRV+G85kvpRqaMYLfbYmczApAoOkxWffmvpRPGwxOH+a+AZv2DFy/PMykSRDa1rFJkIqHm372teuf/XN63DfFvXNGuYh07IQjOHqTeok+XjsUHMfx2/Nk+aUFujlay4TZ0YskZd9c7uEQczLJZn9D8BkdIydOgELMbCEXa8XX7EDOJ9tdkZa5GXuWLNMPhRJNACp4mRK6Ztb94ceoMQBS3UVKC0RXUg5z+Fxp0JXCztAHwGq3t2XMHmcCkJdriGeKOvu4gAbT+rwd+y4igcynxbNVGCHluXkA9+ypU6AwTzlPVBJBjDMf+ndIlqZxlawltpZ9NZMegn2DhbQubRoeU5Rnem2+7g== 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)(39860400002)(136003)(376002)(396003)(366004)(346002)(66476007)(956004)(31696002)(6486002)(38100700002)(8936002)(2616005)(66556008)(110136005)(66946007)(53546011)(26005)(478600001)(36756003)(44832011)(316002)(2906002)(16576012)(83380400001)(4326008)(31686004)(6666004)(186003)(86362001)(8676002)(5660300002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?cjUwZ3VDQkZscHIyTHZTU3Q2WGQrM3QvdytCcnorcE9ua1krb29wc2Z4TmQz?= =?utf-8?B?UmJUaUNVZm5MYStNMFNRRzk1M3VCVTc3QWZkZkI5d1lOYXhrYjk3cG1sNjZ3?= =?utf-8?B?ZXNwUDVXMzFXZ1dPK0xrWmNOdUQxcEVyVWtoVTlCbWJTTy9XdWRudll0RkVN?= =?utf-8?B?akZFM2l1OEkwV1FHa2srbVFadUhiZUVEekVuUlhxUkw1bTgweEZhTnVaNDln?= =?utf-8?B?VEZmRURoWTNENFFhVDdRNHk4eHVTNnE1QnVJanVHc3B3TnBtTU1qVm8xblhK?= =?utf-8?B?Ky9aRGo4SURXeWo0Ykp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t5NDFiOFluMS85YUdRR2liMlBEbnVUSDI4d3FlOUU1UXlOYUl4SDBG?= =?utf-8?B?NURzNGZ0VEhJM1dPNVVqS1EwUHJSZk1lZEw0WEZXclpFRmQ0S21OdkNUdm5x?= =?utf-8?B?STgxelNkcjlVdnRNYlNQRVpGQzBwdmt5YWZnc3NJSlMrUTlvSjE4WWF0Ulhu?= =?utf-8?B?cDJzdHp5dzVVTFZKWk1UeGJmNU0ybDVnaXJabTZNNllTajhId1J5dDNSTmRP?= =?utf-8?B?NEhMNVdTWm9ZSElPSDlDYVpTU2JVUjdhYnBmVmU1UDFldTYrMkw1L28reWZp?= =?utf-8?B?MEhZZENTMUUvRnhkTnhMVzlKZWZDY1kyam9jWTVJUnBqSFZQcHRJQk15eFZW?= =?utf-8?B?cktlSWh4WHArWWJrWDZra0VsM3JLYmdnVUZhUlpLRjZieFQ2b0VjYWFibVpP?= =?utf-8?B?K25wcGlKQmRaWnIwWnBKQ1NYV1Fsblp5dy9CRk1KSW5SUXB4UU9FV0Y1MDJp?= =?utf-8?B?RDdtWTJ5MTNxR0p6Ukp2UlBBQTdTT2xoWDYvd2FCK01XeXNObE9KZWhXVEIr?= =?utf-8?Q?mN3YTL5lKE9L5ZbjqkpQ2y1uLOLTt1HcTAfl1rf?= X-MS-Exchange-CrossTenant-Network-Message-Id: cfb8449d-56e9-4aee-24f1-08d95b133ce8 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Aug 2021 08:54:03.6338 (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: f92Zpf5jf0yrkkFWSPxRKvaoKtiTZP2pn1Scae80DZ0U9psHybqDBI+C36Zwm5ARfOXYQgRDBKir8ic8r4uX8Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4983 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/22/2021 12:03 PM, Andrew Rybchenko wrote: > On 7/19/21 7:18 PM, Ferruh Yigit wrote: >> 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. > > IMHO, (1) is not an option. > >> I prefer option 2). > > I'm not sure that API function for each config parameter is an option as > well. We should find a balance. May be I'd add something like > rte_eth_dev_get_conf(uint16_t port_id, const struct rte_eth_conf **conf) > which returns a pointer to up-to-date configuration. I.e. option (3). > That is option 3, that can work too. > The tricky part here is to ensure that all specific API which modifies > various bits of the configuration updates dev_conf. > They have to, aren't they? Otherwise there is no where to record the current config for PMD too. >> >> @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. > > I don't understand it. dev_conf is provided by user on > rte_eth_dev_configure(). Yes but application doesn't provide all config, my concern was if some internal config should be hidden from applications (possibly via some APIs). Overall I am OK to go with option 3, I think it can simplify the applications life. And later we can have some more updates on testpmd to benefit from new API.