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 1D40FA00C2; Tue, 8 Mar 2022 13:14:46 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 972C04068E; Tue, 8 Mar 2022 13:14:45 +0100 (CET) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2064.outbound.protection.outlook.com [40.107.236.64]) by mails.dpdk.org (Postfix) with ESMTP id CEA454068B for ; Tue, 8 Mar 2022 13:14:44 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DafZlDq0rS/6srZpE6qAB1FOhOlMcdllTxWqxuQJjU99stnLrefuXqd+6RC1hBpkO2eWzTNUnt9/2eS04QTJYJAn62miUwYtEedDPgNIb+YjEm5agrNtbiSw57w0Ym5uaLLRMJCNu7i4hyFepFggWTnbBu1iM+LHNHWXB0Bm9Scpg2yNgy3eXCh4Q0vxI3Nq/bVenYroqxKgQ7/zJjYXUBh7FGLWb/odAG5HIVnTwIzX1eqWGtODIdpZ7aFy9cFNo71qq0EzVtWRFO9Yzv3T0U901fYZS2/2DFAqzf4PoRNBerK6LKf72xIy7rZKgXNFc9RiyVaH/q3iWHEUHYHeRQ== 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=zXzlKBMf6VjoImmUA0I+CorNW4/O8Jthvq4gt1UycAw=; b=Dfw8pfCmFQUuIvKmbSNXprMmUJg0wgUYOFSy1HTudJjH9LxRX9msgr73lJ+nBIWzoJnGDEaEuKOlMvmah9nRMr93eKXCc4SE+9hyzIE2U0j85yb3k0KgY00pFwHNmJm1B7JDVRatCcC1WQuW7KLA183M7oUnpOM+vawyFTcj+bRHNUFckPWd7r/vdSKhKqwHViAY1i9N46jNSj1JkvG2UXaz3awxJ/UREdeKW7cAgeKWa7Bz2BCvSqTUv10XAhnOmlZXbj42XXwYEM/hjPAqCedWqIoiH/5+31THcSSLD371CAACpSFWR7Yo77+IA5IfHsOhA4ZLFCEO7+1l9VMGbg== 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=zXzlKBMf6VjoImmUA0I+CorNW4/O8Jthvq4gt1UycAw=; b=SCn8QqDBjpCRk/YENESO8Rlgf+lXerxufWrxXJ96xSPl7C+gnAYAlqqMNv9pfLLeXKvqumKGOq4mUAxgQw3RRV0iqh0Uj2JL97pUBTTZ1TVHcJPsrg+223AwwZvZfPRLbAwplIqjYxaSJo7rJcndAtaXMZrDrI89ZqyC8x0IIKCcghhqihZ0cwNStzDT+wJhgxgzn351GbFVzqQKPjPZXTMVgbTXY1trCzmJv22kxYJl4nU6I+jHtFcS7oUY25FtUTkjx3TzTAGzYC2wnnSssJDNbI5/09P17vK9gvSijPj3YbnxeOrBGOXrzNJs5dYawnzNrRrEeTOVlUkRc2ygvA== Received: from BYAPR12MB3078.namprd12.prod.outlook.com (2603:10b6:a03:a8::31) by CH2PR12MB5018.namprd12.prod.outlook.com (2603:10b6:610:6e::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5038.17; Tue, 8 Mar 2022 12:14:37 +0000 Received: from BYAPR12MB3078.namprd12.prod.outlook.com ([fe80::e045:deb6:35a2:49fd]) by BYAPR12MB3078.namprd12.prod.outlook.com ([fe80::e045:deb6:35a2:49fd%6]) with mapi id 15.20.5038.027; Tue, 8 Mar 2022 12:14:37 +0000 From: Raslan Darawsheh To: Thinh Tran , "dev@dpdk.org" CC: "drc@linux.vnet.ibm.com" Subject: RE: [PATCH] net/mlx5: set correct CPU socket ID for mlx5_rxq_ctrl Thread-Topic: [PATCH] net/mlx5: set correct CPU socket ID for mlx5_rxq_ctrl Thread-Index: AQHYMnYn2BAgfYJEBE+vWTrtU1Fd+qy1ZA0A Date: Tue, 8 Mar 2022 12:14:37 +0000 Message-ID: References: <20220307225256.172328-1-thinhtr@linux.vnet.ibm.com> In-Reply-To: <20220307225256.172328-1-thinhtr@linux.vnet.ibm.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-office365-filtering-correlation-id: f34d3f3e-df87-4bf9-be80-08da00fd3717 x-ms-traffictypediagnostic: CH2PR12MB5018:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: w+ei9Xp9Kr2nzffYyfHqUNWxGDt5cp/wpBLjCJqscrMRoqhzDIpug6wzVH7zv+sLN/yCxhEloRETs9GXamk3I39SdTdm2/65RCLNZMIpdsv7DF0wsQirveu6wt+TW5qyF1knVqJwTkHsQN3GRl14oYVU667nZ7NLVce8qu3zPIJKnSDP3ufW9GwatCilhI0ibnO77I/5/FU0XowuKDDKbBcSRrGCosLCqQQasn2zkI6v2ZTNNlNuJw/3AY/W1GXa7YGXHeZCzbcHb3gCAr7igBCe8EAEU0Z6A5NgzJaeVYsdEzz+E9f1lTuTsPUqK34AXbbNaHOLPa88urRKpq9uReG4ICvhRTJED5t9P91XHQXXRhYmmWC6yd+wS5DdAMUvPaBHjcJmGi9N81Ir3OJaQKOwNteAF+E7A124LHjFDim0fPGYSbVXzBg+h0hpM47fsFhlcluBbEHESmwksNFzm09RqbabMEeRWh2HcqzP6C9UVho2zRJOwGMHti5iEbEm4kPtxhHFeCIUmL3I1xehERxIY3p9gFQ1BliesCyO+VzLZb5gpWDomw/CAJzYIcXC5XEh+7ezyIu9PKB/ZLNxV+LaUjY5/KBW26sMJnl4fv5WFvXVGnHCp0qkBUslAGiuheDLHlqjlCDm5eiYrAvghMG7Asm0CvwNBxLihfkCGNEUTSPsIFAJDBZ/z9ck8uUzh7FDv0Ahjpqb2JmxtgYp7Q== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR12MB3078.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(86362001)(5660300002)(76116006)(26005)(316002)(66446008)(66556008)(66476007)(64756008)(66946007)(52536014)(122000001)(508600001)(186003)(71200400001)(38070700005)(55016003)(6506007)(83380400001)(4326008)(7696005)(9686003)(8676002)(2906002)(8936002)(38100700002)(110136005)(53546011)(33656002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?1qeIgCk+9qSq4zBJkNR6QPLcapQPbF0loDlh5tgLcQQLCtMiK2vfHfuthXZr?= =?us-ascii?Q?WzE6vMXvCa15ttsK8KTRJ0mVU4fL1WiCBpGfFTB6Zfn5txOLXmmv8yHf76qm?= =?us-ascii?Q?ynwmm4mH2wnmQ6zZ0BW/y/UbMJzQv3Ck7ilK8k+FDab0Caoxonyr8qhnyalV?= =?us-ascii?Q?VV1/Vw6zvQ6a/t0j7iBBgMTeOMpvLAC7aTnVpyS4n/xmpd/rYZ3+BPcvfke2?= =?us-ascii?Q?k5+2+x46NpdcHovrcDHPO56wwlGUnaqEuKJpbR6k0t/khIhwR7no9nxSvi1w?= =?us-ascii?Q?OHO3sFjayjP42PRTOxbRbwKPoULvKS0Aat7pxolEl5PCXla1nweFSRtArQYz?= =?us-ascii?Q?hTku2G/QPPrP9r12+FaBNrbvV/Yt0NZj3kXxnQKDcu/xX73TATTrR2SDEZH0?= =?us-ascii?Q?S2FU6y40HOHdNU+eTNCTRun6yD8ER5oylPwfmyqnvPsGz8Do++weQk2C7H4Z?= =?us-ascii?Q?SPPbR5k58G12RaNn+fRCLy7dqW4WPjgGlbX9hjVSusxcl/+7Spj+Cf572Aft?= =?us-ascii?Q?At8889JVllZ68qNJbkbocIpU3/XKlZsA1Mwa8zUa9FeMeK90mbrmZVVeMvWO?= =?us-ascii?Q?T1K4iAv/Fg4dnfX59AFHi54u50EGWkMODaGhrmMG/8CQlbukdacdRtccbKFn?= =?us-ascii?Q?zAdVaiqQMrAIWmQiyAbvp43INYyFOVIAqZvYUznVovkylzgIvn/J1a30YVnF?= =?us-ascii?Q?+1v526a+y0LAx5BxVgNghuNROJPp3K+zotZb/fhrYx/19TpczstxmPv6pmJF?= =?us-ascii?Q?sYEWNDOSgxl4GhIhMcNNC7ts06uxaU78RnO/NbgTNmSh49WgQv2MAYBMvGTn?= =?us-ascii?Q?zt7w+UNE0k55tnBE90OPTJdFnvCX6DTU0pG0VKy7raO1Ny7TCdS6L9O4NtQ0?= =?us-ascii?Q?Ruwkziy/AXibtlX7GSv45rMVd1om47ZLqrilXV+k23CmJg7BoxzHC5vgwE3H?= =?us-ascii?Q?CgTMdtqKr29q4Db81cOueMHcizBXkIK0SfRxaVw6aQ9+k7HjjI9YYAAZfnbQ?= =?us-ascii?Q?Absr58v3w5chP6413evX402gfmwW/deQi0YMSH5fuHM7+tRaVGLaTsmjBEZi?= =?us-ascii?Q?4+/6q2ktmutcnT/4qBxZ2CgxRomgzjT1s8W+QAV8njfMnbsvzK1Tscz21ht6?= =?us-ascii?Q?bhkKk640LSLzPXsf4wyAKj3NxV1nA/NeFl4oCk7XjRhL+5vcg8sH8G3H90cl?= =?us-ascii?Q?aFdcKQ5vbOMnAGMdLy6Ts/FBWaQ0fopaM5XpcCtxTwnYPGZJ19C4wNwpl9ho?= =?us-ascii?Q?PuzY89IyZpGVaXHFvLx8/BliA+IAeQJrjQuZczrKi8jR7sgIbJaZ35JPuvNi?= =?us-ascii?Q?O3hGa/GY+g7oBtFBG7kluWFNj0p9meMgmz6G/c1k+EQI8s4CevnAMYHcdKTv?= =?us-ascii?Q?1s4i1Aw/UeRtxK3bNDUlXMolHkR8dD60Gnd/fysYs4Cd/IP8vsWD/+jptrmn?= =?us-ascii?Q?O1BVdCDIPYEyG+6Hwmw49Mi1/2xLqHCrYJc8pCD0kiDOTR/RBkL3JypHgdr4?= =?us-ascii?Q?NYoz2diY4j5gAXTrx6c3FKYvwSRpVBSx2YjhoQ9p3SwDa20YBxUORA2xcYUE?= =?us-ascii?Q?UjOFP2+97OjHnPLjUE+VNNVM7eLs3Fh8jbf+7cRYz5gRgVls4sL7xngsl2YK?= =?us-ascii?Q?gnOE1Td8MaKGub5UsBi2Ltc=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: BYAPR12MB3078.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f34d3f3e-df87-4bf9-be80-08da00fd3717 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Mar 2022 12:14:37.6281 (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: 82DwLpjFnoF2oSTzcmNkI8lAj/xEr2D0rK9jMm5tIJcoY0+LVPrmUS7OgnnxY8FokbuApa7/xHWkAftTq9Xlwg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB5018 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 Thinh, > -----Original Message----- > From: Thinh Tran > Sent: Tuesday, March 8, 2022 12:53 AM > To: dev@dpdk.org > Cc: drc@linux.vnet.ibm.com; Thinh Tran > Subject: [PATCH] net/mlx5: set correct CPU socket ID for mlx5_rxq_ctrl >=20 This is a fix, so it's better to start commit title with a fix: Something like this maybe: "net/mlx5: fix CPU socket ID for mlx5_rxq_ctrl" > I hit a failure during ports drop queue RQ creation when my adapters > are on CPU socket ID 1 instead of socket ID 0: > .... > EAL: Probe PCI driver: mlx5_pci (15b3:1019) device: 0020:01:00.0 (socket = 1) > EAL: set_mempolicy failed: Invalid argument > mlx5_common: Failed to allocate memory for RQ. > mlx5_net: Port 0 drop queue RQ creation failed. > mlx5_net: Cannot create drop RX queue > mlx5_net: probe of PCI device 0020:01:00.0 aborted after encountering an > error: Success > EAL: Probe PCI driver: mlx5_pci (15b3:1019) device: 0020:01:00.1 (socket = 1) > EAL: set_mempolicy failed: Invalid argument > mlx5_common: Failed to allocate memory for RQ. > mlx5_net: Port 0 drop queue RQ creation failed. > mlx5_net: Cannot create drop RX queue > mlx5_net: probe of PCI device 0020:01:00.1 aborted after encountering an > error: Success > TELEMETRY: No legacy callbacks, legacy socket not created > testpmd: No probed ethernet devices > ... It's better to describe the issue rather than showing an example alone, Maybe something like this: The socket ID is used to determine the socket where to allocate memory for mlx5_rxq_ctrl, currently it's set to 0 by default which mistakenly leads to= =20 allocating the memory on socket 0 always. >=20 > The patch sets the correct CPU socket ID for the mlx5_rxq_ctrl before > calling the mlx5_rxq_create_devx_rq_resources() which eventually calls > mlx5_devx_rq_create() with correct CPU socket ID. > Result with this patch: This sets the correct CPU socket ID before memory allocation to use the cor= rect socket ID. > ...... > EAL: Probe PCI driver: mlx5_pci (15b3:1019) device: 0020:01:00.0 (socket = 1) > EAL: Probe PCI driver: mlx5_pci (15b3:1019) device: 0020:01:00.1 (socket = 1) > TELEMETRY: No legacy callbacks, legacy socket not created > Interactive-mode selected > ...... > Configuring Port 0 (socket 1) > Port 0: 0C:42:A1:ED:C1:20 > Configuring Port 1 (socket 1) > Port 1: 0C:42:A1:ED:C1:21 > Checking link statuses... > Done >=20 Missing: Fixes tag: Fixes: 5ceb3a02b000 ("net/mlx5: move Rx queue DevX resource") Cc: xuemingl@nvidia.com Missing Cc stable for backport.=20 Cc: stable@dpdk.org >=20 > Signed-off-by: Thinh Tran > Reviewed-by: David Christensen > --- Kindest regards, Raslan Darawsheh