mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 06:15:47 +00:00
dp-packet: preserve headroom when cloning a pkt batch
The headroom is useful if the packet needs to insert additional header, so preserve the original headroom when cloning the batch. Signed-off-by: Flavio Leitner <fbl@sysclose.org> Tested-by: Ciara Loftus <ciara.loftus.intel.com> Acked-by: Ilya Maximets <i.maximets@ovn.org> Signed-off-by: Ian Stokes <ian.stokes@intel.com>
This commit is contained in:
committed by
Ian Stokes
parent
9d0fab9fcf
commit
d487718485
@@ -879,7 +879,11 @@ dp_packet_batch_clone(struct dp_packet_batch *dst,
|
||||
|
||||
dp_packet_batch_init(dst);
|
||||
DP_PACKET_BATCH_FOR_EACH (i, packet, src) {
|
||||
dp_packet_batch_add(dst, dp_packet_clone(packet));
|
||||
uint32_t headroom = dp_packet_headroom(packet);
|
||||
struct dp_packet *pkt_clone;
|
||||
|
||||
pkt_clone = dp_packet_clone_with_headroom(packet, headroom);
|
||||
dp_packet_batch_add(dst, pkt_clone);
|
||||
}
|
||||
dst->trunc = src->trunc;
|
||||
}
|
||||
|
Reference in New Issue
Block a user