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 C1BC543C50; Mon, 11 Mar 2024 07:01:15 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 44642402AE; Mon, 11 Mar 2024 07:01:15 +0100 (CET) Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam04on2063.outbound.protection.outlook.com [40.107.100.63]) by mails.dpdk.org (Postfix) with ESMTP id 19EB04029E for ; Mon, 11 Mar 2024 07:01:13 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I81qRM781lQy3vgXT1rj07hp5r4AZs9KFFwMdl1VAchFCpbZDUfQxBD0az7oGH42aQ7Jsy1/dIBR6cxgVM3Zwck+orqJKIKyrv9iSG9MV8hn7sxhjSaf0Dy8bm4F/SEsNytDjQQwCRn6MpOKJJovilglS1DpbEdL3/OciP5NHcLNcGyP6hxEUzEPv2yqFsLyR/s3/CoPnRoUHBTMSE/PUF8j7YPyjt86bMoZXOARU58BWeJ6cvpRp+6njsns06GUtK4boGp287xhZs+1RBwJLiEhgave+0KOXs9UQRx43ARjKxzumVaqmA76gvSpi36v/bQjqGiSc3Yb8yCdmXIGLQ== 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=fX7UZBg5znzXxVVyV/DWQYI9FBR6uzy2EhhorEzdlBE=; b=Ykrt/i/7vg8K+q2wljS1rwtXYv4npWbeJ3ZMQgNJE/xp0mLyU2gKGzJHDqIARhCWp6lNONosvGUPJi2urCsM3mTI/xm8rwRp9p/uAX7YAv0bYZ+5mP3oXA8LIgnCszTEu+76ZIKjJKxERjav12IT+HKlp+lyShtdxwScBl+6yRnsqnu3qr1xGPLmo/ru+Q4I0DpJr+M+ooE9mCvl57MMr/AaQr1ORgF9kcOnEsCOnHmRTGQtw553qbtvja7AAOdo8QU5Zifkv06wLiA4fvb7nleO0JKel/wf/JwsAmKiimTqBLcNuwn61c8PZdWLh3yOiJQSQzlPwhNTPr6m+3Txkw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=dpdk.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fX7UZBg5znzXxVVyV/DWQYI9FBR6uzy2EhhorEzdlBE=; b=WwOoxJULKa31JO2o75hIkNXrAGeOwu69Jdhw2wA8vpi6URa+iUNJxBZ0HM4D+IxYEDI2tNcrkiqqdEyx4L/iTaCGh9o/9RgNcLU+eUzZIko+Jb1x03Wif1/+xdSZ+AfYSpR75wI+oRDVnBH3/75JuZd4HQ2WWYS0lywJt3APYIk= Received: from SJ0PR03CA0237.namprd03.prod.outlook.com (2603:10b6:a03:39f::32) by DM6PR12MB4450.namprd12.prod.outlook.com (2603:10b6:5:28e::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.35; Mon, 11 Mar 2024 06:01:11 +0000 Received: from MWH0EPF000971E4.namprd02.prod.outlook.com (2603:10b6:a03:39f:cafe::8c) by SJ0PR03CA0237.outlook.office365.com (2603:10b6:a03:39f::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.35 via Frontend Transport; Mon, 11 Mar 2024 06:01:10 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by MWH0EPF000971E4.mail.protection.outlook.com (10.167.243.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7386.12 via Frontend Transport; Mon, 11 Mar 2024 06:01:10 +0000 Received: from BLR-5CG134626B.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Mon, 11 Mar 2024 01:01:07 -0500 From: Vipin Varghese To: , CC: , Subject: [PATCH v2] app/dma-perf: calrify incorrect NUMA config Date: Mon, 11 Mar 2024 11:30:53 +0530 Message-ID: <20240311060053.137-1-vipin.varghese@amd.com> X-Mailer: git-send-email 2.41.0.windows.3 In-Reply-To: <20240306150204.1375-1-vipin.varghese@amd.com> References: <20240306150204.1375-1-vipin.varghese@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000971E4:EE_|DM6PR12MB4450:EE_ X-MS-Office365-Filtering-Correlation-Id: a7f757b1-3fc3-44dd-0db5-08dc4190a674 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UIUTLu7SnXoBfaXq4GuS7kwyBG9VihkENWdAcQBr+llu9woJf7wR0hljJVl7YUeW+B0N7xOV4qiLap+PlnOOGqbNm0dzukFST2wMi7T7wt5J4p9ncMlP70GUumEo9mRhlNxeMJeJgnJWDlT0l7Ct+uMfrdcwM5SXwoYrS5tDxxZXpfResubzK9QehDmH9l8O7X47YrnR2ZCiAVjiur8fZUQX+fRXL80mijJIsSAJxrCaRPGL/VsYnwD7O/Zvav71if3roVvN0A/QRStdo6P7pgB5oxkFHvwB/QZHhB3ppLSDOhWLGVNcT63kXMA6Ce1+rnSAlPVJBl8p5p8yPTL1zXuTD4J28qrVw4Xekp9BLQO8g82QH8VRnWwJyGs87l7THhCBD0w4sUA/IKXO4HBI75g9HCrCYGOv3GBB7DNfVoeT/JcDFywaQqFLL7iXdfxCpVTAJ+ox1mDzh6EVuAFMyGvBF+C7tiBPMvGd1kxy/95ZOLtV2YYhXxc9TIBDUBZnKdc59DcrssFx4Uh4qrJednl7Lm3uSHK97G3lpFugaii73khmyWCXm8/5TRiep23TRFboYvkS2T71FNIEg6Ol/S9XTBDOYN+IqI+CQ96az/yDM7Jb8sObvnS1mhkNzDXEAHjPZJG3pY+XzIV00t4mhHMOnIIha1J9SSM/D4lDkOZnQk+yiMGf6EiXoIup8Z+NXSz3clg/eGeYsFMZVMtlr/chVtNA6hd65DKRfRndzD43VS+dwdJwTdwwBTYOCyt5 X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(376005)(36860700004)(1800799015)(82310400014); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Mar 2024 06:01:10.2081 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a7f757b1-3fc3-44dd-0db5-08dc4190a674 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: MWH0EPF000971E4.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4450 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 In case incorrect NUMA configuration, the current commit shares 1) either `source or destination numa is greater` 2) instead of `actual NUMA` it is `acture NUMA` Current changes helps to rectify the same by using `PRINT_ERR` instead of printf. Signed-off-by: Vipin Varghese Changes: - inform incorrect numa - fix spelling from acture to actual - use PRINT_ERR instead of printf --- --- app/test-dma-perf/benchmark.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/app/test-dma-perf/benchmark.c b/app/test-dma-perf/benchmark.c index 9b1f58c78c..b6d0dbe4c0 100644 --- a/app/test-dma-perf/benchmark.c +++ b/app/test-dma-perf/benchmark.c @@ -311,9 +311,14 @@ setup_memory_env(struct test_configure *cfg, struct rte_mbuf ***srcs, uint32_t nr_buf = cfg->nr_buf; nr_sockets = rte_socket_count(); - if (cfg->src_numa_node >= nr_sockets || - cfg->dst_numa_node >= nr_sockets) { - printf("Error: Source or destination numa exceeds the acture numa nodes.\n"); + + bool isSrcNumaIncorrect = (cfg->src_numa_node >= nr_sockets); + bool isDstNumaIncorrect = (cfg->dst_numa_node >= nr_sockets); + + if (isSrcNumaIncorrect || isDstNumaIncorrect) { + PRINT_ERR("Error: NUMA config exceeds the actual numa nodes for %s.\n", + (isSrcNumaIncorrect && isDstNumaIncorrect) ? "Source & Destination" : + (isSrcNumaIncorrect) ? "Source" : "Destination"); return -1; } -- 2.39.3