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 13D0C41C89; Mon, 13 Feb 2023 15:52:44 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E7A8E40A81; Mon, 13 Feb 2023 15:52:43 +0100 (CET) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 21E6F400D6 for ; Mon, 13 Feb 2023 15:52:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1676299962; x=1707835962; h=date:from:to:cc:subject:message-id:references: content-transfer-encoding:in-reply-to:mime-version; bh=9AcaVM0JNGnP4JT2oB45jeAFRFig/lPdvgLLRK8Q/rY=; b=HHnbWgfozUHjSqCS/wXQU7ZwNzUkh7qErjV30LFBoYMbJd7g/KDQ6CIR IjQBSp1dRF1hmNBTW72225HMFRrrCbt9qNRIa6hnCdhfxpo8Wb1oFkw5p vqo6SYAx5v2MbmhGf1LCwQHPD0gprwWzxi6p8cfb3vMD71i5m4QEc261q vQ5cN4urvksSAj+M9U2DlUebm8Vc2lTpfF8xOVt96Xj1CecoVF9+vsQh6 dha2I95lS9y3Szh11P1yAIq3AlXm5cykQXmkWjrD12FFKo7/1O9EV6Ioz H7Rr992RyX7eQC8KxJTPvwCzbMtlll0LxY/UyP1u4vd9uNYQJMuYYCBhn Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10620"; a="393303314" X-IronPort-AV: E=Sophos;i="5.97,294,1669104000"; d="scan'208";a="393303314" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Feb 2023 06:52:41 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10620"; a="792751429" X-IronPort-AV: E=Sophos;i="5.97,294,1669104000"; d="scan'208";a="792751429" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orsmga004.jf.intel.com with ESMTP; 13 Feb 2023 06:52:40 -0800 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Mon, 13 Feb 2023 06:52:40 -0800 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16 via Frontend Transport; Mon, 13 Feb 2023 06:52:40 -0800 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.171) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.16; Mon, 13 Feb 2023 06:52:40 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ioNZiBYnw5enZsOtMakV5GeOt0Z+OZK1hGhhQ+XOSaR7WlUcgvCBVhlsswaNorkVyr4C+rMd4I0AduMk8cigNTvq9hmbYxT3d/DsgtkRoLuW7Dwgua52VVybFWul5pZy4MrJ3xS37YJy1nUMyzYIRyjp3a1Q1QUOuTt9+WY7Anfw6Rr/fjCn1Y9hcCiE07yEVYGMMCjhRI57NWYrnQheg4MqO7pR63JFXlJPtY+BHhl/Snu8r4IgZzSAyssp+UGiZh8cmbfAafQw8axd0jqQZiYeCWsJom4Cqyql/LWyewx4JNsirIRVQUq3FNhQN97PpBiEfkIKz135nWmEjDOzoA== 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=lQR1tT7ncDiq2Og0Zaw2YKgL0htev7xk3gMgsh1sKts=; b=doctlnpARVOAMHHNkEjDgi8EbOI8hfmvg6AqCvpFsDb8fwLRTmkANWEz4qazw6KDwzptxhDdT3aBl2mv4H6OrJW442Jcgi3totbSSEdmY8IrwIa9kXLrQRXNsMebyWfjKafDIWBWNF0YjYtH2ws9u6j9q3PgLRf6EjlpshmmtSkKrZgWAGlDKDvyRu5cFI2a8dlDL++o73gskD2gHXZj1S80LhhgAYWg6dvYDeEThRlRKOzbBoXkIubPvBG26ua103qEbatQFcEjj0hsJ/oil1SZz6JwWj5AlELKuD58Vu9j0r+tO/PgNORlJuEotI3KP+X+apulq1TNNp4lxkONcQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) by DM4PR11MB6141.namprd11.prod.outlook.com (2603:10b6:8:b3::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.24; Mon, 13 Feb 2023 14:52:37 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::aaba:abb7:8794:def]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::aaba:abb7:8794:def%8]) with mapi id 15.20.6086.024; Mon, 13 Feb 2023 14:52:37 +0000 Date: Mon, 13 Feb 2023 14:52:30 +0000 From: Bruce Richardson To: Thomas Monjalon CC: Ophir Munk , , Matan Azrad , Lior Margalit , Asaf Penso , , , , , Subject: Re: [PATCH v1] config: make max memzones definition configurable Message-ID: References: <20230212085319.693689-1-ophirmu@nvidia.com> <3111936.fEcJ0Lxnt5@thomas> Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3111936.fEcJ0Lxnt5@thomas> X-ClientProxiedBy: LO2P123CA0033.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600::21) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|DM4PR11MB6141:EE_ X-MS-Office365-Filtering-Correlation-Id: 68517b83-9da2-41b9-a7df-08db0dd1f27c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: J0/F6VRphFVNzobyNuvCzZ9N3R0M7e7Y+U4iHZlhKxQ0rBHVIvc2DAPfSWVv1MPs/mBtMSO1UG9phpBIAI15jMN3uKoNXkBNihot6MPbzMLZ+NFC33W2WAYnHJhpXJ2oSFzBqbuh+R8+NNCpIsmE6Ok97YY2AEbRYnKyoP5mSoQeroIx1HXLKiQBN+1Z5McZIimsk5k2a7CBT+q+5o6J0qzNC8YBQlU0Sq2bCPdM35m6K1SdV3Q3SGKNMfN19f5lGbVxtnHQELTNNjB7LWKj2MgTPgHLpCoxTYR9908UxsQv7QjEuYsjrU9VC1Ax94JBKX450/WyyVrBdEqHifsVLuUQGRJl1MKaWG9NaR6Y6PDEDk3Oo/7YzIIJ+Il/L2hPy50cyBIrV/zg73caU7LCJDRgrSPUWm89CyVEhoF82tRyB6Uqra8oVcwnZLkKC4JHlEsgIeiVRJZE2vgItjr8Mk07+cCmbtif9Cu8NRHTm+bAwpojUH0DLxrTRfIucgvGYY9zqGWl6QwRzO1wET50iJB8MF/db+m3iBsgja9y7hV/QnvA6LAcqT6HNpXVS18OyIyWu8dSWRl+hFXLz2fkZch0uFabwB9TkibWHLIBzg+EJ/8KRFvl5TqWk+VKgaH0zeSn3Tv8ghz4P3gluqbSfEAPrhobYc4yEjetyQEjsWFw7I+S4USxZmLJbMtfGorxYdF/2Ity7EHO0p9ryWeRCn9Pv9s/ccy4BiQF8Ulw46o= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR11MB7309.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(346002)(376002)(396003)(39860400002)(366004)(136003)(451199018)(478600001)(7416002)(54906003)(2906002)(5660300002)(38100700002)(44832011)(6486002)(966005)(82960400001)(26005)(6512007)(186003)(83380400001)(41300700001)(6666004)(86362001)(316002)(4326008)(66476007)(66556008)(66946007)(6916009)(8676002)(8936002)(6506007)(67856001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?T3pJMjVJUjRoeHRJemFZUm0vYVBwaER4dFhGcEgxV0Jidmt0WHdUSld1SEIy?= =?utf-8?B?THdHdGhDdGpSaVZiUnVRNGtTbkFkUk05UXpvOWo1YnhNdXdtWnR1ME4rRkp5?= =?utf-8?B?cGtrRE5VTkJ2N2U0c2NhdGhVb2dwREFXbGJvQUMzUWxVaDNFQzZTNzU2R0NH?= =?utf-8?B?NTJQUmVrdmhqT3p4dUIxVkZZUVFhZ2Y1Ykovb3RRWlpOZGtwb2VNQS9lOWRI?= =?utf-8?B?OEY2OStlR1JNbkZDUjNQamRuOHdqK1o1TldNMld5VDV6a1RxSHh0MHlVZjUr?= =?utf-8?B?d1lkRDNEM0FiL3RCdXZneUFIdmdubkxPNkhudnpUVytHY3NBc2NSQUxLTUdX?= =?utf-8?B?aFVxRmZTRlpwNHNoeXJlOE5pbWZ2cTNyUTlhbEx2RENNT3puWEFZOVJxK1FS?= =?utf-8?B?RGhRRWtBbzdTekk1NUt5UGxDcGwzUTJkYkRyd29zeWFZL1djQmU0NXpF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AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Feb 2023 14:52:37.3151 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 6bLcjEdgsasOAMym5b0MsZXHTLNz0BkMgTOdWZtCInrA71qP6HrXbNFcqyH/1C9hXji/Fv9otwPgVvmjw7DmvB++qoHUSWvLEIPooFN/Vdc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR11MB6141 X-OriginatorOrg: intel.com 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 On Mon, Feb 13, 2023 at 02:55:41PM +0100, Thomas Monjalon wrote: > 13/02/2023 12:05, Bruce Richardson: > > On Sun, Feb 12, 2023 at 10:53:19AM +0200, Ophir Munk wrote: > > > 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(-) > > > > > Acked-by: Bruce Richardson > > Are we going to move all compilation-defined settings to > meson_options.txt? The direction discussed in recent years was to > configure things at runtime, and stop adding compilation-time settings. > > In this case, it is quite easy to add a new function void > rte_memzone_set_max(int max) to be called before rte_eal_init(). If not > called, the historical default is used. > Good point, I admit I had forgotten that. Looking at the use of RTE_MAX_MEMZONE, it is used as an array dimension in a number of places, but, from what I see on cursory examination, it should be replacable with a runtime value without significant pain in most cases. The one that probably needs more attention is the fact that the "net/qede" driver maintains an array of memzones in it's base-code layer. Therefore, we probably need input from that driver maintainer to know the impact there and why that array is needed in a net driver. [Adding the two maintainers on CC] /Bruce