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 D92EDA034C for ; Wed, 8 Dec 2021 16:40:09 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C3A2A4118F; Wed, 8 Dec 2021 16:40:09 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2061.outbound.protection.outlook.com [40.107.94.61]) by mails.dpdk.org (Postfix) with ESMTP id 41D57406FF; Wed, 8 Dec 2021 16:40:07 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=b6Ogv9F6dl2aukn3cv5LUS+tELzFS7xGkS0W7AISbgG6tI5td8cGJzvaPq7huWCBZrvtPvEK38gZk+V5b8j9AowoDaBItxt4lfaM1USVw78GEPzEnBHVs8wKszgo2UW4xC6uyQYIOGZomaghFp2Ro2pJ/ZCF8QJ44MOTXH43qG6r70VfoREfB4Ajp1xR6X+Qxe+uFrIipvAWgJAx/dsGXdtyVK6NcyA3uuWboTieKfRckvOowf1n5ZTl2QWVecy63xak4/1QXGHkmfSpVgc/JkOzMYSwt1tSC37hi/WICwKlehyb0i3Q1oQmT8lMgh9Kn+HFtyN2edHGcfTyLUkX3w== 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=gspLnOTzpRYqEnXq2We+h3wztSFtz0YV9GkltpoHxvE=; b=IYnBnRmow/Eveauc+hNg5BDlECnJA1TvXBLGDeUA82wh4X96XkBx26PxsICE5WvpaD2BSynczgj8tElAGgg5niu+u25AlHy1yT5sibhXL7CLT0I7bPA6z2oPuqcHmpx1XaUVJ7WkyQkJaeSimtUwncin3iV74lcCRqpWM30uAgYsEGKX4z1376VeFDyTepEvtMZPDGAAtiCVpj4v35071lerYhzivYBmPjxiBaxa3QGNTbxpsM0cD1nzBqzI0hZBpoinOs1mN61J7IROo62aKB9VO9GlVBdDO1m07qjJQq1GFypnbPv3oNJuxWtPhGgeaoFaVsOK4wIvFjFPEd963w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gspLnOTzpRYqEnXq2We+h3wztSFtz0YV9GkltpoHxvE=; b=Y++ZMDSKL17qWP4bMd1rBy6eSHvm5e6v9h36kSOAU85ioYHlRjWRDJ1qiWfZr1sojXyW3E0Ui955vkIXzFpKBdvlk2CNYqeU+j9FvU9d+vnY8/DEKBsXR490oBbTUd/nBGH+ojX11aaVUw2tpHp75BopJZcVzu6hFzkp9gSiq1mcABLMR5Dl6/m9pkOFsyFY2BGb+F9B9JeqvrCOOvYL/WL4YQc2daLQqeooA5oN02g0MCxjtYKq6LuKFmsXwEUFjiRncI3whyzSFlOoIGUEEAn/yNVYhly6aVgMZamG5R8yI8W839iHOretUw/3H2pxkD8Ops1vb3mU3NOkmwefpQ== Received: from DM4PR12MB5389.namprd12.prod.outlook.com (2603:10b6:5:39a::7) by DM8PR12MB5447.namprd12.prod.outlook.com (2603:10b6:8:36::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.21; Wed, 8 Dec 2021 15:40:04 +0000 Received: from DM4PR12MB5389.namprd12.prod.outlook.com ([fe80::2171:cddf:7b43:3778]) by DM4PR12MB5389.namprd12.prod.outlook.com ([fe80::2171:cddf:7b43:3778%8]) with mapi id 15.20.4778.012; Wed, 8 Dec 2021 15:40:04 +0000 From: Matan Azrad To: Ferruh Yigit , Michael Baum , "dev@dpdk.org" , Luca Boccassi , Kevin Traynor , Christian Ehrhardt CC: Raslan Darawsheh , Slava Ovsiienko , "stable@dpdk.org" Subject: RE: [PATCH 3/3] net/mlx5: fix missing adjustment MPRQ stride devargs Thread-Topic: [PATCH 3/3] net/mlx5: fix missing adjustment MPRQ stride devargs Thread-Index: AQHX4JlXTIgftrOFNE6eJtFJ0qWfHawnHuGAgAGE+ICAABLxgIAAGOyg Date: Wed, 8 Dec 2021 15:40:04 +0000 Message-ID: References: <20211123183805.2905792-1-michaelba@nvidia.com> <20211123183805.2905792-4-michaelba@nvidia.com> <6493448f-e5a3-8834-3fea-cd1036aa097c@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 8685f2b5-70e4-4ef3-d69e-08d9ba61012a x-ms-traffictypediagnostic: DM8PR12MB5447: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: 2Rrc0Hv100MXVuYpiytDoz6L+cxdfdRgsMVaYRYBKtxQYHEHswlUUfDl77As1uSuiYfeR33ZsQlZAI09oIAp2HMIxpKoB/qtVPzunY+UA04kbIiFCk6qVgm+YoV4xwBRSVZKDiZKy4zcWrjPzFj1CJEKgmxQpskqALk+QId5+cRQUV0ITbic0HtwWDMvYvIa/5wYuCQJujvn0zAJphW633zKizZYyDW9E442KM4HrqvuX7b7DUy/sCGHN2nAAh6TeyM+mxTx/Vk9Ur9IEjumkaXPwmJ4uZh7Eb1O4ht5Meim9F6xLj4XV1Szkxf2oFpf67p3+umQ+AmAYDTxFvGzhw2+TjxXYH8GAHxIszHctlZE4isZGY6gsHvIsRP1jT1b+lrNynv0/sPbxjJRHauF4JGqrJcaPF1NlCqCvu4/psQuDd0/7Hn3LXYWmTgOgDnI0gOIAM6O9KNI968JcJxFalM1PJjkFoqF52k42gKnKx+I4+sydwiIAFgFgrxF5XkIvk3kD3aONh+If2wU0NZRn+1EJormDYZuTtT81UV9izgc0qDNwSg929gSv1TN1H0GU5eOGRurQEDwYAoJy5I1VQSySHNE35sUAE2V3wK6BvPIW6HxYVnFMGcUGxIwKbHyPnmc+Qzw0Cx2BFhZdO341E6IA2clvM/hdpqYhVNWugecjQhtYv8T3hxKe81nLwRdQ1FTS1Vx+lb0kTXR9Iy64t2UJPZqkb2W6yIrpEO/nlLRugUaxmNw3d7uZ97zewGzr1wXZhuxmRLO70SeTXMhXfJ0sdEAlw1ibKxqrurNbsk= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR12MB5389.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(122000001)(38100700002)(8676002)(86362001)(2906002)(38070700005)(55016003)(7696005)(8936002)(9686003)(6506007)(53546011)(5660300002)(66946007)(64756008)(66446008)(66556008)(66476007)(54906003)(110136005)(52536014)(83380400001)(71200400001)(4326008)(316002)(966005)(33656002)(26005)(508600001)(76116006)(186003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?nbYgMmqhGLSY8k/cmAURKDxclfadfr0oBCunTezmLSlvA3bKnjZ6+t7J9foE?= =?us-ascii?Q?9tPs0kpFNdYCL5DBigNcntHD8A+Wr7kj5XEe8+sfFQ2W/5Ttb3WfZIsj51H3?= =?us-ascii?Q?CtOy7W2GJ9Kzt/s1yXfpZUez4v96XWDm4yBzu7WuTmDOhBp2uaEQS6X1FiOW?= =?us-ascii?Q?0g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Ip3fBUZ9LoFqME0Fxa?= =?us-ascii?Q?33pd10VLu73aN+G9yUn2fnzCrRPQ6UpoSkYPUdk66et4rXuNHY3/I+YkIFth?= =?us-ascii?Q?gjm3eeJQeQumycBfB7HkckC3+buw4vck4jNxwxpYE3F+pEFKVD45cw4DCrUk?= =?us-ascii?Q?E+9i9y4ZjEkGW6HQUju9icoRMJi5IGq8IPEUTj7TgTBAbHDnzSCUuQm/n49z?= =?us-ascii?Q?Nt+FvIPJ91ufewKqVvRpZwrwrmfhZqncvr3kQb3KTuFA7dKSFOtYkJuoqqoZ?= =?us-ascii?Q?nsYZqFQJJySaH9JfziAvNbBjRWoAY6pPN0ekqoaKtUfFtWFI/5htrzG/Ua/O?= =?us-ascii?Q?xD7jlJf3/0F42QDrcMJxwTUBEVTlYWa887uYwvQaS4yWsT6c6w3q+9Zd4NJV?= =?us-ascii?Q?2J9OK7aKpNz8Dms6UKPGQGxTYjmQe886ywDNBL71iSbnCO0wAp4lE8zfkyeV?= =?us-ascii?Q?GDVqnkko6HF0VU52SkKqaADGsce5fZMDbbrbIJzyUh2WK7YAWoi8RB+C89FA?= =?us-ascii?Q?Zy8z+H1x+Rfk1Qe3F+moERVZDuRJX7IEp/rjjmhm2uNAq1EPaZMhTD07WkSF?= =?us-ascii?Q?vw=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM4PR12MB5389.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8685f2b5-70e4-4ef3-d69e-08d9ba61012a X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Dec 2021 15:40:04.2998 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: b2rQ5FytfAoHxmqJasfaTGTmVWhA3TeLUj2qeHJ80Yise7LHMf+sm3nn5idPVfW8gNvCwfBMzvVD9KHMOEggrQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM8PR12MB5447 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org 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) > > >=20 > It is documented that adjustments will be done if any specific argument i= s > not in the range of the device capability. >=20 > It is not clear what will happen if the calculated value from both variab= les are > not valid. The driver should adjust it to a legal value. > If it is not documented before, and previously it was returning error, no= w > 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 o= ld FW bug). Now, no error, no unexpected behavior - bug should be fixed for any FW vers= ion.=20 > 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. >=20 >=20 > >> > >> But I think it is wrong to backport the behavior change. > >> > >>> Signed-off-by: Michael Baum > >>> Acked-by: Matan Azrad > >>> --- > >