diff mbox

[ovs-dev] dp-packet: Copy trunc flug on batch clone.

Message ID 1498817154-1276-1-git-send-email-i.maximets@samsung.com
State Superseded
Headers show

Commit Message

Ilya Maximets June 30, 2017, 10:05 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 batch apply action.

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

Ilya Maximets June 30, 2017, 10:56 a.m. UTC | #1
Sorry for the typo in the subject. I'll respin with only that change.
s/flug/flag/.

On 30.06.2017 13:05, Ilya Maximets 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 batch apply action.
> 
> 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(+)
> 
> 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
>
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