Re: [vpp-dev] gdb break point of plugin not hit

2018-05-29 Thread Harish Patil
Hi Damjan,

Some observations:

#1
gdb) set args unix { interactive cli-listen /run/vpp/cli.sock full-coredump
} plugin_path
/home/harish/vpp_0524/vpp/build-root/install-vpp_debug-native/sample-plugin/lib64/vpp_plugins
dpdk { uio-driver igb_uio dev :07:00.0 dev :07:00.1 }
(gdb) r
Starting program:
/home/harish/vpp_0524/vpp/./build-root/install-vpp_debug-native/vpp/bin/vpp
unix { interactive cli-listen /run/vpp/cli.sock full-coredump } plugin_path
/home/harish/vpp_0524/vpp/build-root/install-vpp_debug-native/sample-plugin/lib64/vpp_plugins
dpdk { uio-driver igb_uio dev :07:00.0 dev :07:00.1 }
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
vlib_plugin_early_init:356: plugin path
/home/harish/vpp_0524/vpp/build-root/install-vpp_debug-native/sample-plugin/lib64/vpp_plugins
load_one_plugin:184: Loaded plugin: sample_plugin.so (Sample of VPP Plugin)
vlib_call_all_config_functions: unknown input `dpdk  uio-driver igb_uio dev
:07:00.0 dev :07:00.1 '
[Inferior 1 (process 338072) exited with code 01]


#2 - Remove dpdk arguments
Break point is hit, but there are no 10G interfaces since dpdk argument
could not be passed via GDB.

(gdb) set args unix { interactive cli-listen /run/vpp/cli.sock
full-coredump } plugin_path
/home/harish/vpp_0524/vpp/build-root/install-vpp_debug-native/sample-plugin/lib64/vpp_plugins
(gdb) r
Starting program:
/home/harish/vpp_0524/vpp/./build-root/install-vpp_debug-native/vpp/bin/vpp
unix { interactive cli-listen /run/vpp/cli.sock full-coredump } plugin_path
/home/harish/vpp_0524/vpp/build-root/install-vpp_debug-native/sample-plugin/lib64/vpp_plugins
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
vlib_plugin_early_init:356: plugin path
/home/harish/vpp_0524/vpp/build-root/install-vpp_debug-native/sample-plugin/lib64/vpp_plugins
load_one_plugin:184: Loaded plugin: sample_plugin.so (Sample of VPP Plugin)

Breakpoint 1, sample_init (vm=0x77b9d400 )
at
/home/harish/vpp_0524/vpp/build-data/../src/examples/sample-plugin/sample/sample.c:205
205 {

(gdb) c
Continuing.
[New Thread 0x7fff82fc2700 (LWP 339053)]
_____   _  ___
 __/ __/ _ \  (_)__| | / / _ \/ _ \
 _/ _// // / / / _ \   | |/ / ___/ ___/
 /_/ /(_)_/\___/   |___/_/  /_/

DBGvpp# sh int
  Name   Idx   State  Counter
Count
local00down
DBGvpp#

So I still have issues.

Thanks,

Harish



On Tue, May 29, 2018 at 11:13 AM, Harish Patil  wrote:

> Hi Damjan,
> Thanks.
>
> Yes I do see show run hitting the sample plugin.
> I sent one ping packet request.
>
>
> sample   active  1   1
>   0  2.67e41.00
>
> I would like to stick to current version of VPP.
> Is there a known issue or something that need my VPP to be upgraded?
>
> Thanks.
> Harish
>
>
>
> On Sun, May 27, 2018 at 2:35 AM, Damjan Marion 
> wrote:
>
>> Do you see in "show run" output that sample plugin node was hit with some
>> packets?
>>
>> also, I suggest moving to newer version of vpp...
>>
>> --
>> Damjan
>>
>> On 25 May 2018, at 21:12, Harish Patil  wrote:
>>
>> Hi,
>>
>> I built VPP using  make -j  build TAG=vpp_debug with export
>> SAMPLE_PLUGIN=yes; The VPP release is origin/stable/1710. First I verified
>> that sample_plugin.so is loaded.
>>
>> [root@localhost vpp]# make run
>> ..
>> load_one_plugin:184: Loaded plugin: pppoe_plugin.so (PPPoE)
>> load_one_plugin:184: Loaded plugin: sample_plugin.so (Sample of VPP
>> Plugin)
>> ..
>>
>> Now when I try to put break point of a function in sample_plugin:
>>
>> [root@localhost vpp]# gdb  ./build-root/install-vpp_debu
>> g-native/vpp/bin/vpp
>> GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-64.el7
>> ..
>> ..
>> Reading symbols from /home/harish/vpp_0524/vpp/buil
>> d-root/install-vpp_debug-native/vpp/bin/vpp...done.
>> (gdb) b  sample_node_fn
>> Function "sample_node_fn" not defined.
>> Make breakpoint pending on future shared library load? (y or [n])
>>
>> 1) I selected y, but this future break point is never hit when the
>> traffic is sent when sample plugin is activated.
>>
>> 2) The other thing I tried is to manually load symbols of sample_plugin:
>>
>> (gdb) add-symbol-file ./build-root/install-vpp_debug
>> -native/sample-plugin/lib64/vpp_plugins/sample_plugin.so 
>> where TXT is the text address obtained from info sections.
>> But the break points applied seems to be set in incorrect locations, so
>> its never hit.
>>
>> Could you please help here?
>>
>> Thanks,
>>
>> Harish
>>
>>
>>
>>
>>
>>
>>
> 
>
>


Re: [vpp-dev] gdb break point of plugin not hit

2018-05-29 Thread Harish Patil
Hi Damjan,
Thanks.

Yes I do see show run hitting the sample plugin.
I sent one ping packet request.


sample   active  1   1
  0  2.67e41.00

I would like to stick to current version of VPP.
Is there a known issue or something that need my VPP to be upgraded?

Thanks.
Harish



On Sun, May 27, 2018 at 2:35 AM, Damjan Marion 
wrote:

> Do you see in "show run" output that sample plugin node was hit with some
> packets?
>
> also, I suggest moving to newer version of vpp...
>
> --
> Damjan
>
> On 25 May 2018, at 21:12, Harish Patil  wrote:
>
> Hi,
>
> I built VPP using  make -j  build TAG=vpp_debug with export
> SAMPLE_PLUGIN=yes; The VPP release is origin/stable/1710. First I verified
> that sample_plugin.so is loaded.
>
> [root@localhost vpp]# make run
> ..
> load_one_plugin:184: Loaded plugin: pppoe_plugin.so (PPPoE)
> load_one_plugin:184: Loaded plugin: sample_plugin.so (Sample of VPP Plugin)
> ..
>
> Now when I try to put break point of a function in sample_plugin:
>
> [root@localhost vpp]# gdb  ./build-root/install-vpp_
> debug-native/vpp/bin/vpp
> GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-64.el7
> ..
> ..
> Reading symbols from /home/harish/vpp_0524/vpp/
> build-root/install-vpp_debug-native/vpp/bin/vpp...done.
> (gdb) b  sample_node_fn
> Function "sample_node_fn" not defined.
> Make breakpoint pending on future shared library load? (y or [n])
>
> 1) I selected y, but this future break point is never hit when the traffic
> is sent when sample plugin is activated.
>
> 2) The other thing I tried is to manually load symbols of sample_plugin:
>
> (gdb) add-symbol-file ./build-root/install-vpp_debug-native/sample-plugin/
> lib64/vpp_plugins/sample_plugin.so 
> where TXT is the text address obtained from info sections.
> But the break points applied seems to be set in incorrect locations, so
> its never hit.
>
> Could you please help here?
>
> Thanks,
>
> Harish
>
>
>
>
>
> 
>
>
>


Re: [vpp-dev] gdb break point of plugin not hit

2018-05-27 Thread Damjan Marion
Do you see in "show run" output that sample plugin node was hit with some 
packets?

also, I suggest moving to newer version of vpp...

-- 
Damjan

> On 25 May 2018, at 21:12, Harish Patil  wrote:
> 
> Hi,
> 
> I built VPP using  make -j  build TAG=vpp_debug with export 
> SAMPLE_PLUGIN=yes; The VPP release is origin/stable/1710. First I verified 
> that sample_plugin.so is loaded. 
> 
> [root@localhost vpp]# make run
> ..
> load_one_plugin:184: Loaded plugin: pppoe_plugin.so (PPPoE)
> load_one_plugin:184: Loaded plugin: sample_plugin.so (Sample of VPP Plugin)
> ..
> 
> Now when I try to put break point of a function in sample_plugin: 
> 
> [root@localhost vpp]# gdb  ./build-root/install-vpp_debug-native/vpp/bin/vpp
> GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-64.el7
> ..
> ..
> Reading symbols from 
> /home/harish/vpp_0524/vpp/build-root/install-vpp_debug-native/vpp/bin/vpp...done.
> (gdb) b  sample_node_fn
> Function "sample_node_fn" not defined.
> Make breakpoint pending on future shared library load? (y or [n]) 
>
> 1) I selected y, but this future break point is never hit when the traffic is 
> sent when sample plugin is activated.
> 
> 2) The other thing I tried is to manually load symbols of sample_plugin:
> 
> (gdb) add-symbol-file 
> ./build-root/install-vpp_debug-native/sample-plugin/lib64/vpp_plugins/sample_plugin.so
>  
> where TXT is the text address obtained from info sections.
> But the break points applied seems to be set in incorrect locations, so its 
> never hit.
> 
> Could you please help here?
> 
> Thanks,
> 
> Harish
>
> 
> 
> 
> 
> 



[vpp-dev] gdb break point of plugin not hit

2018-05-25 Thread Harish Patil
Hi,

I built VPP using  make -j  build TAG=vpp_debug with export
SAMPLE_PLUGIN=yes; The VPP release is origin/stable/1710. First I verified
that sample_plugin.so is loaded.

[root@localhost vpp]# make run
..
load_one_plugin:184: Loaded plugin: pppoe_plugin.so (PPPoE)
load_one_plugin:184: Loaded plugin: sample_plugin.so (Sample of VPP Plugin)
..

Now when I try to put break point of a function in sample_plugin:

[root@localhost vpp]# gdb  ./build-root/install-vpp_debug-native/vpp/bin/vpp
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-64.el7
..
..
Reading symbols from
/home/harish/vpp_0524/vpp/build-root/install-vpp_debug-native/vpp/bin/vpp...done.
(gdb) b  sample_node_fn
Function "sample_node_fn" not defined.
Make breakpoint pending on future shared library load? (y or [n])

1) I selected y, but this future break point is never hit when the traffic
is sent when sample plugin is activated.

2) The other thing I tried is to manually load symbols of sample_plugin:

(gdb) add-symbol-file
./build-root/install-vpp_debug-native/sample-plugin/lib64/vpp_plugins/sample_plugin.so

where TXT is the text address obtained from info sections.
But the break points applied seems to be set in incorrect locations, so its
never hit.

Could you please help here?

Thanks,

Harish