[vpp-dev] Flowprobe/IPFIX export

2019-01-24 Thread Harish Patil
Hi,
Need few clarifications on IPFIX support in the latest VPP. I went thru'
codebase of older releases and understand how IPFIX support has evolved
from 16.09 thru' the latest, in terms of enhancements and refactoring from
vnet/vnet/flow,classify to flowperpkt plugin and now as flowprobe plugin.

With latest VPP, I have few questions:
1) Flowprobe depends on vnet/ipfix-export for exporting flow data(template
rewrite etc). But does flowprobe depend on VPP classifiers anymore, i.e.
does it expect to create classifier table/session for flow matching? Where
is the hash/lookup done?
2) Flowprobe seems TX only feature, is it supported for RX also?
3) What does it exactly mean  "plugin generates ipfix flow records on
interfaces which have the feature enabled"? Does it mean flow records are
generated for "all" flows on that particular interface or can we
selectively enable flow record generation on only specified flows?
Thanks,

harish
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#11998): https://lists.fd.io/g/vpp-dev/message/11998
Mute This Topic: https://lists.fd.io/mt/29533414/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] VNET classifier table/session

2019-01-18 Thread Harish Patil
Hi Andrew/all,
I was going thru' some of the code/doc pointers.
As I said I'm using relatively older VPP releases (16.09/17.01).
With regards to IPFIX (using VNET classifier functionality),  I do not see
any support for sending real flow statistics via IPFIX templates.
I just see that plain IPFIX templates can be sent out periodically to the
collector but with no other information entities (except packetTotalCount
which is manually calculated).
So I am trying to know what is the minimum version we need to move forward
with in order to claim basic IPFIX support? I see that 17.07 release added
FlowProbe plugin which implements some of the information entities.
Pls let me know.
Thanks,

Harish

On Tue, Jan 15, 2019 at 9:45 AM Harish Patil  wrote:

