Hi all,

I'd like some feedback about the VLIB_BUFFER_TRACE_TRAJECTORY debug feature in 
VPP.
The goal of this feature is to save the nodes traversed by a buffer in the 
buffer metadata (opaque2->trajectory) for debug purpose.

As far as I can see, it is broken as soon as the buffer is copied/cloned or 
similar, as the pointer to the vector used to save the trajectory is now shared 
by multiple buffers.
Basically anything copying opaque2 blindly will break it, eg.
 - vlib_buffer_copy() and friends, eg. 
https://git.fd.io/vpp/tree/src/vlib/buffer_funcs.h#n1071
 - arp/ipv6 nd nodes: 
https://git.fd.io/vpp/tree/src/vnet/ip-neighbor/ip4_neighbor.c#n225 and 
https://git.fd.io/vpp/tree/src/vnet/ip-neighbor/ip6_neighbor.c#n221

Any idea? Maybe the easiest way to fix it would be to grow the vlib_buffer_t 
metadata when it is enabled, so that we can stash the node indices directly in 
the buffer metadata instead of relying on an external vector?

Best
ben
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18674): https://lists.fd.io/g/vpp-dev/message/18674
Mute This Topic: https://lists.fd.io/mt/80383584/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