DPDK patches and discussions
 help / color / mirror / Atom feed
From: Tal Shnaiderman <talshn@nvidia.com>
To: "Morten Brørup" <mb@smartsharesystems.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: NBU-Contact-Thomas Monjalon <thomas@monjalon.net>,
	"pallavi.kadam@intel.com" <pallavi.kadam@intel.com>,
	"dmitry.kozliuk@gmail.com" <dmitry.kozliuk@gmail.com>,
	"navasile@linux.microsoft.com" <navasile@linux.microsoft.com>,
	"dmitrym@microsoft.com" <dmitrym@microsoft.com>,
	"david.marchand@redhat.com" <david.marchand@redhat.com>,
	"anatoly.burakov@intel.com" <anatoly.burakov@intel.com>,
	"vladimir.medvedkin@intel.com" <vladimir.medvedkin@intel.com>
Subject: Re: [dpdk-dev] [PATCH 2/2] eal: rename key opaque pointer in TLS API
Date: Tue, 2 Mar 2021 13:13:12 +0000	[thread overview]
Message-ID: <DM6PR12MB3945ED80DC05B60F3F5B79DEA4999@DM6PR12MB3945.namprd12.prod.outlook.com> (raw)
In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35C6163E@smartserver.smartshare.dk>

> Subject: RE: [dpdk-dev] [PATCH 2/2] eal: rename key opaque pointer in TLS
> API
> 
> External email: Use caution opening links or attachments
> 
> 
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Tal Shnaiderman
> > Sent: Tuesday, March 2, 2021 12:25 PM
> >
> > rename the key opaque pointer from rte_tls_key to rte_thread_tls_key
> > to avoid confusion with transport layer security.
> >
> 
> [...]
> 
> > diff --git a/lib/librte_eal/include/rte_thread.h
> > b/lib/librte_eal/include/rte_thread.h
> > index 39737d1829..90bcb02554 100644
> > --- a/lib/librte_eal/include/rte_thread.h
> > +++ b/lib/librte_eal/include/rte_thread.h
> > @@ -23,7 +23,7 @@ extern "C" {
> >  /**
> >   * TLS key type, an opaque pointer.
> >   */
> > -typedef struct eal_tls_key *rte_tls_key;
> > +typedef struct eal_tls_key *rte_thread_tls_key;
> >
> >  /**
> >   * Set core affinity of the current thread.
> > @@ -63,7 +63,8 @@ void rte_thread_get_affinity(rte_cpuset_t *cpusetp);
> >   */
> >
> >  __rte_experimental
> > -int rte_thread_tls_key_create(rte_tls_key *key, void
> > (*destructor)(void *));
> > +int rte_thread_tls_key_create(rte_thread_tls_key *key,
> > +                     void (*destructor)(void *));
> >
> 
> I agree with your argument for TLS confusion.
> 
> How about rte_thread_key, instead of rte_thread_tls_key. Having both
> thread and tls seems redundant.
> 

Thanks for the input, make sense, I'll change the name to your suggestion.

> 
> Here are some more thoughts... It is meant as a provocation only, not a real
> suggestion:
> 
> The DPDK API often uses the term "lcore" as the abstraction for threads, e.g.
> rte_per_lcore.h refers to thread local storage using "per_lcore", while it is in
> fact "per thread". Why use another terminology in the API for thread keys,
> instead of sticking with the "lcore" naming tradition, e.g. struct
> rte_lcore_key?
> 

You're right, but then there are some functions in eal_common_thread.c which uses the 'thread' terminology, maybe it's a good idea to rework it all to a single accepted term.

> 
> Med venlig hilsen / kind regards
> - Morten Brørup
> 
> 


  reply	other threads:[~2021-03-02 13:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-02 11:24 [dpdk-dev] [PATCH 0/2] EAL Thread TLS API enhancements Tal Shnaiderman
2021-03-02 11:24 ` [dpdk-dev] [PATCH 1/2] eal: error number enhancement for thread TLS API Tal Shnaiderman
2021-03-02 11:24 ` [dpdk-dev] [PATCH 2/2] eal: rename key opaque pointer in " Tal Shnaiderman
2021-03-02 12:41   ` Morten Brørup
2021-03-02 13:13     ` Tal Shnaiderman [this message]
2021-03-02 13:46       ` Morten Brørup

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM6PR12MB3945ED80DC05B60F3F5B79DEA4999@DM6PR12MB3945.namprd12.prod.outlook.com \
    --to=talshn@nvidia.com \
    --cc=anatoly.burakov@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=dmitry.kozliuk@gmail.com \
    --cc=dmitrym@microsoft.com \
    --cc=mb@smartsharesystems.com \
    --cc=navasile@linux.microsoft.com \
    --cc=pallavi.kadam@intel.com \
    --cc=thomas@monjalon.net \
    --cc=vladimir.medvedkin@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).