> Hi Andrew,
> Thanks much for the pointers.
> Shall go thru' them and revert back if I have further questions.
> Thanks,
>
> Harish
>
> On Tue, Jan 15, 2019 at 2:56 AM Andrew  Yourtchenko 
> wrote:
>
>> Hi Harish,
>>
>> A few links that might be helpful:
>>
>> https://wiki.fd.io/view/VPP/Introduction_To_N-tuple_Classifiers ?
>>
>> https://wiki.fd.io/view/VPP/SecurityGroups#Existing_functionality
>>
>> It talks about it more from the code perspective but hopefully this
>> should clarify things how it all works underneath...
>>
>> And an example with CLI syntax for use of classifier with IPFIX:
>>
>> https://www.mail-archive.com/vpp-dev@lists.fd.io/msg01820.html
>>
>> --a
>>
>> On 15 Jan 2019, at 08:11, Harish Patil  wrote:
>>
>> Hi,
>>
>> Can you please provide few examples (with right syntax and little
>> explanation) on to how to use VNET classify table and classify session in
>> relatively older VPP releases.
>>
>>  "classify table [miss-next|l2-miss_next|acl-miss-next ]"
>>  "\n mask  buckets  [skip ] [match ] [del]",
>>
>>
>> "classify session [hit-next|l2-hit-next|acl-hit-next ]"
>>"\n table-index  match [hex] [l2] [l3 ip4] [opaque-index ]",
>> Thanks,
>>
>> Harish
>>
>> -=-=-=-=-=-=-=-=-=-=-=-
>> Links: You receive all messages sent to this group.
>>
>> View/Reply Online (#11918): https://lists.fd.io/g/vpp-dev/message/11918
>> Mute This Topic: https://lists.fd.io/mt/29122272/675608
>> Group Owner: vpp-dev+ow...@lists.fd.io
>> Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [ayour...@gmail.com]
>> -=-=-=-=-=-=-=-=-=-=-=-
>>
>>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#11956): https://lists.fd.io/g/vpp-dev/message/11956
Mute This Topic: https://lists.fd.io/mt/29122272/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] VNET classifier table/session

2019-01-15 Thread Harish Patil
Hi Andrew,
Thanks much for the pointers.
Shall go thru' them and revert back if I have further questions.
Thanks,

Harish

On Tue, Jan 15, 2019 at 2:56 AM Andrew  Yourtchenko 
wrote:

> Hi Harish,
>
> A few links that might be helpful:
>
> https://wiki.fd.io/view/VPP/Introduction_To_N-tuple_Classifiers ?
>
> https://wiki.fd.io/view/VPP/SecurityGroups#Existing_functionality
>
> It talks about it more from the code perspective but hopefully this should
> clarify things how it all works underneath...
>
> And an example with CLI syntax for use of classifier with IPFIX:
>
> https://www.mail-archive.com/vpp-dev@lists.fd.io/msg01820.html
>
> --a
>
> On 15 Jan 2019, at 08:11, Harish Patil  wrote:
>
> Hi,
>
> Can you please provide few examples (with right syntax and little
> explanation) on to how to use VNET classify table and classify session in
> relatively older VPP releases.
>
>  "classify table [miss-next|l2-miss_next|acl-miss-next ]"
>  "\n mask  buckets  [skip ] [match ] [del]",
>
>
> "classify session [hit-next|l2-hit-next|acl-hit-next ]"
>"\n table-index  match [hex] [l2] [l3 ip4] [opaque-index ]",
> Thanks,
>
> Harish
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
>
> View/Reply Online (#11918): https://lists.fd.io/g/vpp-dev/message/11918
> Mute This Topic: https://lists.fd.io/mt/29122272/675608
> Group Owner: vpp-dev+ow...@lists.fd.io
> Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [ayour...@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#11928): https://lists.fd.io/g/vpp-dev/message/11928
Mute This Topic: https://lists.fd.io/mt/29122272/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[vpp-dev] VNET classifier table/session

2019-01-14 Thread Harish Patil
Hi,

Can you please provide few examples (with right syntax and little
explanation) on to how to use VNET classify table and classify session in
relatively older VPP releases.

 "classify table [miss-next|l2-miss_next|acl-miss-next ]"
 "\n mask  buckets  [skip ] [match ] [del]",


"classify session [hit-next|l2-hit-next|acl-hit-next ]"
   "\n table-index  match [hex] [l2] [l3 ip4] [opaque-index ]",
Thanks,

Harish
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#11918): https://lists.fd.io/g/vpp-dev/message/11918
Mute This Topic: https://lists.fd.io/mt/29122272/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] Heap allocation

2018-12-05 Thread Harish Patil
Hi Dave,
Great, thanks for the quick reply.
Thanks for clarifying the same, I tried out a quick example and it seems
okay.

Harish
On Wed, Dec 5, 2018 at 1:52 PM Dave Barach (dbarach) 
wrote:

> You can have as many heaps as you need. There is no inherent limit. The
> constant CLIB_MAX_MHEAPS has to do with the number of distinct thread-id’s
> which os_get_thread_index() will return.
>
>
>
> This guitar-lick means “temporarily use the supplied heap for all
> allocations”:
>
>
>
>   void *oldheap = clib_mem_set_heap (heap);
>
>   pool_get() / vec_validate() / clib_mem_alloc() etc. as desired
>
>   clib_mem_set_heap(oldheap); // back to the previous heap, usually the
> shared global heap...
>
>
>
> Required when allocating / free memory in the binary API segment, and in
> private heaps.
>
>
>
> Note that clib_mem_alloc() and variants mean “allocate memory from the
> current per-thread heap,” which is easily changed for a moment as shown
> above.
>
>
>
> Please read through src/vppinfra/{mem.h, dlmalloc.[ch]} carefully and
> understand what’s going on before you jump in.
>
>
>
> D.
>
>
>
> *From:* vpp-dev@lists.fd.io  *On Behalf Of *Harish
> Patil
> *Sent:* Wednesday, December 5, 2018 4:31 PM
> *To:* vpp-dev@lists.fd.io
> *Subject:* [vpp-dev] Heap allocation
>
>
>
> Hi,
>
>
>
> I would like to pre-allocate separate heap space (outside of main heap)
> and be able to use the returned memory for my application's memory needs
> (just like malloc()). It seems we can have up to 256 heaps. Have few
> questions around this:
>
>
>
> 1) My understanding is that currently the main heap is allocated using
> clib_mem_init()/clib_mem_init_thread_safe() and the subsequent calls like
> clib_mem_alloc(size) will carve out memory from within the main heap and
> returned to clients (similar to glibc malloc()). Is this correct? If so, I
> would like to know how this is achieved since I don't see the returned
> pointer from clib_mem_init()/clib_mem_init_thread_safe() is being
> referenced or used anywhere.
>
>
>
> 2) Some applications are using mheap_alloc() directly to create new heap.
>
> Ex:
>
> void *heap;
>
> void *oldheap;
>
> heap = mheap_alloc (0, 10<<20);
>
> oldheap = clib_mem_set_heap (heap);
>
> ..
>
> ..
>
> clib_mem_set_heap (oldheap); << why is this required to write back oldheap
> into per-cpu heap?
>
>
>
> What I really like to know is once the heap is allocated how can we use
> it? Does it imply to have pools/hashes to be created to be able to use it?
> I'm expecting something which takes void *heap (created using mheap_alloc)
> and returns the requested memory for a given size from within the heap so
> that we don't need to use pools/hashes.
>
> Ex: void *foobar(void *mheap, size_t size);
>
> Is it possible?
>
> Thanks,
>
>
>
> Harish
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#11505): https://lists.fd.io/g/vpp-dev/message/11505
Mute This Topic: https://lists.fd.io/mt/28617718/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[vpp-dev] Heap allocation

2018-12-05 Thread Harish Patil
Hi,

I would like to pre-allocate separate heap space (outside of main heap) and
be able to use the returned memory for my application's memory needs (just
like malloc()). It seems we can have up to 256 heaps. Have few questions
around this:

