From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
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 <dev@dpdk.org>; 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: <xms:jnzhY3NIJxL1RHfuBf9GNJg4wDMfYoQ6zu4ZOKzSmiBSJshlGLAkPg>
 <xme:jnzhYx9Hy9HBERi0VAPrcCiKdl71xnWHnxKUCWA_vTUZAD25_ZDUgjWrU7nRVC0KG
 w3jIHW7CBwI-mUvFA>
X-ME-Received: <xmr:jnzhY2R6Z1_I1lvt9rbTJUrMcux9qGzMxjrq4IjMvhRAqgpD_SY7ppo8cJRstutNM4TeXu3vtfbX4Rd7j5HypFjvjg>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudegiedgudehiecutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd
 enucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhho
 mhgrshcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqne
 cuggftrfgrthhtvghrnheptdejieeifeehtdffgfdvleetueeffeehueejgfeuteeftddt
 ieekgfekudehtdfgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh
 hfrhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth
X-ME-Proxy: <xmx:jnzhY7tgGGgFCLYsyS9I_deApNNsuzr2shqzTJ9piLuX6jSFlI-dDA>
 <xmx:jnzhY_f18Mu6DhUjc-nZo_LGdSEontbLY3UZ1QAJ-6YL9qAtE0v5Wg>
 <xmx:jnzhY31AL8UqKCt2PQn_ahhJcwEumy_b7Cv8P-XXf76myeSAml0cbw>
 <xmx:jnzhYxvXoKfQrt8uOmAcTBF_qHRDgr-eV2Otp6vTvMb7oQzlYBLuYg>
Feedback-ID: i47234305:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon,
 6 Feb 2023 17:17:49 -0500 (EST)
From: Thomas Monjalon <thomas@monjalon.net>
To: jerinj@marvell.com, Stephen Hemminger <stephen@networkplumber.org>
Cc: dev@dpdk.org, Srikanth Yalavarthi <syalavarthi@marvell.com>,
 Anatoly Burakov <anatoly.burakov@intel.com>, 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 <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

06/02/2023 22:04, Stephen Hemminger:
> On Tue, 7 Feb 2023 01:54:43 +0530
> <jerinj@marvell.com> 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.