DPDK usage discussions
 help / color / mirror / Atom feed
From: Archit Pandey <architpandeynitk@gmail.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: users@dpdk.org, "Mohit P. Tahiliani" <tahiliani@nitk.edu.in>,
	 Gokul Bargaje <gokulbargaje.182009@nitk.edu.in>,
	Tarun Anand <anandtarun2@gmail.com>,
	sanjana.krishnam@gmail.com
Subject: Re: [dpdk-users] Calling timers from a library
Date: Thu, 9 Apr 2020 21:18:45 +0530	[thread overview]
Message-ID: <CANtWViPn43OegajQ8XYQwyaVwVMsv1Td=w6UJ2ftWC1vtiMMdA@mail.gmail.com> (raw)
In-Reply-To: <20200409075708.6e4e3175@hermes.lan>

Thanks for the tip!

This was what I experienced when I ran a separate function with periodic
calls to rte_timer_manage(). The code would deadlock and stop executing
after a few seconds.

Is there a way to overcome this? Perhaps by passing the core numbers into
the library?

--
Archit Pandey
Senior Year Undergraduate Student
Department of Computer Science and Engineering
National Institute of Technology Karnataka
Surathkal, India

On Thu, 9 Apr 2020, 8:27 pm Stephen Hemminger, <stephen@networkplumber.org>
wrote:

> On Thu, 9 Apr 2020 11:37:12 +0530
> Archit Pandey <architpandeynitk@gmail.com> wrote:
>
> > Hello DPDK users,
> >
> > I'm building a library for DPDK which utilizes periodically called
> > functions using the dpdk timer facility. Currently, I'm using the master
> > core on an application to call timer_manage() and run the scheduled
> timers.
> >
> > My doubt is whether its possible to call timer_manage() from inside the
> > library to run the scheduled timers. This would allow for a much more
> > streamlined design. An issue which comes to mind is that my library is
> not
> > aware of the cores it is being run on, hence I cannot use
> > rte_eal_remote_launch() for a function that calls rte_timer_manage().
> >
> > Any help on how I can do this would be greatly appreciated!
> >
> > Thanks and regards,
> >
>
> In my experience, once you start running DPDK functions on
> non-DPDK threads lots of things can break. The DPDK threads are pinned
> to a core and therefore don't preempt each other. For non-DPDK threads
> they are not pinned; therefore a DPDK library or other code using
> rte_spinlocks can get preempted with and self-deadlock.
>

  reply	other threads:[~2020-04-09 15:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-09  6:07 Archit Pandey
2020-04-09 14:57 ` Stephen Hemminger
2020-04-09 15:48   ` Archit Pandey [this message]
2020-04-09 18:36     ` Stephen Hemminger
2020-04-10 16:27       ` Archit Pandey

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='CANtWViPn43OegajQ8XYQwyaVwVMsv1Td=w6UJ2ftWC1vtiMMdA@mail.gmail.com' \
    --to=architpandeynitk@gmail.com \
    --cc=anandtarun2@gmail.com \
    --cc=gokulbargaje.182009@nitk.edu.in \
    --cc=sanjana.krishnam@gmail.com \
    --cc=stephen@networkplumber.org \
    --cc=tahiliani@nitk.edu.in \
    --cc=users@dpdk.org \
    /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).