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 92BE945B44; Wed, 16 Oct 2024 00:35:39 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2D93040144; Wed, 16 Oct 2024 00:35:39 +0200 (CEST) Received: from mail-pg1-f182.google.com (mail-pg1-f182.google.com [209.85.215.182]) by mails.dpdk.org (Postfix) with ESMTP id 8F16B400D7 for ; Wed, 16 Oct 2024 00:35:37 +0200 (CEST) Received: by mail-pg1-f182.google.com with SMTP id 41be03b00d2f7-7ea7ad1e01fso236231a12.0 for ; Tue, 15 Oct 2024 15:35:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1729031736; x=1729636536; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=E2Lt739dmJzPNDE7YzMN1tsniLoMihmWke/Ft02m5xM=; b=fcNQVFULQAIqSKm/vrYt4yVF9eKGr7qp+S7YivTjMRmpTWaSsee3AAsblfPI6wYmJk 9x3+wRRCNsqWPgyNnxcQXAdx6eW86ULpJxAereRrSTxqi1ApGRCiS/F4ftxIAa5S+9vl NHFyaNEumlTvz591BUJ8nh0RrjeMAwQRI1VWZp4o4+KNt4JvsVnNhBk8X71iFFlwd8io EdTVDBAWUtjA2DzqafSC59uVgFhOj2Uwg5vx1VYkTGkkO4bV/fdFzAM36yU1+BqlpMuu 70CHKEEZ6jsscg0uGrbDtNKrjRJOcyOlujT4pJ7ys5U007y6FZx/N51xEtsqblbYjkUq dIoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729031736; x=1729636536; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=E2Lt739dmJzPNDE7YzMN1tsniLoMihmWke/Ft02m5xM=; b=pcqK4nFCtAfu3xUb6M6RMfcj/o6Kg1N7CNWtKfUXTeamxaxAbJmBvCWGszjF4pc0ww 3Lu0GKiVJ4IWXVQKR1px73RlW95E9iaaXTUyqpHfvWh1ET0u0LkCIZ8k/3sByRddDNC3 9DIAxYTiP74arM5QSyxNBP+N0QBHNBL1K402aHS7ncpYx3b2O6UERY1I9wKjIEkQiak8 w4B+IAohB58kvIoVea8cwlA5sOJNd7AxAsfRJn4mpzqetUn9YlrMwR77XV2O3eQOMYc1 lOqM1uG1cEdAOdfZTyXKKImvEv5at0hpN2ld6QWgVqAcTHxAbQWPqAXvd+GHLxqcXzLV 5h+Q== X-Gm-Message-State: AOJu0Yyer/ES2LQB6OjQPnm9qGCJzaWShRqoFAfkHR/amsFNeGXoLYNV AheEKQzbRv5tnFUP7mz3LG5H21WqS04ZvVV19Ccd6Lz/ElE8PamZPzwxVh136Sg= X-Google-Smtp-Source: AGHT+IE8YNbz75x/IK+k82l9hbMcJWSsuwgrhddpr5aYLUQSoXtG4W0XXojAjUlCQMK8Hxin0X0/WA== X-Received: by 2002:a17:90a:e7c7:b0:2d8:85fc:464c with SMTP id 98e67ed59e1d1-2e3aa0957a2mr3135555a91.11.1729031736624; Tue, 15 Oct 2024 15:35:36 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e392f7559asm2492172a91.52.2024.10.15.15.35.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Oct 2024 15:35:36 -0700 (PDT) Date: Tue, 15 Oct 2024 15:35:34 -0700 From: Stephen Hemminger To: Mattias =?UTF-8?B?UsO2bm5ibG9t?= Cc: , , Morten =?UTF-8?B?QnLDuHJ1cA==?= , Konstantin Ananyev , David Marchand , Jerin Jacob , Luka Jankovic , Konstantin Ananyev , Chengwen Feng Subject: Re: [PATCH v13 1/7] eal: add static per-lcore memory allocation facility Message-ID: <20241015153534.4a94301a@hermes.local> In-Reply-To: <20241015093344.824073-2-mattias.ronnblom@ericsson.com> References: <20241015065505.823840-2-mattias.ronnblom@ericsson.com> <20241015093344.824073-1-mattias.ronnblom@ericsson.com> <20241015093344.824073-2-mattias.ronnblom@ericsson.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 Tue, 15 Oct 2024 11:33:38 +0200 Mattias R=C3=B6nnblom wrote: > +/** > + * Allocate space in the per-lcore id buffers for an lcore variable. > + * > + * The pointer returned is only an opaque identifier of the variable. To > + * get an actual pointer to a particular instance of the variable use > + * @ref RTE_LCORE_VAR or @ref RTE_LCORE_VAR_LCORE. > + * > + * The lcore variable values' memory is set to zero. > + * > + * The allocation is always successful, barring a fatal exhaustion of > + * the per-lcore id buffer space. > + * > + * rte_lcore_var_alloc() is not multi-thread safe. > + * > + * @param size > + * The size (in bytes) of the variable's per-lcore id value. Must be >= 0. > + * @param align > + * If 0, the values will be suitably aligned for any kind of type > + * (i.e., alignof(max_align_t)). Otherwise, the values will be aligned > + * on a multiple of *align*, which must be a power of 2 and equal or > + * less than @c RTE_CACHE_LINE_SIZE. > + * @return > + * The variable's handle, stored in a void pointer value. The value > + * is always non-NULL. > + */ > +__rte_experimental > +void * > +rte_lcore_var_alloc(size_t size, size_t align); This should have the similar function attributes as rte_malloc now does where it tells the compiler the size, alignment, and aliasing. Also there should be mention that there is no free function.