diff mbox

[ovs-dev,v2] dp-packet: Copy trunc flag on batch clone.

Message ID 1498820414-1782-1-git-send-email-i.maximets@samsung.com
State Accepted
Headers show

Commit Message

Ilya Maximets June 30, 2017, 11 a.m. UTC
Without this applying of the cutlen action will not work
on copied batch. Cutlen works for linux and dummy netdevs
only because they tries to apply it per-packet inside
send function.

Cutlen action doesn't work for dpdk ports in case batch clone
occured because invoked by the 'dp_packet_batch_apply_cutlen()'.

CC: Andy Zhou <azhou@ovn.org>
Fixes: 72c84bc2db23 ("dp-packet: Enhance packet batch APIs.")
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
---
 lib/dp-packet.h | 1 +
 1 file changed, 1 insertion(+)

Comments

Andy Zhou July 3, 2017, 11:15 p.m. UTC | #1
On Fri, Jun 30, 2017 at 4:00 AM, Ilya Maximets <i.maximets@samsung.com> wrote:
> Without this applying of the cutlen action will not work
> on copied batch. Cutlen works for linux and dummy netdevs
> only because they tries to apply it per-packet inside
> send function.
>
> Cutlen action doesn't work for dpdk ports in case batch clone
> occured because invoked by the 'dp_packet_batch_apply_cutlen()'.
>
> CC: Andy Zhou <azhou@ovn.org>
> Fixes: 72c84bc2db23 ("dp-packet: Enhance packet batch APIs.")
> Signed-off-by: Ilya Maximets <i.maximets@samsung.com>

Acked-by: Andy Zhou <azhou@ovn.org>

Thanks for the fix! Pushed to master.
diff mbox

Patch

diff --git a/lib/dp-packet.h b/lib/dp-packet.h
index d2549b1..38282bd 100644
--- a/lib/dp-packet.h
+++ b/lib/dp-packet.h
@@ -739,6 +739,7 @@  dp_packet_batch_clone(struct dp_packet_batch *dst,
     DP_PACKET_BATCH_FOR_EACH (packet, src) {
         dp_packet_batch_add(dst, dp_packet_clone(packet));
     }
+    dst->trunc = src->trunc;
 }
 
 static inline void