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 DC4EE454D0; Sun, 23 Jun 2024 13:34:24 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C4356402A8; Sun, 23 Jun 2024 13:34:24 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2051.outbound.protection.outlook.com [40.107.236.51]) by mails.dpdk.org (Postfix) with ESMTP id 9A7754026B for ; Sun, 23 Jun 2024 13:34:23 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bO14ky/5poaztPD7ws3ZHNB5kOAWWA8PqnrfKX92TDCrC1fyAxYliQL0a4xNS01sST8fFuGhl8lzPnLMWJt0tiGWQxHg1roE8PFCzLPizUMp3VE+3xyyROLfSN4aO0Qn+LNRoAprM9PeEcQ9TrfYMer6P+pViTpHw9bO6O0picv3kCxElp1W4aOIzFiPdHU1mmcI5KqCZgkDXYrFBPnreOyLfYT+QpZDZCq09yX944k2/TrRUSq+trtUq5R73tb4X/duy3iVAxRmSVpj6PsPGR/haJmU7DIX8FbbMR2gWx44/TWusIczQC2vpV1JgmUodASI5IeqyIgktKqauJEO1g== 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=/sX88yYpa2hbvpVYiAdKOuj8CFv6aKUIVQGGLys3vxI=; b=by9xXyh1pa+wIpl5XEpJj1pVJEmMhrkS7Ir0qndCj/WEOvEhBrFkcsTAN3UEpKKJtte5WeJ82fJnbDJ2ALK7ssWbYVx/D19DsiijMRCSEoIMflxJAU7lJ/wXpQeoMlE1UAug2cppUchpEyhtY11zx5zxCCHOejYPBUpUOmXG5Ng0byBlLV2UUWA10+hGIYFU60nH+i2PpiuArElQjp7+Hl9WWv58GFeqL4LfRq5Q+yhpnO5IJHberctCwOQuVYFB1kEknM7+ckcHnbDO5Ae0Ltwpf1VPhnD7oW23qEGXjChjreaVKfhMxXtP50Dy4SHVB4HumHhgrQDslCaSvko/og== 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=/sX88yYpa2hbvpVYiAdKOuj8CFv6aKUIVQGGLys3vxI=; b=GEj8vV7PcVjg3A2n8Th451kFW/OQK2sTz93Mg3rFOYx+CSLPFYM+SXOjLPt7AsOYHIlwi6aAeip2+vRP9RYi/NvXRCSTHPIuenws8H5S//4BBHZcllSRsLQRI4sUaGxMDcq5WNP8COUE1RXAqSX3BrOD/+HV1YPKhi+9cK16BKOIGAC60dH7onXYnw+Siz/EBuV61CdYpQhJBk7ZtUCZbTOkANDtRsNVTFe1dyNJRgL0FgbXPArynouG5ut7UjIhqqewAJn8DioR7Gob3DJFWZur+2iSGqkmCPLorfICfKIxSBWek8VTmo+QZrFOel+r/GYO2pG8/HxOfqUWGn3cXQ== Received: from IA1PR12MB8078.namprd12.prod.outlook.com (2603:10b6:208:3f1::14) by DS7PR12MB8369.namprd12.prod.outlook.com (2603:10b6:8:eb::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7698.28; Sun, 23 Jun 2024 11:34:18 +0000 Received: from IA1PR12MB8078.namprd12.prod.outlook.com ([fe80::5c5e:d74a:1fd5:8d12]) by IA1PR12MB8078.namprd12.prod.outlook.com ([fe80::5c5e:d74a:1fd5:8d12%3]) with mapi id 15.20.7698.024; Sun, 23 Jun 2024 11:34:17 +0000 From: Slava Ovsiienko To: Igor Gutorov CC: "dev@dpdk.org" , Dariusz Sosnowski , Matan Azrad , Ori Kam , Suanming Mou Subject: RE: [PATCH v2 0/1] net/mlx5: fix incorrect rx/tx descriptor limitations in rte_eth_dev_info Thread-Topic: [PATCH v2 0/1] net/mlx5: fix incorrect rx/tx descriptor limitations in rte_eth_dev_info Thread-Index: AQHawdMDpwU1MTiA2UG8jRWoKaN51rHVORxQ Date: Sun, 23 Jun 2024 11:34:17 +0000 Message-ID: References: <20240618225642.1036624-1-igootorov@gmail.com> In-Reply-To: <20240618225642.1036624-1-igootorov@gmail.com> 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-traffictypediagnostic: IA1PR12MB8078:EE_|DS7PR12MB8369:EE_ x-ms-office365-filtering-correlation-id: 9cf18a4b-62c4-4af3-685b-08dc93786ae0 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230037|366013|376011|1800799021|38070700015; x-microsoft-antispam-message-info: =?us-ascii?Q?v0gIfhehccwFsQfjCgKQxWwfLrg6HMwPKE7AEsGNx2E435vAmuiG5IOEusLP?= =?us-ascii?Q?CY0EhgELnZaQDVMv+AB+SXASrb01GWy9pizeNhyBZ0vMRh1QZO6HTHc2fCHM?= =?us-ascii?Q?pnhgvtXFBxFfRaDqrGh+zZq9ytbZ9OPinfOO0EzmIP8apB37jr1K7WOUyNw6?= =?us-ascii?Q?YdbrboRATEetsAYofS0/0cjG2bsJiSpe2rNy6EllVL16HBV2gaykZ41kACy4?= =?us-ascii?Q?gvME8Qzj2xEUicxWjNjUmnMVv/iR3EtjLq4VvDmJQ5rAjEggZN6vU/X4wI7V?= =?us-ascii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dKxvRodfq8adf?= =?us-ascii?Q?c1D47/QjWAc7iD0nP7K/BUzdsn/wTr8BF1Lr+8rbixoCLSpF/m0R5nHkA46E?= =?us-ascii?Q?NYiGdZj95GBuTAF5F8TyPWkUhHyHZO5GxjAivvvwSDoimzF9FJKVR3PrcDfi?= =?us-ascii?Q?wZOXW5Qy13pq8LkmUQOFbKQn8vCRFEgqB+SOX+H9g0rapk9FVnUo5s6xIdY+?= =?us-ascii?Q?3MU8O7w=3D?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:IA1PR12MB8078.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230037)(366013)(376011)(1800799021)(38070700015); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?998EXfEblWWaDl1ED6PYLzX8fU3pOtGt6HAKB7Ua666+xEQAoBJOjKbmdSgt?= =?us-ascii?Q?HxtmcQr5AuLDUwGptYiGH2Ppqw7FrxKy8AAwO/Grc4LWsSR3FMzImohda5Hz?= =?us-ascii?Q?Q/npMtBpfKYyYVGr9ULTWJAVCqxEb3ib2FHp7IjRfBL/HNt04HiGWrIzH1G9?= =?us-ascii?Q?zMwoqPjzZMUjHcEjHvI6PZ1pwaC5soxY3pW6nCmNIILImZf1RHye99IPsNk6?= =?us-ascii?Q?4eCx/VtMPAeHPLOu7sqH8vvr9nGIevBEUUK3Lu7/mp3E0i+tP3dYBxhtx36u?= =?us-ascii?Q?P2N6LQIP/DSNXLD5ImLNkZ6gfoeo7e4J1i9Vuvlzzt8T4jFGywk0cGbCDn81?= =?us-ascii?Q?kO/AWU8TuAVbcxUY680QuWFi0VG+nyXRzj4jO80qk2p0vKU5w21CctI9YGeC?= =?us-ascii?Q?7IZTodt0yUvHFLEaOQMNelbgYqpawKxyQJs2Gq6Cwge+2tImD99ozamkuEOq?= =?us-ascii?Q?q1UxPiH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=?us-ascii?Q?IO6jAawl9rvHtvXVTD1H/dlcHTU7GZq0s9uuNA3t/E5sGvc/ILUbZ4704FOv?= =?us-ascii?Q?hx0tLZl838GhryVLc2j3meDhXVTZmwV7mvjjQKPdBhUfZuAypEPXj1eQAXws?= =?us-ascii?Q?Vf2B88IsnzbsgrqqQW0q9h1N9xelXyjhK4lr9K6TQIroGCGVLRnkbTnycF8I?= =?us-ascii?Q?c2Hyg84u5XwPskCm3jt4JIC+loFXdfpC5T8ZkECT?= 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: IA1PR12MB8078.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9cf18a4b-62c4-4af3-685b-08dc93786ae0 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Jun 2024 11:34:17.7692 (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: ZViCBTxHTOrV4G42PHdIb3cQEJc74+g6OQqiX/4eGdckMIjkQa2pZaR0A7LPjLl6f28V1th1qKIinPh0pa5Scg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB8369 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 Hi, Igor Thank you for the v2. The patch looks good to me, please see my further co= mments below. > > 1. The absolute max descriptor number supported by ConnectX hardware is > 32768. > > 2. The actual max descriptor number supported by the port (and its rela= ted > representors) > > reported in log_max_wq_sz in HCA.caps. This value should be querie= d and > save in mlx5_devx_cmd_query_hca_attr() routine. > > 3. mlx5_rx_queue_pre_setup() should check requested descriptor number > > and reject if it exceeds log_max_wq_sz >=20 > Thank you for the guidelines! I've also added the same check to > mlx5_tx_queue_pre_setup(), I'm assuming log_max_wq_sz can be used for > both RX and TX. >=20 > Is an `int` appropriate for `log_max_wq_sz`? Seems like a `uint8_t` is su= fficient, > but I've left it an `int` for consistency with the other `log_max_*` valu= es. Right, uint8_t looks to be enough. No objection to optimize others to uint8= _t. > Also, I've noticed a similar issue with MTU, it is also reported as 65535= in > `rte_eth_dev_info.max_mtu`. I'd like to send a separate patch to fix that= too. > What's the procedure for reading max supported MTU? MTU is not reported directly by HCA. It is per port settings and can be rea= d from PMTU - Port MTU Register. ACCESS_REGISTER command should be used. Please, see: https://network.nvidia.com/files/doc-2020/ethernet-adapters-programming-ma= nual.pdf And thorough testing of accessing this register is needed - over physical = port, over the representors, over the VFs and SFs. Rollback to 0xFFFF should be i= mplemented, if register can't be accessed. Also, this reported max MTU might be not supported for SFs/VFs, where MTU i= s defined by hypervisor settings. >=20 > > 4. Please, format your patch according to the "fix" template. >=20 > I've reworded the commit message a little bit. But I don't see these issu= es on > Bugzilla, I've stumbled upon them independently. If you'd like the bug re= ports to > be created, let me know. I meant this: https://doc.dpdk.org/guides/contributing/patches.html Please see chapter "8.7. Commit Messages: Body" about "Fixes" and "Cc: stab= le@dpdk.org". Also, please run checking script: /devtools/check-git-log.sh' -1 to verify = commit message compliance. With best regards, Slava