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 A9C10A0093; Fri, 10 Dec 2021 17:58:37 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2F5BC40041; Fri, 10 Dec 2021 17:58:37 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 66EBC4003C; Fri, 10 Dec 2021 17:58:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1639155515; x=1670691515; h=message-id:date:to:cc:references:from:subject: in-reply-to:content-transfer-encoding:mime-version; bh=1/WYH0DONXpKG3TPn75TWttzdlq8YwbdP8RSOxmjUnk=; b=hoxD8JQkuzh6nTJCgUMspzjyKtUXW3xYG8wRcqGQLKj3222KwzYuFdtn 217Ih2ix7ix5HtMO3QlOwOSmuXtSCC/vJ0pIO2YGO5xkLU6sp/sprSi2D rkphGISv6jwIcgG9+l4a0CFyM9fL6CC5rm6K0YPl/VBNw8puFMUpClVwX 0iNGujrcbECOVAbU0O+BOwZJXUdaAdEpBqGpwgGVRySdhYaEE8VQTjocI SfzJqgDNbDNWXG0jAJ3AWTCQkvaaK+Q426YDMvjqSAecYhjgo6TdLPPWv FwAY3rC6OLlRzCg+4kXwBrT0P3BYNn/spBwQFOKpOpvrfDRNyCWyl95aB Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10194"; a="324644986" X-IronPort-AV: E=Sophos;i="5.88,196,1635231600"; d="scan'208";a="324644986" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Dec 2021 08:58:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,196,1635231600"; d="scan'208";a="516839019" Received: from orsmsx604.amr.corp.intel.com ([10.22.229.17]) by orsmga008.jf.intel.com with ESMTP; 10 Dec 2021 08:58:24 -0800 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) 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.2308.20; Fri, 10 Dec 2021 08:58:24 -0800 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Fri, 10 Dec 2021 08:58:23 -0800 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) 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.2308.20 via Frontend Transport; Fri, 10 Dec 2021 08:58:23 -0800 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.103) 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.2308.20; Fri, 10 Dec 2021 08:58:23 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VgxjcMFZDEfIxjXeq9GWwUsTfWTi4Q8h6LzigsTK8HoMtRGM7ERskBddDgmcn8K3iS7GqVUQsRq2b4anNMxEwlkGNbs0DbiuvcoAbNwJyI+2CGP1mm/AVN5hrueKC2IFQFEVEi5Mk/1h0V6rX8W3DoY4TZQseUVw1pJX/iUd9WlmUBpUuzAGrWKKf5vzv9fVdSxHU+gTfvsp+81p6jttbdZLsXEnv53MFe+e96AIMtC0JegEg4uXYWd41UtApzYouoleipMl8ohF48Hr9BRJW4gAN1505vTVfyY1I5ikOiR2L576sFt4JrTp+/1FdsXkWJdxjLbfuPbwi2eKyAjd/Q== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=QRSUfOET1esYF8Na6UJ5ILO32eVOdZd/AzRtGeLbTX4=; b=Cc0On0/7E4s0Zu5bbFBo8QYDjgZCCbWH6fOrqgIGDL91znhVMDfVRi9QJnhiESDHp8TuRLe66C2X0zLsGAEcvDj88efUnLlkyJYSCAtG3d0VDlP5U2k+uksIT1hrd6CRFQgLHOcNiHxqxeLH56IgcsO30toJyvUeV/+l7wCS086hYA6uf3Bvuuy3r3nagpY4SpZZ2OJWQHHIqP1mh1y4DnwrdHT8wQkUrt2N7ATcc66a/Ei8vwitunBrSmZpFQmBG6qDTQ9LZTCbto6tAw+R6AIZfuciBrT2TtIQDVVLieALIv0QSemgCjXzI8+IgSKuO12x17yZ/Z9cg0n6tFht8g== 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=QRSUfOET1esYF8Na6UJ5ILO32eVOdZd/AzRtGeLbTX4=; b=ZpaH6KUF5x/YMc55OVLVSSWMjodO0XiHf9GYSsuAyYHx5yyECAXii+NRnN8HCQ6/lSA8D8swat5fd9h4I0azHw6CW/gF9/ZLvKxGlevA/kaYWTqfPijXVEIHeS0uDTBfFbBPsVAqJLzf/+NdJ1Bzh8EY7y/idHAjpwtEoNt4yp4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from SJ0PR11MB5005.namprd11.prod.outlook.com (2603:10b6:a03:2d3::21) by SJ0PR11MB5200.namprd11.prod.outlook.com (2603:10b6:a03:2df::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4778.15; Fri, 10 Dec 2021 16:58:22 +0000 Received: from SJ0PR11MB5005.namprd11.prod.outlook.com ([fe80::d10a:71ec:458d:2dfd]) by SJ0PR11MB5005.namprd11.prod.outlook.com ([fe80::d10a:71ec:458d:2dfd%8]) with mapi id 15.20.4755.026; Fri, 10 Dec 2021 16:58:22 +0000 Message-ID: <120eb55b-6e70-8791-d054-4fdefb4149fd@intel.com> Date: Fri, 10 Dec 2021 16:58:16 +0000 Content-Language: en-US To: Kevin Traynor , Matan Azrad , Michael Baum , "dev@dpdk.org" , "Luca Boccassi" , Christian Ehrhardt CC: Raslan Darawsheh , Slava Ovsiienko , "stable@dpdk.org" References: <20211123183805.2905792-1-michaelba@nvidia.com> <20211123183805.2905792-4-michaelba@nvidia.com> <6493448f-e5a3-8834-3fea-cd1036aa097c@intel.com> <807b31a4-c40c-0c23-7022-caee2c9b49e9@redhat.com> From: Ferruh Yigit Subject: Re: [PATCH 3/3] net/mlx5: fix missing adjustment MPRQ stride devargs X-User: ferruhy In-Reply-To: <807b31a4-c40c-0c23-7022-caee2c9b49e9@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: DU2PR04CA0250.eurprd04.prod.outlook.com (2603:10a6:10:28e::15) To SJ0PR11MB5005.namprd11.prod.outlook.com (2603:10b6:a03:2d3::21) MIME-Version: 1.0 Received: from [192.168.0.206] (37.228.236.146) by DU2PR04CA0250.eurprd04.prod.outlook.com (2603:10a6:10:28e::15) with Microsoft SMTP Server (version=TLS1_2, cipher=) via Frontend Transport; Fri, 10 Dec 2021 16:58:20 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b52de05b-7d0b-41be-f290-08d9bbfe4640 X-MS-TrafficTypeDiagnostic: SJ0PR11MB5200:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uXZo6hTtfKFQ+Juoh1yb2arXV9IZr5Fz4+wOTOQYSYGVWYjQdULL0N9ZrC0sjdcuYjPqN8woq+y62N1TM/0SSAM5BDt8/A6kFOEmLuJQs8BQQeET33bpw3EzOzHCBNBZip+Oy/AVQRQMipOJ/whibcs3sCykkSOfJpH6YBxYkVTAsKnjR8cYIvvchE5RT+Ko45aY/SuXbZPWXTcXeVgcZfZdCUsWtMWXe6DVEaZQ64mE5vNwwCJRrSOr1wH+2LUL7cH2CcE1WYFP2yvJvMDxaeCRhUKyUVJ7I+NbLVKM3SONvf2dcBfQJ5llkSwOR87RGwtjVcy1jxZxMbJj+GQd89f6Jx/DYm4KOueHyb8HvYjYi1xCK55unTNHLs5KwS1D9x5I97NDZUTLOAdsM3QhzFlzlyyAFLqv1dcSjTgcjTr0ka5XPlvUMk0p4MEzMfMthq3S2FlJUCulPr39q8byxjtaLFhZvm28XKPhU1aNS2BKTfu2iu5IQ8sNxQ8yWS5ypy2FueDzFAAi4z9hccGGyk2yHexkVPsDs82PCiTSczi0+8F8iBwd7j9Lb4gDRqIyyFlQmETjYIgRx8rlKAuHJ0KE/F1mLNj9S3o/VGD42S4xwmpVzTY7BRKX34TshTSkCdi6+6Tm4sJnJYNc/oLHUXq040OrsAgpmxkkm+LM5x7oUUzvbMO69KMeIMcb8J0+ExQWHHMUo1AWVyXH2A7toqHsnSKl5vrNMzEATwZ0fW2vu8EVJchj9rLymxQLa4SZTIvOd8eJtWTir/fWLZUL1Ela1rL5bBvzNAJjne0twdE= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR11MB5005.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(31696002)(53546011)(316002)(44832011)(8936002)(16576012)(2906002)(966005)(26005)(6486002)(31686004)(38100700002)(508600001)(82960400001)(6666004)(66556008)(2616005)(4326008)(956004)(110136005)(86362001)(83380400001)(36756003)(186003)(66476007)(5660300002)(66946007)(8676002)(54906003)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?YjlNaVlMc2JSd2NseTZjTjhFTHlUUndMYzhCZStYQmRLMEFsL0lvcTFvVVFN?= =?utf-8?B?ZS8zRytrRjlNa2FuTHpzT29uVnAvRXg0MzVxa01oYkZtbmMydEY1bDQzRHJ5?= =?utf-8?B?REtuSndoeTNwS0U3YWhoTXdSM1hraVhVRVFDMGJrb2ZlNmhXb2MxSVNYOWV3?= =?utf-8?B?N3B3bGtBU2U3MmEzTDUwQmZwTDNwZStPMmdBaWhObkJudVBPajVPQzc5d05j?= =?utf-8?B?TVVDamxhOVJHL1dvL25QVUhpRUFnb2hWVVgxTFhlbEIwRVh5d0RDc1ZHcDhG?= =?utf-8?B?c1Y4eFJPRzI2MXdXT2d2TXhMTkdvS2FFZ2dpRWRCUjYvUThPQWM0UVlDUURI?= =?utf-8?B?NUMwcHhOdWpabkJIa3ZwYWQ5N2NqR29yOTJGb05CeWJhMkZEOGRQU29YdHVl?= =?utf-8?B?RUdvbHg0elUwNkpnVDVTazQwSHdrVTZReExUd1MvNVR2cVYwTy9QQkVmSHZy?= =?utf-8?B?T0g2Q3lNZFFmRHh3TDl6dXh6VkxwRE9lOFFLWkl0a2QwVjVTcUhhNGNwTUxo?= =?utf-8?B?N3NXYjFpRnBXMVl1Rlp6bk9uL2pnMk5YNW9qYkhaaXA2eTI1UXh4cHk5ZHpk?= =?utf-8?B?dEtBU1ZhZkU3UUtpK3U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?My9STE5xZi9xVEJpWXFDNlVGNHZtNTJ2aFB2aWFzV3BKSXpFMEM4LzcwNUdZ?= =?utf-8?B?dnp5VnlQOS8zOEVSVlo1QUtwZHp3aS9ySkwzb29tKzNnUTRzVkxZaDNFT0FI?= =?utf-8?B?S2NrcWNBNVhwdS9wZ2FqQ0kzbUU0ZE1XY05GelZzbHlvcEhUMWdnWjlQWXZ5?= =?utf-8?B?U2Yya2gvUldlRkgyVi9NU3poQkY5cml3TURXVHVIbVdOMVZVVGhJbkp6cURZ?= =?utf-8?B?SkFwN0s2TXQ5Tkd6cVc0czFaRXdMVlFxVnBERkt0amlDMzE1SFZMWmZXdDVG?= =?utf-8?B?eTVQb1BEOEttRVBIc2d6ck1VSjF5QmpoeUdLTGtRQU85TjVaSTg0UGREdXlv?= =?utf-8?B?Mm5NVDF5bzE2MkJDREhHcHNRQzBwdHlsQjI0SkdTY09sdG56cUNBQ0dweHFE?= =?utf-8?B?Q0ppdTFnZ3ZMSU5tY3lKbHdjdGVaYmIzcGE2bmI3cUxrQS9zS1ZSeGpmdjZa?= =?utf-8?B?K0MrRjVEOFRMbHRoSjhHL0g3OVp6cDRSY1R2Zy9XUklqTk01UEdMM0c1REow?= =?utf-8?B?VHYxQzRoeU5DRERUcXZnNFZsdm5tSTdRd0ViVjMyNmhldEZuSlc0bFZXSDEx?= =?utf-8?B?SXhBRE1NVG01cWNlSW5RZ3pEK3hxdXlXY1pHMnBwMnloV21nQTZwakJNYmt6?= =?utf-8?Q?5mjAbdFqRWRlgAho8WFrucw=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: b52de05b-7d0b-41be-f290-08d9bbfe4640 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR11MB5005.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Dec 2021 16:58:22.7680 (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: SSku3l77JwOmCFjIux4OwrgcPfqzfdfbzN+ycxAYLuKBLGI8Gccq/hihJ5fPbW0D0pHXUVad+ztPybkZ+RFRMA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR11MB5200 X-OriginatorOrg: intel.com 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 On 12/9/2021 12:33 PM, Kevin Traynor wrote: > On 08/12/2021 15:40, Matan Azrad wrote: >> Hi Ferruh >> >> Thanks for the review. >> >> Please see inside some clarifications. >> >> From: Ferruh Yigit >>> On 12/8/2021 12:52 PM, Michael Baum wrote: >>>> >>>> On 12/07/2021 3:41 PM, ferruh.yigit@intel.com wrote: >>>>> >>>>> On 11/23/2021 6:38 PM, michaelba@nvidia.com wrote: >>>>>> From: Michael Baum >>>>>> >>>>>> In Multy-Packet RQ creation, the user can choose the number of >>>>>> strides >>>>> >>>>> Multi-Packet ? >>>> >>>> Yes, you're right. It should have been Multi-Packet, thank you for that. >>>> >>>>> >>>>>> and their size in bytes. The user updates it using specific devargs >>>>>> for both of these parameters. >>>>>> The above two parameters determine the size of the WQE which is >>>>>> actually their product of multiplication. >>>>>> >>>>>> If the user selects values that are not in the supported range, the >>>>>> PMD changes them to default values. However, apart from the range >>>>>> limitations for each parameter individually there is also a minimum >>>>>> value on their multiplication. When the user selects values that >>>>>> their multiplication are lower than minimum value, no adjustment is >>>>>> made and the creation of the WQE fails. >>>>>>> This patch adds an adjustment in these cases as well. When the user >>>>>> selects values whose multiplication is lower than the minimum, they >>>>>> are replaced with the default values. >>>>>> >>>>>> Fixes: ecb160456aed ("net/mlx5: add device parameter for MPRQ stride >>>>>> size") Cc:stable@dpdk.org >>>>>> >>>>> >>>>> Again, not sure if we can backport this patch, this looks a behavior >>>>> change more than a fix. >>>>> >>>>> Previously if the user provided values ends up being invalid, PMD >>>>> seems returning error. >>>>> With this patch, instead of returning error PMD prefers to use >>>>> default values and doesn't return error. >>>> >>>> It isn't behavior change. >>>> It existed before, except that it is concentrated into one function. >>>> >>>>> >>>>> I am not sure if it is correct thing to ignore (adjust) user provided >>>>> values, but that can be up to the PMD as long as the behavior is >>> documented. >>>> >>>> Adjustment is the likely thing to do because the range depends on the >>> device and the user does not necessarily know it. >>>> This behavior is documented here >>>> https://doc.dpdk.org/guides/nics/mlx5.html#run-time-configuration >>>> (Run-time configuration -> Driver options -> mprq_log_stride_num/size) >>>> >>> >>> It is documented that adjustments will be done if any specific argument is >>> not in the range of the device capability. >>> >>> It is not clear what will happen if the calculated value from both variables are >>> not valid. >> >> The driver should adjust it to a legal value. >> >>> If it is not documented before, and previously it was returning error, now >>> adjusting values to make it work looks like behavior change to me. >> >> The driver should not return an error - the driver should adjust to a legal value in case of illegal values by the user. >> It is documented in the devargs description. >> >> Not behavior change but a bug fix; previously, the adjustment may return an error(which is a bug) or cause unexpected behavior in the HW(which is an old FW bug). >> Now, no error, no unexpected behavior - bug should be fixed for any FW version. >> > > I can understand both arguments. It is a behaviour change as the user will see a different behaviour for a given set of values. > > However, each parameter is already validated and defaults are provided as backup. The combination not being checked could be seen a piece of missed validation for those values and a bug. In this case, given it is unlikely any user would be happy with the WQE creation failure, i think it is ok to backport the missing validation/adjustment. > >>> This is more of a process question, than technical detail in the driver, so >>> @Luca, @Kevin, @Christian, can you please comment? I will follow your >>> suggestion. >>> > > Thanks for raising it Ferruh. > Proceeding with patch then, updated fixes tag for 2/3 in next-net.