Enhance vlib_buffer_clone to change headroom space for packet 20/18620/1
authorJohn Lo <loj@cisco.com>
Mon, 1 Apr 2019 15:30:07 +0000 (11:30 -0400)
committerJohn Lo <loj@cisco.com>
Mon, 1 Apr 2019 15:30:07 +0000 (11:30 -0400)
commitf545caada9fe764e296a4ff59bf3d333ce3cb08a
treec473dfc33b064082e9d90cccffd4cc5bd47094d3
parentac3b1139578b544cae3884548f455a1e7b4910f4
Enhance vlib_buffer_clone to change headroom space for packet

Add function vlib_buffer_clone_at_offset() so that the cloned
packets' 1st buffer will have the original packet header copied
at the specified offset (instead of current_data). This can be
used to increase headroom in the cloned packet to allow large
header encaps in case the stdandard 128B predata is not enough.
The original vlib_buffer_clone() still works the same as before.

Change-Id: I3b50c8ad7e3952568bc141710567c99a3dacddce
Signed-off-by: John Lo <loj@cisco.com>
src/vlib/buffer_funcs.h