DPDK usage discussions
 help / color / mirror / Atom feed
From: Pavel Vazharov <freakpv@gmail.com>
To: Antonio Di Bacco <antonio.di-bacco@keysight.com>
Cc: "users@dpdk.org" <users@dpdk.org>
Subject: Re: Accessing TLS for EAL threads
Date: Thu, 18 Nov 2021 09:36:02 +0200
Message-ID: <CAK9EM18jbV6DCtNjFm+UtD_40b+XDUTPZtmk-Lb1oDzey=55Qg@mail.gmail.com> (raw)
In-Reply-To: <DM6PR17MB3546109A8DE0870AF76DBE43BD999@DM6PR17MB3546.namprd17.prod.outlook.com>

[-- Attachment #1: Type: text/plain, Size: 956 bytes --]

Hi there,

I think the DPDK uses the pthread_ functions to manages its threads. You
can see in `rte_eal_init` in `lib/librte_eal/linux/eal.c` that it "spawns"
the threads using
        /* create a thread for each lcore */

        ret = pthread_create(&lcore_config[i].thread_id, NULL,

                     eal_thread_loop, NULL);
So I think you should be able to use other pthread_ functions without
problems from inside the EAL threads.
Hope that helps.


On Thu, Nov 18, 2021 at 9:24 AM Antonio Di Bacco <
antonio.di-bacco@keysight.com> wrote:

> I need to emulate the pthread_setspecific and pthread_getspecific for EAL
> threads. I don’t find any suitable APIs in the DPDK to access the TLS and
> get and set keys.
> I launched a number of threads using the rte_eal_remote launch but I don’t
> find any API that allows me to access the TLS for those threads.

[-- Attachment #2: Type: text/html, Size: 1837 bytes --]

  reply	other threads:[~2021-11-18  7:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-16 17:38 Antonio Di Bacco
2021-11-18  7:36 ` Pavel Vazharov [this message]
2021-11-18 16:26 ` Stephen Hemminger

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:

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

  git send-email \
    --in-reply-to='CAK9EM18jbV6DCtNjFm+UtD_40b+XDUTPZtmk-Lb1oDzey=55Qg@mail.gmail.com' \
    --to=freakpv@gmail.com \
    --cc=antonio.di-bacco@keysight.com \
    --cc=users@dpdk.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK usage discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.dpdk.org/users/0 users/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 users users/ http://inbox.dpdk.org/users \
	public-inbox-index users

Example config snippet for mirrors.
Newsgroup available over NNTP:

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git