From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 77FCBA052A; Wed, 23 Dec 2020 02:18:08 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7F43ACA38; Wed, 23 Dec 2020 02:18:06 +0100 (CET) Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com [209.85.167.52]) by dpdk.org (Postfix) with ESMTP id 3ABE6CA37 for ; Wed, 23 Dec 2020 02:18:05 +0100 (CET) Received: by mail-lf1-f52.google.com with SMTP id b26so26840838lff.9 for ; Tue, 22 Dec 2020 17:18:05 -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=E9yycBj57y0tibdZDib+rAkxwkc6iU5MwLzVkHdPZcs=; b=Yj6/DhWH0FZztHXUkxw+1pUprtLlkzGg80ZKfjq3g1Ye8/rRRad4C/MH762PYPPHMu prO2bYVmZJdM5DWTumYrJOb49LPr4xdE9gSgXPMG4LqJvZqF6UM9FJl2kj2dWpBv7H/d dEM3isWsoBqmKjSgtR7Tz6OLakNWzSbS7h21vrg4th9cQ0cVdDOy97qN1sIGIyGpp/LE L1bWyKaQqnCBdunBDK8x2zmEIqP0f1ahkewEg/xIXupk2SLdMuvpl7UWvZiIGmIKIFGu AW9L+xnZD3AMaRCe/2aTLu6JwVvrXDJwOK5AJQQ1GapGrxBA8f7hIXiY1khLzst+G+BD PRWQ== 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=E9yycBj57y0tibdZDib+rAkxwkc6iU5MwLzVkHdPZcs=; b=c4NRME7w6t7KZ1wlo+JE2+1npZTamqWFityt7MHsK8jnh1llXmBJ8ibK5ntFQMbfY/ M+bkSWkWAowGjAxWtXkUfiZhXC6g+OyjkgIfjmGTUZL6E+ZoYjSv0Ivf8FPBvDRaABfL RrhTcJcIzFK0x2HtnhY0AON1ZL8q1BkffCA+NmKUciCQ/OIx2OMnocaHVjbkXyZ8EsR+ yR83JhhAEFBidtxzh71A9i8hMIJGTqMALMwcDH9uQiyCe2qnRxDr4TC6LnaxyUo3M+1H hIlY3cUuNfbc6nPUDZBVhie2KCa0G3owRvlW86D7OknPO9HfHf5aHWASHS32iMMcuF68 0HbA== X-Gm-Message-State: AOAM533euA+nQxjs+KKtbiWMJElf7+jxQBBtFZuHItsgTQVX/zWBp3Vf QGfknsqsiRHcTt68agFNuV0= X-Google-Smtp-Source: ABdhPJxiroc07zIfwTEZffsm73EMhpbSdXi0+8KUxRqTM4QwpCwF5KjshiTHUJaE6h3NOnPs7BwurQ== X-Received: by 2002:a19:8041:: with SMTP id b62mr9616379lfd.496.1608686283764; Tue, 22 Dec 2020 17:18:03 -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 q13sm2911199lfk.147.2020.12.22.17.18.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Dec 2020 17:18:02 -0800 (PST) Date: Wed, 23 Dec 2020 04:18:01 +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: <20201223041801.5ea13a37@sovereign> In-Reply-To: <20201222073044.9084-1-talshn@nvidia.com> References: <20201217174913.14280-1-talshn@nvidia.com> <20201222073044.9084-1-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 v4] eal: add generic thread-local-storage functions X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" > [...] > +int > +rte_thread_tls_set_value(rte_tls_key key, const void *value) > +{ > + int err; > + > + if (!key) { > + RTE_LOG(DEBUG, EAL, "invalid tls key passed to function.\n"); > + return -1; > + } > + err = pthread_setspecific(key->thread_index, value); > + if (err) { > + RTE_LOG(DEBUG, EAL, "pthread_setspecific failed: %s\n", > + strerror(err)); > + free(key); Why free(key) here? Probably a typo. > [...] > +__rte_experimental > +int > +rte_thread_tls_create_key(rte_tls_key *key, void (*destructor)(void *)); > + > +/** > + * Function to delete a TLS data key visible to all threads in the process > + * rte_tls_key is the opaque pointer allocated by rte_thread_tls_create_key. > + * > + * @param key > + * The rte_tls_key will cantain the allocated key cantain -> contain > diff --git a/lib/librte_eal/windows/meson.build b/lib/librte_eal/windows/meson.build > index 3b2faf29eb..1f1398dfe9 100644 > --- a/lib/librte_eal/windows/meson.build > +++ b/lib/librte_eal/windows/meson.build > @@ -21,4 +21,10 @@ sources += files( > 'getopt.c', > ) > > +if (dpdk_conf.has('use_external_pthread')) Please describe the new option in meson_options.txt. Maybe drop "external" from the name, what do you think?