I have tried that now, and it's working.

Thanks,
Ewan



yug...@telincn.com
 
From: Damjan Marion
Date: 2017-01-16 23:16
To: yugang
CC: Dave Barach (dbarach); vpp-dev
Subject: Re: [vpp-dev] rte_timer

Have you considered to use process nodes instead?

If you search forvlib_process_suspend and vlib_process_wait_for_event_or_clock 
you will find many samples….

Thanks,

Damjan

On 16 Jan 2017, at 02:13, yug...@telincn.com wrote:

Thanks for your reply, Dave.
I would like to use dpdk timer api in vpp, and i don't know whether  there is a 
substitude.

Here is my code in vpp main func.
        rte_timer_subsystem_init();
/* init timer structures */
rte_timer_init(&vpptimer0);
/* load timer0, every second, on master lcore, reloaded automatically */
hz = rte_get_timer_hz();
lcore_id = rte_lcore_id();
rte_timer_reset(&vpptimer0, hz, PERIODICAL, lcore_id, vpp_timer0_cb, NULL);

And i got this Segmentation fault.

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x00000000004edde5 in rte_get_hpet_cycles () at 
/usr/src/VPP16/vpp1609/build-root/build-vpp-native/dpdk/dpdk-16.07/lib/librte_eal/linuxapp/eal/eal_timer.c:151
151 t = eal_hpet->counter_l;
Missing separate debuginfos, use: debuginfo-install 
glibc-2.17-157.el7_3.1.x86_64 openssl-libs-1.0.1e-60.el7.x86_64 
zlib-1.2.7-17.el7.x86_64
(gdb) bt
#0  0x00000000004edde5 in rte_get_hpet_cycles () at 
/usr/src/VPP16/vpp1609/build-root/build-vpp-native/dpdk/dpdk-16.07/lib/librte_eal/linuxapp/eal/eal_timer.c:151
#1  0x000000000050681f in rte_get_timer_cycles () at 
/usr/src/VPP16/vpp1609/build-root/install-vpp-native/dpdk/include/generic/rte_cycles.h:158
#2  rte_timer_reset (tim=tim@entry=0xa73b20 <vpptimer0>, ticks=ticks@entry=0, 
type=type@entry=PERIODICAL, tim_lcore=4294967295, fct=fct@entry=0x54d9e0 
<vpp_timer0_cb>, arg=arg@entry=0x0)
    at 
/usr/src/VPP16/vpp1609/build-root/build-vpp-native/dpdk/dpdk-16.07/lib/librte_timer/rte_timer.c:431
#3  0x000000000040fe53 in main (argc=26, argv=0xb08810) at 
/usr/src/VPP16/vpp1609/build-data/../vpp/vnet/main.c:271
(gdb) 


yug...@telincn.com
 
From: Dave Barach (dbarach)
Date: 2017-01-15 21:45
To: yug...@telincn.com; vpp-dev
Subject: RE: [vpp-dev] rte_timer
Vpp already calls rte_eal_init(...) in .../src/vnet/dpdk/init.c:dpdk_config(). 
Please don’t call rte_eal_init(..) elsewhere, it simply won’t work.
 
At a higher level: what are you trying to do? It’s hard to provide meaningful 
help with so little information.  
 
Thanks… Dave
 
From: vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] On 
Behalf Of yug...@telincn.com
Sent: Sunday, January 15, 2017 6:38 AM
To: vpp-dev <vpp-dev@lists.fd.io>
Subject: [vpp-dev] rte_timer
 
Hi, all.
If i would like to use dpdk timer, what extra configuration  i need to make?
Since that if i just call func "   rte_eal_init(argc, argv)" in vpp,  it always 
reminds me that there is not enough DPDK mem, why?
 
Regards,
Ewan.


yug...@telincn.com
_______________________________________________
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

_______________________________________________
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Reply via email to