From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (xvm-189-124.dc0.ghst.net [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6CA7AA09FF; Wed, 6 Jan 2021 21:10:36 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EBD9C140E1D; Wed, 6 Jan 2021 21:10:35 +0100 (CET) Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42]) by mails.dpdk.org (Postfix) with ESMTP id C6F1C40FA7 for ; Wed, 6 Jan 2021 21:10:34 +0100 (CET) Received: by mail-lf1-f42.google.com with SMTP id m12so9381006lfo.7 for ; Wed, 06 Jan 2021 12:10:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=CgDqZ7N4JbvcQwRqadHkUIfXjRYSOZX3sUE+U0minBQ=; b=unSzimPHmDGJg/wtwJ6wZDL4bWHFujNCkM/Cr3QiNFtH4xpMxzKPz/ORPSMeP08rMg o55IHrJjbtZE15qREPgmxMpwdV4QMuOIOaRNNYcjqSvtqk1T20BfycIZhBRewFqTPsJH GDUhGSU8/U3IXCcYjt5pNW3v1UnaE3fc3SrJtOyFugkzHtJy/XIrU8iD4D7f7ms+Ltch Qobb8Xj2gr45/jpyJE2M38lAnr++QVRX/pdnIXQese6nCvfO3Ry4SlkaBnwgtgIL9MXx OgBEPH8NbtQX+X6M+eTsypfoFCQJWVlC0tX8oRaK6rMoO799DTdBH1rgchibcqCh07CM Ip/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=CgDqZ7N4JbvcQwRqadHkUIfXjRYSOZX3sUE+U0minBQ=; b=gShLp+JY6Lfv2F/bmn/oJcJVdiF/qnbg4y79g95j2zu26wH3H5X7hM+AZhtvbW6hiz jtlEzLChHn2xtrKWWxQfSzJFxWDVCCkITppMDNRLLD+ivwhitZwNUq+uFIbRc2/IDt/R Y8J3nQOkf5lDuz+E3REDazhRNsWviS8MioDJ5/dsCEBtnohCf9IuOJWKc+euQZOObFUz Xdj1z4kJuY4m0xRNL5m6/0sC0Dk0bW7BnvahwLzXhjmjTvgU+y5P30b9CtaTRobfj9q/ zqntbG+jhlObPjM1TXKp8UGepo7RDnPla6gSC8pG9TnT/rNRYROw1LbA8u12wCP6OmO0 FLGA== X-Gm-Message-State: AOAM530S5+EvnYTmG70eIeJUrbFJ/ISpaennBlawESigiYm/PSTN5OCt M7WyD9n3w3s9BZpbfENHqTg= X-Google-Smtp-Source: ABdhPJzPczddbs9Vfs3mPxjX5eMXZQHopfE420IYMYRWn7moh92DFRlRXNkuEnOGhPd2uBCuL20Eug== X-Received: by 2002:a19:e007:: with SMTP id x7mr2788158lfg.280.1609963834257; Wed, 06 Jan 2021 12:10:34 -0800 (PST) Received: from sovereign (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id a15sm584372lfo.299.2021.01.06.12.10.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Jan 2021 12:10:33 -0800 (PST) Date: Wed, 6 Jan 2021 23:10:32 +0300 From: Dmitry Kozlyuk To: Tal Shnaiderman Cc: dev@dpdk.org, thomas@monjalon.net, pallavi.kadam@intel.com, navasile@linux.microsoft.com, dmitrym@microsoft.com, david.marchand@redhat.com Message-ID: <20210106231032.1ecde254@sovereign> In-Reply-To: <20210106194543.14024-3-talshn@nvidia.com> References: <20210105170635.6212-2-talshn@nvidia.com> <20210106194543.14024-1-talshn@nvidia.com> <20210106194543.14024-3-talshn@nvidia.com> X-Mailer: Claws Mail 3.17.6 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v8 2/2] eal: add generic thread-local-storage functions 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 Sender: "dev" On Wed, 6 Jan 2021 21:45:43 +0200, Tal Shnaiderman wrote: [...] > +/** > + * Delete a TLS data key visible to all threads in the process > + * rte_tls_key is the opaque pointer allocated by rte_thread_tls_key_create. This line repeats @param key description. > + * > + * @param key > + * The rte_tls_key allocated by rte_thread_tls_key_create(). > + * > + * @return > + * On success, zero. > + * On failure, a negative number. > + */ > +__rte_experimental > +int rte_thread_tls_key_delete(rte_tls_key key); [...] > + > +struct eal_tls_key { > + pthread_key_t thread_index; > +}; > + > +int > +rte_thread_tls_key_create(rte_tls_key *key, void (*destructor)(void *)) > +{ > + int err; > + > + *key = malloc(sizeof(*key)); Should be sizeof(**key), which would be sizeof(struct eal_tls_key), as needed. Same for Windows file. I had to double-check my comment on v7.