Hemant,

in my case, VPP acts as a bump in the wire, not as an interface to an 
application, so my metadata about the original packet is limited.

Damjan,

the hack with reacquiring the pointer after the clone is working as expected.
I found an example using the L2 flag approach in src/vnet/interface_output.c in 
case people search this thread:

/*
* Typically, we'll need to rewind the buffer
* if l2_hdr_offset is valid, make sure to rewind to the start of
* the L2 header. This may not be the buffer start in case we pop-ed
* vlan tags.
* Otherwise, rewind to buffer start and hope for the best.
*/
if (b0->flags & VNET_BUFFER_F_L2_HDR_OFFSET_VALID)
{
if (b0->current_data > vnet_buffer (b0)->l2_hdr_offset)
vlib_buffer_advance (b0,
vnet_buffer (b0)->l2_hdr_offset -
b0->current_data);
}
else if (b0->current_data > 0)
vlib_buffer_advance (b0, (word) - b0->current_data);

Thank you guys for all the help. I must mention that this is one of the most 
user friendly open source communities I've encountered, especially when 
considering this projects size and complexity.
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#19182): https://lists.fd.io/g/vpp-dev/message/19182
Mute This Topic: https://lists.fd.io/mt/81938105/21656
Group Owner: [email protected]
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to