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 89A58A0C51; Fri, 16 Jul 2021 10:52:29 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1AF9E40151; Fri, 16 Jul 2021 10:52:29 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 5C4E94014D; Fri, 16 Jul 2021 10:52:27 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10046"; a="274526140" X-IronPort-AV: E=Sophos;i="5.84,244,1620716400"; d="scan'208";a="274526140" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jul 2021 01:52:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,244,1620716400"; d="scan'208";a="494882544" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orsmga001.jf.intel.com with ESMTP; 16 Jul 2021 01:52:21 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10; Fri, 16 Jul 2021 01:52:21 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) 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; Fri, 16 Jul 2021 01:52:20 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10 via Frontend Transport; Fri, 16 Jul 2021 01:52:20 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.177) 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; Fri, 16 Jul 2021 01:52:20 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=E0YoUDbKSJwbg3pqJcqagTcZOSLg/VgVCHHyDRYlkTXrvsO63UTGVxzggZlvnRvG6lAcGeHntUA7RMayVvsH55zNf4KxaNpEk/Fp9WgyTrSBKZXSpKicFaPFnbkEKI1FvqGiKN1KANrLDNrBcBI6asRxpGX/KqH1z3VhaRBl2/dIo88iQPPSE4CiFTrElVwnStCNZ8EIqpu1GCKdaFDx3ZXBi5jl4h206/+eauyg67cNeHmtWN+QATI7PH7mWHsp9BjtKW8UzHVsJYPB9Cf601kUxzmbuJ5+8EyZzdkyCgjncKvOC9vanDNwMNn1RnzpPv8GwnVF0WAlH11ypwVsiQ== 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=GtCRIFXfP5Cp6E9NVp5B9IPrsZplKO983zhMi9m7TpQ=; b=lgeZz1AzVWKUp6VjCPo61XyrLkdlNTQKeWn0e/BGPWXH5NVMoCXswAfoYrn1PJTrkHNgsF2p0ayjgKnPgOu5kKnGwDuq9KEOYP8GmXpZ1lrsXBOf3LKAlx9Uj2A8hNKLRkqkrB6GHS7xN4g2kRWZgitlp2n3dWXaRdSgtFmlmlNfy41ozvxFScf7JAxvrc+WmoglCXlWzxSo0MVEpZE8B2GvKRj1R/S2w43OfAhIkwP+bRB8ENQSF2Yt55UhBsHSroadSzbcINTEAnx8WGChPCzxZIWh/053I00ct1f7hgNYioRTor5XBgSe3IYVtzRigu7lIYMXXDi4KbqgSwyvrA== 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=GtCRIFXfP5Cp6E9NVp5B9IPrsZplKO983zhMi9m7TpQ=; b=QaOS2NsA6ONb7IrZV6vPowScRgylVXjlfUI/QTolbOkxk0CEVYa0H+DL83OvJyeEUa44dj6264kXJNK2cpl4cimVAYGDdTxOhT9Ktv3fZvawXXD8Le/XvtMHWd6gNjihtkVQPNUSXVm176qc2IOn/2yKIFEC2A7HqEO1X1qZm+k= 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 PH0PR11MB5079.namprd11.prod.outlook.com (2603:10b6:510:3d::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.21; Fri, 16 Jul 2021 08:52:18 +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.026; Fri, 16 Jul 2021 08:52:18 +0000 To: "Li, Xiaoyun" , "Wang, Jie1X" , "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> From: Ferruh Yigit X-User: ferruhy Message-ID: <2102efc6-84e4-f9e2-9053-d5c1a9119a22@intel.com> Date: Fri, 16 Jul 2021 09:52:13 +0100 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO4P123CA0213.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1a5::20) 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 LO4P123CA0213.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1a5::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.21 via Frontend Transport; Fri, 16 Jul 2021 08:52:17 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d2c13eca-ba92-47fd-4a55-08d948370475 X-MS-TrafficTypeDiagnostic: PH0PR11MB5079: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:187; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rP3npmhFJms8RYOgQuFndh3yNjtdkZg0vouVoLBuQv5h/MumeuyC5s7RwHAhb6PmPpDIrgsb3a/TKkmVqLDjftQZGyk/JVpv+qff12SO9YRf1OrSy6tfJu8xhRl8Z7zC/3oeuJsaxQgc1d3iJkkDPgK5QESw/5KTjDq0SZkujqdipRhLXLXZ22XUhezXExxuhdNrS6+YOVZYBvldS5AGlUWNfOQDokGDWzgjhTpZ6zPLpa9xHKbaN8CZpCGj0zbnD48TSoJwWCHIWgPkwPeeTmeYX9h/e+RVYirYfouFBO0t1dbxhzQhHYUcn+SXHzF6Ux0lA419/FcWJvQw0m1fmlhD/ahYvccjIIVo+z/N2f5OSFix1iUBTT4POmXhxcWE+LxFy2FQ9YUE6EDvHaGJpYojNvhIClUPrablzY54bxLN8xTDSzotNpFdBMWsKhZOJlGH69PrfE01zISc5G4ugH3jnx9Us8g1TfmJzB0PO5Ds1y26QDvtwajiGcbTr7F62Uj1IYbZ33tZ2olmXTofidc5nnpkyxUZyT2yneY5K6cnjOcw68WcQQ6OImrTybsUTGfu0sO2lkdd8Kq5Eka0o2YYK/nSVf9WDFCX+P3Irfloq2M44Jpm6JswGtUbBrjgougnld3XLWsoLFgwuGtV6s39ODLhf6Sv91xHifMrfsrmCykzKx5tP+LgDgzZncCM/VOw01a7iCKopxb9lksxfg== 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)(346002)(376002)(396003)(366004)(26005)(6666004)(478600001)(4326008)(316002)(8676002)(110136005)(16576012)(31696002)(54906003)(186003)(8936002)(53546011)(83380400001)(44832011)(5660300002)(956004)(31686004)(66946007)(2616005)(86362001)(66476007)(66556008)(6486002)(38100700002)(36756003)(2906002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?bHE4VThkb0FDcjNuUnFwNjlSdXpqVWF1c056T21rbXZkYzB3aml5R2V5bGdV?= =?utf-8?B?N0dEbUkrUWFnZDB6ZzNoNFBtTm0yNXJ2MVNUa3hVZ3R3S01ONFJ6ZmZsN3pD?= =?utf-8?B?VGhiNXljc3dSMlk1SXFjU1hqWVk3OUpOMEhOM0FDMEhWVjc5bUlBL0U2ZTk0?= =?utf-8?B?ZDNmUXlhWXRMbUJieHFiUGRGNHBmUTNqT0kvOGNjVHJFdDB4MlByWTZmU1NV?= =?utf-8?B?MnpiVThRZkpFSjYwZDMxRDhyaFl5Nkl6aGVnTDdPa25QdjN0d0YyQ3V4N09m?= =?utf-8?B?TUVpOWlCVVR1NmlPblpESTdNY0ZkSDFJNXk0cTNtWWl3RnBBN1FpUjhVd0sr?= =?utf-8?B?YlhDRU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p?= =?utf-8?B?dnVVNmNJa2IvTWRueCtlaEYzaFlMNDF5TVBSdFNENFpNTmZEd0djdXROTjJI?= =?utf-8?B?VGFkbGoxTFZrcElBNHRzYnlhZ2R4MHUzTGxrdDFQbHFNYVl5OTNGbFZYdnIy?= =?utf-8?B?aTRGZ1BWaGNoUkJxQjV2ajRJYW5hYjNmMW4vY3djTFFlRnZleWFNcE55TkJn?= =?utf-8?B?NlhuckdXUTNKVXZEZlpVYjd3dVlRa1VCaWVCL09wcXBHbE9VUGlQK0oyTllx?= =?utf-8?B?d0hWKzFnVmZLdGt3bmJmZnE2ZDZBTGhGeE9JVExHVUtNZlJ6dlFOb0cyR0ky?= =?utf-8?B?SXVCanVYRlp6WklabWt2NW9Rb2Fib3FOSUVXMTBxdzdtR2xwMG53U3FGejVK?= =?utf-8?B?QUlkclNKMnF3NDdkSG53b3JjbHdIU3BaZzdxaW5qUVltVkh4SEU3S1NMNTJ3?= =?utf-8?B?RVBaSDhpM3hsUmxYYUVrMm1pTjlQOTFFY1R3Q0hyazAvRXFxazNrRlh0SWpk?= =?utf-8?Q?ivQrQQrQ+SpZXU/aFdPgCSivzBliHl1rSEv6tq1?= X-MS-Exchange-CrossTenant-Network-Message-Id: d2c13eca-ba92-47fd-4a55-08d948370475 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jul 2021 08:52:18.7610 (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: HKrvLVD6ewQkC3JEWHsbjZ5kcMu2g5UPqpuE1GwAZ6UeTSKKdvt/LPnDEH9yMwK+jJBO9KY9PohEMbRX1Bchew== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5079 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/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. 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.