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 153E441C26; Mon, 6 Feb 2023 23:17:54 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9D44540A7D; Mon, 6 Feb 2023 23:17:53 +0100 (CET) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by mails.dpdk.org (Postfix) with ESMTP id 859C040156 for ; Mon, 6 Feb 2023 23:17:52 +0100 (CET) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id CEE5A5C0063; Mon, 6 Feb 2023 17:17:50 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Mon, 06 Feb 2023 17:17:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1675721870; x= 1675808270; bh=jfIRD4Kk6UwW7dxZAXY/bWKAm4Ke9EokbAJ1QaOaCVk=; b=v bz6JFJ4EdV9t3o1HzS9sIlSslvSzcNrojDHSNeiyCaU07ep5Q+o+fRvNLbPgUOUV 0Ib5Gn2hFaYkanhfn3TN4otlz4N2IcjyDQKns0FZwkqE8FERpOTeBf4Mr9yxHQHG ANegdVvmgPi/ryPkjHwSpb4LIrLqaXH7Af1oLJgXlS2bPWoMoLnkJqON2oKCFyIT aegMc3O7rMqdRR93V7hmvS0qoZLIArUdqhIVrGyW8cHaTCA1BGSF+wBQc42+saXf +Y8goJgtsL7lJoS+20hoo7O+gG6r/Wnn+WYETPD3f4crtYSnnezj0FkCSajjL/k6 o3jgwK4tmywPUk0w5XzrQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1675721870; x= 1675808270; bh=jfIRD4Kk6UwW7dxZAXY/bWKAm4Ke9EokbAJ1QaOaCVk=; b=k om7sSPxGsjm+Y1rDMUiC7d1bkbbe/ETtUK28OElcr3I2qWctQO5Y/61B9tlPeGMf HI2DVQZ3RbbXjL1myGi81jzW3rPuy9nHjXf05aluBT6LvhnNQW0okaTqKPBvd6uf bSk+SUWUFY3oW1iCN0+7VIPL6PO2KB6L6zluyud/klf4A7EZ2fdvFDtMWnAD72n7 4r1AL3CMOQdImUlZcTtmdhgpYsa+PQ1BFvXH+5xa8TeCgqmMEnGQd3RzngAudxSy KoKofxp2ihppT1Pmc4N3inTBK5l5mLZ/GEM5E2pMRxFVYyPkaDFfIFCx4lwoCQns wMem5LH8sNJPLdOwYrdAA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudegiedgudehiecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhho mhgrshcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqne cuggftrfgrthhtvghrnheptdejieeifeehtdffgfdvleetueeffeehueejgfeuteeftddt ieekgfekudehtdfgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 6 Feb 2023 17:17:49 -0500 (EST) From: Thomas Monjalon To: jerinj@marvell.com, Stephen Hemminger Cc: dev@dpdk.org, Srikanth Yalavarthi , Anatoly Burakov , ferruh.yigit@xilinx.com, dchickles@marvell.com, sshankarnara@marvell.com, pkapoor@marvell.com Subject: Re: [dpdk-dev] [PATCH v2 02/12] mldev: support PMD functions for ML device Date: Mon, 06 Feb 2023 23:17:47 +0100 Message-ID: <1727693.X513TT2pbd@thomas> In-Reply-To: <20230206130432.654d1467@hermes.local> References: <20221114120238.2143832-1-jerinj@marvell.com> <20230206202453.336280-3-jerinj@marvell.com> <20230206130432.654d1467@hermes.local> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 06/02/2023 22:04, Stephen Hemminger: > On Tue, 7 Feb 2023 01:54:43 +0530 > wrote: > > > +static struct rte_ml_dev ml_devices[RTE_MLDEV_MAX_DEVS]; > > > > This will reserve space for 64 devices, but almost all users > will only have one. Maybe a level of indirection and allocate as needed? > > You could even use a single allocation for the pmd and device private > data portion. I like what we did for GPU class: rte_gpu_init(size_t dev_max) If not called by the app, it is called automatically with a default size. So you can have a small default and there is no compilation settings.