1) My understanding is that currently the main heap is allocated using
clib_mem_init()/clib_mem_init_thread_safe() and the subsequent calls like
clib_mem_alloc(size) will carve out memory from within the main heap and
returned to clients (similar to glibc malloc()). Is this correct? If so, I
would like to know how this is achieved since I don't see the returned
pointer from clib_mem_init()/clib_mem_init_thread_safe() is being
referenced or used anywhere.

2) Some applications are using mheap_alloc() directly to create new heap.
Ex:
void *heap;
void *oldheap;
heap = mheap_alloc (0, 10<<20);
oldheap = clib_mem_set_heap (heap);
..
..
clib_mem_set_heap (oldheap); << why is this required to write back oldheap
into per-cpu heap?

What I really like to know is once the heap is allocated how can we use it?
Does it imply to have pools/hashes to be created to be able to use it? I'm
expecting something which takes void *heap (created using mheap_alloc) and
returns the requested memory for a given size from within the heap so that
we don't need to use pools/hashes.
Ex: void *foobar(void *mheap, size_t size);
Is it possible?
Thanks,

Harish
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#11503): https://lists.fd.io/g/vpp-dev/message/11503
Mute This Topic: https://lists.fd.io/mt/28617718/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] Container Communication

2018-06-25 Thread Harish Patil
memif interface could be one other option.

Thanks,

Harish

On Mon, Jun 25, 2018 at 11:55 AM, .ılı.D'p@k.ılı. 
wrote:

> Hi Guys,
>
> I have a 3rd party app running as a container and i have vpp instance
> running as another container.
> What is the best way for packets to be sent over from vpp container to the
> 3rd party container?
> I could think of veth pairs as one solution.
> Is there a better solution like using docker's mmap or IPC mechanisms?
>
> Any thoughts a welcome.
>
> --
> Regards,
> Deepak Kumar Ch
>
> “We judge ourselves by our intentions and others by their actions.”-
> Stephen M.R. Covey
> 
>
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#9701): https://lists.fd.io/g/vpp-dev/message/9701
Mute This Topic: https://lists.fd.io/mt/22678563/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [vpp-dev] SPAN feature backport

2018-06-15 Thread Harish Patil
Hi Damjan,

Thanks for the response and your suggestions.
Yes I too noticed that buffer clone API like vlib_buffer_copy() is missing.
Let me check if there is a way out to move to newer VPP in our project.
Shall get back if we have more questions.

Thanks,
Harish






On Fri, Jun 15, 2018 at 8:46 AM, Damjan Marion  wrote:

>
> That's pretty bad idea. Beside feature arcs, SPAN is also using buffer
> cloning which is introduced post 16.06.
>
> 16.06 is very old release, not maintained, strongly suggest to move to new
> version...
>
>
> On 15 Jun 2018, at 17:07, Harish Patil  wrote:
>
> Hi,
>
> I are currently using VPP 16.06 release.
> We would like to enable SPAN feature (port mirroring) in 16.06, but it is
> available only in VPP 17.01 release and above. It seems SPAN module depends
> on vnet feature arc (vnet/feature/).
> So my question is can we bypass vnet feature arc using some workaround and
> backport it into 16.06? If so, how easy or difficult would be that?
> Are there any other alternates besides upgrading VPP?
>
> Thanks,
>
> Harish
>
>
> 
>
>
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#9630): https://lists.fd.io/g/vpp-dev/message/9630
Mute This Topic: https://lists.fd.io/mt/22296204/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[vpp-dev] SPAN feature backport

2018-06-15 Thread Harish Patil
Hi,

I are currently using VPP 16.06 release.
We would like to enable SPAN feature (port mirroring) in 16.06, but it is
available only in VPP 17.01 release and above. It seems SPAN module depends
on vnet feature arc (vnet/feature/).
So my question is can we bypass vnet feature arc using some workaround and
backport it into 16.06? If so, how easy or difficult would be that?
Are there any other alternates besides upgrading VPP?

Thanks,

Harish

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#9628): https://lists.fd.io/g/vpp-dev/message/9628
Mute This Topic: https://lists.fd.io/mt/22296204/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



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
>
>
>
>
>
> 
>
>
>


[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