> 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: <vpp-dev@lists.fd.io> on behalf of Satya Murthy
> <satyamurthy1...@gmail.com>
> Date: Tuesday 24 March 2020 at 06:44
> To: "vpp-dev@lists.fd.io" <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]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to