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 40ADD41C76; Sun, 12 Feb 2023 09:54:02 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CC7CA40E09; Sun, 12 Feb 2023 09:54:01 +0100 (CET) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2040.outbound.protection.outlook.com [40.107.236.40]) by mails.dpdk.org (Postfix) with ESMTP id C88BB400D7 for ; Sun, 12 Feb 2023 09:54:00 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fDAxc9KJTCLv2aj4q3nTiBXV6IH/Goh/ODEvpv8bLxicrXbZunyg0/H+01QI3uRNo97kOEyDgCXSlK12UW3Bi5l67NGbWzxHVRlJyiScgd71iTdh4/nnrGQEtr4R7LwLP/L4yLr4cRlMwtAOXuC8sjLwNx2WQF1/ljqJt65kcHX6TonHp3o3xzdgoVmJOq2B5JG0+VjzLf3E5lxHNKfAlrzn0IjpCIprvJqWG5nrxRtGY5rJ5LJaPrEaQpWoy+gQlWBzMQ/MCeSK+LRg9e7TnBQF4BqXU8sr4Ulg5UL95r20XRzbcE60zVNbEA8pFte/6Evj/RTUEnK5wz2Mqh3uXA== 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=pWZOf2iLB+jsTHfTh7PmEI7topCnRkZuS4vq8LREh40=; b=Vg0IJ5FAawSbICmaNhkXhEh8+AhQlPyYOTE5WInOb0LupdrAC1Mer5hiRFvNKUpWeYSRMt4Sta30Jh6JkKR0dia0uIe1A1/DRTSVLdRbolbF9KEIC5nUbUwf1oZ2vITbguc0SD1fBIqiOUl2LzHmUjCcZcsB184Y2Kq7QEHkFOOluCOzyy1GBuFmOI0yvz8Y6qQYNHv3740IVhwqjJRr6mk4Yyctm9Fx03fAus6PViPWAw2lWcQ6OpZR2gVHy39FGjwPjJ4XAEQMNbtxqA/MAd2y9T5zz6B0xm8CzpscvnbtTStzpmk84qpXSxa0/2wDyVSl0ZrGb1gEcQehRyF2IA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); 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=pWZOf2iLB+jsTHfTh7PmEI7topCnRkZuS4vq8LREh40=; b=KbDIXjWD20XLc2UjX77Dp4m1NK9dZ7TQA1LwUeakWLK9ed/5+jUxholnBWX17vsHptK61hmgBixarY/pvlFLeXYlnxUt59r5RVK7JBs6Z4w+RAydeH+edNlrfVdEszuLPOVUOYnQi+rlus3sjmlNjOuMSN3t5B0kC48mI2EiRd7rcG0/rYHxZhTGr7yQWSH9O+kE5axMQzf59QIazBA12olpywSjozFP/1QlFfU3K3jGQPiLC/75u8oVnWJyXwZxmWRk+5f7ublJjp9wcl4hvh843n1Ik0LOK4S5hpV1hbS7I166p9ZII2H7nH385dLELwH2HiWsoSQA0exYhg+A9w== Received: from DS7PR03CA0352.namprd03.prod.outlook.com (2603:10b6:8:55::32) by SJ0PR12MB7034.namprd12.prod.outlook.com (2603:10b6:a03:449::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.23; Sun, 12 Feb 2023 08:53:59 +0000 Received: from DS1PEPF0000E64F.namprd02.prod.outlook.com (2603:10b6:8:55:cafe::8b) by DS7PR03CA0352.outlook.office365.com (2603:10b6:8:55::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.23 via Frontend Transport; Sun, 12 Feb 2023 08:53:58 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by DS1PEPF0000E64F.mail.protection.outlook.com (10.167.18.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6111.8 via Frontend Transport; Sun, 12 Feb 2023 08:53:57 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Sun, 12 Feb 2023 00:53:56 -0800 Received: from nvidia.com (10.126.231.37) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Sun, 12 Feb 2023 00:53:53 -0800 From: Ophir Munk To: , Bruce Richardson CC: Ophir Munk , Matan Azrad , "Thomas Monjalon" , Lior Margalit , "Asaf Penso" Subject: [PATCH v1] config: make max memzones definition configurable Date: Sun, 12 Feb 2023 10:53:19 +0200 Message-ID: <20230212085319.693689-1-ophirmu@nvidia.com> X-Mailer: git-send-email 2.14.1 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.126.231.37] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS1PEPF0000E64F:EE_|SJ0PR12MB7034:EE_ X-MS-Office365-Filtering-Correlation-Id: 9d8e5053-5d99-4d31-afba-08db0cd6ad97 X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: t1Ek5OAY8bcMJP3juu9KvdTUf+sBzi+54XstZJZRJyQv/vidMfXkLeL6xGv++56nQ3PulxMnpbTfiZ0VBxljAOFUEkhSI0QPGbn1ePdYu9OJrvH/IWTJ+jgKscEwcoev7Q/00X18XlnK2LXRod/UR9gFXATboNmCr7CHnlCH/3U4g6TcBTFtW0vi1WqGkJJy0nA2KAVOf5f1XCbm/eOtpRoRN27CbkxfZvJteCoBtMbDrOvWayTwPW8718ePWEvjGhdlhWIWMnS0clwj2LTVzTTn/oxcGWgNF32gLws3espexznWXgdEbhONfKcwXhU7Bn4N2o3UOaWjWm/PUP6jarAuJKsDgeOVpPPBz2b7WlIj5dvTDoRvg654BMOo0dgO8MCuOK5enEVVNrBNFruA5CUeRZBk5zxeKt7Xon67jCxOqSP1jH/fWiMU21XB3Jcm99p26KjK3Q4s/ZHQHVTB9zaeUT4QhPWfJP8e+1fFdx5waYCpqk+jHPsqwOPoxOgAOZTjnXtQQCgdBu1hfchinYLUend81AXcC6XoSuFkctCRa7+/7NEafXI1px8hqMRBfki3sd0JkB8AKOYjtiLOG5E2EqdDL04/yYbZbf23WGYT+nxz3hs8xsyXWnTgkEMWPttbnDD+MGBXgYdPbMdRtUv5exFSVI89plGIx6P83vp+NLlnFln1sSGQGVtDZoHepOLM0Qo40owfkcAzv1rIbjSUcWJ18t267O0bQZg2SEasmVQoksobQjLmrO02oSX2UgFU5iZjY3nntpdexZ0Q9HNM+2MpZoQq+jcjlKzmEro= X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230025)(4636009)(346002)(376002)(39860400002)(136003)(396003)(451199018)(36840700001)(46966006)(40470700004)(356005)(6666004)(107886003)(2906002)(8936002)(426003)(40480700001)(36756003)(7696005)(47076005)(36860700001)(5660300002)(86362001)(70586007)(82310400005)(8676002)(4326008)(70206006)(110136005)(83380400001)(54906003)(316002)(41300700001)(55016003)(478600001)(40460700003)(16526019)(966005)(336012)(1076003)(7636003)(6286002)(26005)(82740400003)(186003)(2616005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Feb 2023 08:53:57.6584 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9d8e5053-5d99-4d31-afba-08db0cd6ad97 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DS1PEPF0000E64F.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB7034 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 current DPDK the RTE_MAX_MEMZONE definition is unconditionally hard coded as 2560. For applications requiring different values of this parameter – it is more convenient to set its value as part of the meson command line rather than changing the dpdk source code per application. An example would be of an application that uses the DPDK mempool library which is based on DPDK memzone library. The application may need to create a number of steering tables, each of which will require its own mempool allocation. This commit adds a meson optional parameter named max_memzones. If not specified - it is set by default to 2560. The hard coded definition of RTE_MAX_MEMZONE is removed. During meson build time the RTE_MAX_MEMZONE can be optionally defined as the value of max_memzones parameter. Signed-off-by: Ophir Munk --- RFC: https://patchwork.dpdk.org/project/dpdk/patch/20230130092302.376145-1-ophirmu@nvidia.com/ config/meson.build | 1 + config/rte_config.h | 1 - meson_options.txt | 2 ++ 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/config/meson.build b/config/meson.build index 26f3168..b55390f 100644 --- a/config/meson.build +++ b/config/meson.build @@ -304,6 +304,7 @@ endforeach dpdk_conf.set('RTE_MAX_ETHPORTS', get_option('max_ethports')) dpdk_conf.set('RTE_LIBEAL_USE_HPET', get_option('use_hpet')) dpdk_conf.set('RTE_ENABLE_TRACE_FP', get_option('enable_trace_fp')) +dpdk_conf.set('RTE_MAX_MEMZONE', get_option('max_memzones')) # values which have defaults which may be overridden dpdk_conf.set('RTE_MAX_VFIO_GROUPS', 64) dpdk_conf.set('RTE_DRIVER_MEMPOOL_BUCKET_SIZE_KB', 64) diff --git a/config/rte_config.h b/config/rte_config.h index 7b8c85e..400e44e 100644 --- a/config/rte_config.h +++ b/config/rte_config.h @@ -34,7 +34,6 @@ #define RTE_MAX_MEM_MB_PER_LIST 32768 #define RTE_MAX_MEMSEG_PER_TYPE 32768 #define RTE_MAX_MEM_MB_PER_TYPE 65536 -#define RTE_MAX_MEMZONE 2560 #define RTE_MAX_TAILQ 32 #define RTE_LOG_DP_LEVEL RTE_LOG_INFO #define RTE_MAX_VFIO_CONTAINERS 64 diff --git a/meson_options.txt b/meson_options.txt index 0852849..62888fe 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -36,6 +36,8 @@ option('machine', type: 'string', value: 'auto', description: 'Alias of cpu_instruction_set.') option('max_ethports', type: 'integer', value: 32, description: 'maximum number of Ethernet devices') +option('max_memzones', type: 'integer', value: 2560, description: + 'maximum number of memory zones supported by EAL') option('max_lcores', type: 'string', value: 'default', description: 'Set maximum number of cores/threads supported by EAL; "default" is different per-arch, "detect" detects the number of cores on the build machine.') option('max_numa_nodes', type: 'string', value: 'default', description: -- 2.8.4