DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Yeddula, Avinash" <ayeddula@ciena.com>
To: "dev@dpdk.org" <dev@dpdk.org>
Subject: [dpdk-dev] RTE TIMER LIBRARY
Date: Thu, 18 Jun 2015 20:57:45 -0400	[thread overview]
Message-ID: <A1E50D8AD6310E47A6C10F075AEDC02201A0AB27FA@ONWVEXCHMB01.ciena.com> (raw)

Hello Dpdk-team,

I have few very basic questions.  In the DPDK timer sample application, the periodic timer0's callback function is not called unless "rte_timer_manage()" is called. I understand rte_timer_manage() function looks at all the expired timers in the core and runs them.

Here are my questions:

1.      If I comment out the rte_timer_manage() function in the code, time0_cb function is not getting called at all.  Why is this ?
       I see some documentation saying if they are in Running state the timer would fail, what exactly does this mean, could you please provide more details.

2.      Is it mandatory to call rte_timer_manage to trigger for the dpdk timers  when they expire?

3.      I see this point "The Timer library provides a timer service to Intel(r) DPDK execution units to enable execution of callback functions asynchronously." What does asynchronously means ?

For example, I just have 1 worker thread  in my application and the periodic timer expired and the corresponding call back function has to be executed. Now does the worker thread  stop what it is doing now and starts executing timer's callback function  or how does it work.

I apologies if the questions are very basic and doesn't make sense.

Thanks
-Avinash

PS: I modified the app to make it run only on 1 core. Here is the output when it runs on one core. Let me know if I'm doing something wrong.

[root@localhost timer]# ./build/timer -c 1 -n 1
EAL: Requesting 1024 pages of size 2MB from socket 0
EAL: TSC frequency is ~2399986 KHz
EAL: Master lcore 0 is ready (tid=adaa8c0;cpuset=[0])
EAL: PCI device 0000:00:14.0 on NUMA socket -1
EAL:   probe driver: 8086:1f41 rte_igb_pmd
EAL:   PCI memory mapped at 0x7f4b08e00000
EAL:   PCI memory mapped at 0x7f4b08e20000
PMD: eth_igb_dev_init(): port_id 0 vendorID=0x8086 deviceID=0x1f41
EAL: PCI device 0000:00:14.1 on NUMA socket -1
EAL:   probe driver: 8086:1f41 rte_igb_pmd
EAL:   PCI memory mapped at 0x7f4b08e24000
EAL:   PCI memory mapped at 0x7f4b08e44000
PMD: eth_igb_dev_init(): port_id 1 vendorID=0x8086 deviceID=0x1f41
EAL: PCI device 0000:00:14.2 on NUMA socket -1
EAL:   probe driver: 8086:1f41 rte_igb_pmd
EAL:   PCI memory mapped at 0x7f4b08e48000
EAL:   PCI memory mapped at 0x7f4b08e68000
PMD: eth_igb_dev_init(): port_id 2 vendorID=0x8086 deviceID=0x1f41
EAL: PCI device 0000:00:14.3 on NUMA socket -1
EAL:   probe driver: 8086:1f41 rte_igb_pmd
EAL:   Not managed by a supported kernel driver, skipped
Starting mainloop on core 0
timer0_cb() on lcore 0
timer0_cb() on lcore 0
timer0_cb() on lcore 0

             reply	other threads:[~2015-06-19  0:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-19  0:57 Yeddula, Avinash [this message]
2015-06-19 10:14 ` Bruce Richardson
2015-06-19 14:55 ` 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:
  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=A1E50D8AD6310E47A6C10F075AEDC02201A0AB27FA@ONWVEXCHMB01.ciena.com \
    --to=ayeddula@ciena.com \
    --cc=dev@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).