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 0A4C0A00C4; Wed, 8 Dec 2021 15:01:43 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A5A1B410E8; Wed, 8 Dec 2021 15:01:41 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 5F18F406FF; Wed, 8 Dec 2021 15:01:39 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10191"; a="261910914" X-IronPort-AV: E=Sophos;i="5.88,189,1635231600"; d="scan'208";a="261910914" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Dec 2021 06:01:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,189,1635231600"; d="scan'208";a="543207621" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by orsmga001.jf.intel.com with ESMTP; 08 Dec 2021 06:01:04 -0800 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Wed, 8 Dec 2021 06:00:59 -0800 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx609.amr.corp.intel.com (10.18.126.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Wed, 8 Dec 2021 06:00:59 -0800 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (104.47.73.46) 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.2308.20; Wed, 8 Dec 2021 06:00:59 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AcgmMtyAN1IHssp6v72Zaxd5sZgjveE5jeNVluPiXy4uvRbiXzdHB7c9j2i0Z3ldpKJFrL7adQpnrje/gdYp7sjhhwD0Cb4Jtq1wB/uMiE3GBWk7DVrfNg6+3WRURpp+LG2FQ97Uul4671yalD431EjCykm1PLlw6dz0SId2qc+KxWjMdXYCDbtNv8Ct6T0Y290ydvg8S8AFrX7gdOE2aRr0YHqLXNnmtuiLhyH5XibgLjEEm/uM9406frZg1FTD6o79O54v9VZYhdfr33HvJE3LaVIvhI/1HZ+HNxSbAv8ymXkx3xi/BFU7IvhEdmXf4E5TOPpNnhVtkI9VNbOi0A== 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=t9GSCGjWjlOFRnf5dRLIxaLBdd9dp2BEGgvOHNMz+Ng=; b=IOI1fT2bAMY8fuUMWvMfjYfyv0sZ1I55EObLhwmzkKXHne9MgULffDcCSnwEvPj0SmCdIXM0qwbJCNsnF/1yF6AuIUCEM2Oh+IPFEjpSIBegCoWOSfD7sNA3EFv0XXAsoX201E7OINTXzUMew2hEKOIZYA2ecGClVpeOdQczbjClQLhxDnUkI3WUg77zybWZkjoKYubP66nnmlJJlQBgalfpXxhJyxJ6sHlgEjzUeKoPWhucIpkqhipUO18GE4XPcpkaQNeyb2vV724edzN6ho3Z6xKuTG/bOwN4f80Ifh9vCMUQMwh8IrMY0G+vajfjAlgWjZUbwHmHEn9S8nkAQQ== 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=t9GSCGjWjlOFRnf5dRLIxaLBdd9dp2BEGgvOHNMz+Ng=; b=BsoUyy3lfTcduB7T3P3/XnufxcrzBYNgwOUkOpt4SAtvzaIXDQylFfyBBYnokr2+AcjkHiSrfyDASIMNHdgxRADkqEWEbaXISvzJagxoj3dm2ohl/LoMNuykmNbP7WFTSVJKITNJ7icdjd6EZQjvN/zZH4eQ039GP0yEJmtYLtA= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by PH0PR11MB5080.namprd11.prod.outlook.com (2603:10b6:510:3f::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.22; Wed, 8 Dec 2021 14:00:51 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bc5f:31a7:10ad:443c]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bc5f:31a7:10ad:443c%5]) with mapi id 15.20.4778.013; Wed, 8 Dec 2021 14:00:51 +0000 Message-ID: Date: Wed, 8 Dec 2021 14:00:45 +0000 Content-Language: en-US To: Michael Baum , "dev@dpdk.org" , "Luca Boccassi" , Kevin Traynor , "Christian Ehrhardt" CC: Matan Azrad , 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> From: Ferruh Yigit Subject: Re: [PATCH 3/3] net/mlx5: fix missing adjustment MPRQ stride devargs X-User: ferruhy In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P265CA0004.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2ad::13) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 76686c12-8eef-4748-dfa2-08d9ba5324f2 X-MS-TrafficTypeDiagnostic: PH0PR11MB5080: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: jm2uiTwRjbe8aqL7UIBVYygUgjoPv3hJJCkqhXOIkBBPaujSkLta7nBGMMb5HQklJX84SP0+bYrO/APV2Ri0Lin8r68fSTzdEfBtYLUCMVfvn/FvYqrdJCxms2hfp5u/nnf5co2FbRrpbDODBV14rsUcEIc+zfJ862/BRr+/mvoZFz8gmGGZSDQqzldxi94sgtAYkJx42YcRNdfq8e11HA+BzWTYER/WrygeQ2tg7b39mLiB7SumNyqhFyz8HCusxt+M3U159kjPkPhL6bXcXwK+Is48ooYL87j67xeXpyikCCnYpBpDUS9eiasYXt9kWIsmOods6GxMeh7fF61n9wyU4mMHReI5KN411xw3SXLSN+OxylSQFLKEkfoasORwRmGmuf8XsZe5LSQuDxuE77naIirFJKUTvegnKcUv2t4QKZ4SlsYQZHgW9u1fFo8CZZDop/PTCOYFYRJ0pWR7VGpRjFKdjUBbGyW2QTQOhGdD2RUgtB6YVZ1vm2nKtXCD8gWOmPZsMqWM7Bz5pnhct0VBlfVdvnS48NLJX6g3ol9C9RJ8VWCSLIdA7LUyOkXIMSfkOKSWqr7En+EyFHV4HZ9Qebdm6PJx0SjHXLO0sOVElsDu24F/en5oT8sFb9UHN0TsZ66n7aMHE/6pYf4T4xFmwfIX6Enz52bYgGDZZMFjSbg4svsgsfJR5YktbBrzo4psun+5llzBpAIJohNWb6ZDL+ZLBbV5s0cU94ozhARGNmn+QtoO1PMkFhVYhMcbXyJbkYHXeuv+ZVfOIkqiqZASWuiJGkytGaqaqY126iU= 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:(366004)(82960400001)(6666004)(26005)(2906002)(6506007)(2616005)(38100700002)(54906003)(36756003)(83380400001)(110136005)(186003)(66476007)(53546011)(4326008)(66946007)(8676002)(66556008)(86362001)(5660300002)(316002)(508600001)(6486002)(966005)(31686004)(44832011)(6512007)(31696002)(8936002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?M3k5OEFFS2RMU3o4RzVOa1N1YXR0VW5hTmdsRFhleTdSQUplR1NHYTVPckR6?= =?utf-8?B?aEdwZEhzbVJ5TlYxZERjYlhVQis3b3VXdy95N2p1R09EMFJSVlFtd29Gd0VI?= =?utf-8?B?T0lLcGZibStBYkcwcnVMYjhKK2xaOTBhTVBFSERQY3JsOWkvVStKRjYxQXVt?= =?utf-8?B?Wmw0SktqcDVxbXMrUlNFNXVXZmNtV3ZVSUd2MGpEMDRSMkprUkpOdWxXQVU5?= =?utf-8?B?cTRheDBaTTFORXg3dkNSaHFvaXZuUmtiTzJYSGxyTnF1RVlLbzNQNE5VSWNi?= =?utf-8?B?ZVU1ZVo5QzdCUkZCdXJ5U0Q1LzlSKzg3SHBkdVNxSkNjdG55VXMzZ3FBWHJS?= =?utf-8?B?ODI0RU9KdlIvVzkxdU5RZXJEMkZacnJVRmpxT09heENQblJkZFBXUk1Uc1ZZ?= =?utf-8?B?eDI0SGkvWkNrK2wvU0lHS0xocGxaWWFzYU5oaUJGVUxvUGs1Wmxmb1BSL0Zt?= =?utf-8?B?RXJxdmlZRmQxOHJGc282Mlh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hHOUFzNHFkNEp0dlVtenhjUW1MaFI4Wnc0L3NH?= =?utf-8?B?U0ZHNFBBMStpSjc4ZVZXZ2ZMa3BaMnE4aVlpVmhCQnpERHpSVmxRZS9nN05G?= =?utf-8?B?MUtrV1RCdzNjWVpNV2xYOFpqSjJwa0RZQ0pwdWpkTjVyV1daZVJMZkV5WUMz?= =?utf-8?B?OEpzVlFlcTBZZnFKckZPN2tHdk01MGwyZmVBRFJvTUJUSXFEaVk5bmU3c2R3?= =?utf-8?B?SVRDeFhIVHo2VnJsMkp6Y1hFcGlOSFJIdisxWkpQcmtTclcvdlB5Zm4xL3B6?= =?utf-8?B?b3NPSEplaTFnQyt0V25MR1NoWXBDc0pEN09rZXZFdXBHdXlYU2RIb25CL1hq?= =?utf-8?B?anE3cC9PMm1ZdTZWaFNWcXFvNUs5RFplYjFEbEd1VC9neW55MkM0UFZURXk5?= =?utf-8?B?WmJGZ1JPcHJ0L21Mam81OENFVFgvMFpvWXI4TlhIUzJxdUU4am0vbUZraGs1?= =?utf-8?B?cC9vZHg1dXJhOEt2cytoZVpnc3laTDF1QWEvY1NnNVllcUxqSTc5ejQ0cjJn?= =?utf-8?B?UnZQalBkc2E5UjMrUXR6S04zODVsZCt5SXV4RGs3dThBMHpQWmdtOUdLSkVQ?= =?utf-8?B?ZnpaeC9rN0tlVERPemFGYXczYmVYT085RUxPcWdlczloSUFkalJtMnRPRGMy?= =?utf-8?B?MmJXN0dPK2R2MlBvMHM1eDRPamtPQzgrS21NSnFHVU9tdW9WcG4yY0M3V1hX?= =?utf-8?B?eXE2OEhUZHVCa2lJc1RuQjdybUlkQXgrWjhqZGFEa1NpdnRJRzhKZENTdWVY?= =?utf-8?Q?uWV59bMy/lNyvq3SJsriEYE=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 76686c12-8eef-4748-dfa2-08d9ba5324f2 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Dec 2021 14:00:51.7670 (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: ZJCN3k/9YdU/fn/Zx4ywTZZKaJUxXKk6C7hh/hPZQRw4/qtaWsOEyOMfk7oRuGD8bZyZ+5cEWa9K5Z1cBBAJrg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5080 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/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. 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. 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. >> >> But I think it is wrong to backport the behavior change. >> >>> Signed-off-by: Michael Baum >>> Acked-by: Matan Azrad >>> --- >