Before any clone, play with the buffer using vlib_buffer_advance() with a 
negative advance.  Try first with negative 20 because 20 is size of an IP 
header with no options.  You will see the output packet in tcpdump change. 
Then, see what is an appropriate advance for final code.



Hemant



From: vpp-dev@lists.fd.io <vpp-dev@lists.fd.io> On Behalf Of David Gohberg
Sent: Sunday, April 11, 2021 7:45 AM
To: vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] vlib_buffer_clone behavior when trying to send to two 
interfaces



Damjan's version works :) However, according to tcpdump the packet going to 
the host interface contains only IP information,
even though I'm cloning bi0 buffer which also contains the Ethernet header.
How do I make it send the entire raw packet to the host interface?

Attachment: smime.p7s
Description: S/MIME cryptographic signature

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