Message ID | 1498820414-1782-1-git-send-email-i.maximets@samsung.com |
---|---|
State | Accepted |
Headers | show |
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 --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
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(+)