If VPP doesn’t have an elegant way, note, a networking forwarding asic (e.g., switching asic) usually maintains two copies of headers of a packet. One copy has all the original headers and the other copy is modified in the data path. The asic should know what happened to the copy and provide that info, the original header, and the copy, to the user. Then, the user knows what header to inset at egress with VPP.
Hemant From: [email protected] <[email protected]> On Behalf Of David Gohberg Sent: Monday, April 12, 2021 6:51 AM To: [email protected] Subject: Re: [vpp-dev] vlib_buffer_clone behavior when trying to send to two interfaces Damjan, After looking at the vlib_buffer_clone_256 function I realize that it modifies the original buffer pointer, like you said. my packets are coming in down a custom node path (originating from an asic data plane), so they will always have the l2 header. The node that performs the cloning is the last stop before packets get sent to the hardware interface. Is there an "elegant" way to always get a buffer that points to the start of the packet data, regardless of vlan tags and other encapsulations?
smime.p7s
Description: S/MIME cryptographic signature
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#19180): https://lists.fd.io/g/vpp-dev/message/19180 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]] -=-=-=-=-=-=-=-=-=-=-=-
