Re: [vpp-dev] How to get source node of a buffer

2020-03-24 Thread Dave Barach via Lists.Fd.Io
See URL below.

The vpp packet dispatch tracer will show you everything you would want to know 
about the nodes visited by individual packets:

https://fd.io/docs/vpp/master/gettingstarted/developers/vnet.html#graph-dispatcher-pcap-tracing

This is a developer tool, not a tool for post-mortem analysis.

HTH... Dave

From: vpp-dev@lists.fd.io  On Behalf Of Neale Ranns via 
Lists.Fd.Io
Sent: Tuesday, March 24, 2020 4:06 AM
To: Satya Murthy ; vpp-dev@lists.fd.io
Cc: vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] How to get source node of a buffer

Hi Murthy,

There is no way to get the source node.
However, if you are debugging and you want to see the full history of the graph 
through which a packet has passed, you can turn on trajectory tracing.
#define VLIB_BUFFER_TRACE_TRAJECTORY 1
In vlib/buffer.h

/neale

From: mailto:vpp-dev@lists.fd.io>> on behalf of Satya 
Murthy mailto:satyamurthy1...@gmail.com>>
Date: Tuesday 24 March 2020 at 06:44
To: "vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>" 
mailto:vpp-dev@lists.fd.io>>
Subject: [vpp-dev] How to get source node of a buffer

Hi ,

Is there any way to find the source node of a buffer. Basically, I want to know 
from which node this buffer came.
I understand that each graph node shall have a design which is independant of 
the source node.
However, the source node information may be useful in case of debugging some 
crashes while processing a buffer.

Any inputs on this pls.

--
Thanks & Regards,
Murthy
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#15852): https://lists.fd.io/g/vpp-dev/message/15852
Mute This Topic: https://lists.fd.io/mt/72511630/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] How to get source node of a buffer

2020-03-24 Thread Satya Murthy
Thanks Neale for the quick inputs.

I am planning to add src_node index in the buffer metadata ( opaque2) for this 
purpose.
Hoping that this helps in our debugging.

--
Thanks & Regards,
Murthy
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#15850): https://lists.fd.io/g/vpp-dev/message/15850
Mute This Topic: https://lists.fd.io/mt/72511630/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] How to get source node of a buffer

2020-03-24 Thread Benoit Ganne (bganne) via Lists.Fd.Io
> There is no way to get the source node.
> However, if you are debugging and you want to see the full history of the
> graph through which a packet has passed, you can turn on trajectory
> tracing.
> #define VLIB_BUFFER_TRACE_TRAJECTORY 1
> In vlib/buffer.h

One issue I ran into you must be aware of is if buffer cloning happens you end 
up with 2 buffers using the same trajectory vector pointer in opaque2 - this 
did not ended well. I spent some time tracking all cloning to try to fix it w/o 
success in the past.
Another technique which does not require recompiling is to enable buffer traces 
and dump to stderr from gdb with 'call (void)gdb_show_traces()' but you'll have 
to enable it for each source node to identify the culprit...

ben

> From:  on behalf of Satya Murthy
> 
> Date: Tuesday 24 March 2020 at 06:44
> To: "vpp-dev@lists.fd.io" 
> Subject: [vpp-dev] How to get source node of a buffer
> 
> 
> 
> Hi ,
> 
> Is there any way to find the source node of a buffer. Basically, I want to
> know from which node this buffer came.
> I understand that each graph node shall have a design which is independant
> of the source node.
> However, the source node information may be useful in case of debugging
> some crashes while processing a buffer.
> 
> Any inputs on this pls.
> 
> --
> Thanks & Regards,
> Murthy

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

View/Reply Online (#15849): https://lists.fd.io/g/vpp-dev/message/15849
Mute This Topic: https://lists.fd.io/mt/72511630/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] How to get source node of a buffer

2020-03-24 Thread Neale Ranns via Lists.Fd.Io
Hi Murthy,

There is no way to get the source node.
However, if you are debugging and you want to see the full history of the graph 
through which a packet has passed, you can turn on trajectory tracing.
#define VLIB_BUFFER_TRACE_TRAJECTORY 1
In vlib/buffer.h

/neale

From:  on behalf of Satya Murthy 

Date: Tuesday 24 March 2020 at 06:44
To: "vpp-dev@lists.fd.io" 
Subject: [vpp-dev] How to get source node of a buffer

Hi ,

Is there any way to find the source node of a buffer. Basically, I want to know 
from which node this buffer came.
I understand that each graph node shall have a design which is independant of 
the source node.
However, the source node information may be useful in case of debugging some 
crashes while processing a buffer.

Any inputs on this pls.

--
Thanks & Regards,
Murthy
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

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


[vpp-dev] How to get source node of a buffer

2020-03-23 Thread Satya Murthy
Hi ,

Is there any way to find the source node of a buffer. Basically, I want to know 
from which node this buffer came.
I understand that each graph node shall have a design which is independant of 
the source node.
However, the source node information may be useful in case of debugging some 
crashes while processing a buffer.

Any inputs on this pls.

--
Thanks & Regards,
Murthy
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

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