From 156705307c73a5fd69396a4786b8d5e55f00b537 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Fri, 7 Mar 2014 10:13:36 -0800 Subject: [PATCH] mbuf: copy offload flags when doing attach/clone rte_pktmbuf_attach copies the packet meta data but does not copy the offload flags. This means that cloned packets lose their offload settings such as vlan tag. Signed-off-by: Stephen Hemminger Acked-by: Thomas Monjalon --- lib/librte_mbuf/rte_mbuf.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h index 954e990c5f..edffc2c4db 100644 --- a/lib/librte_mbuf/rte_mbuf.h +++ b/lib/librte_mbuf/rte_mbuf.h @@ -624,6 +624,7 @@ static inline void rte_pktmbuf_attach(struct rte_mbuf *mi, struct rte_mbuf *md) mi->pkt.next = NULL; mi->pkt.pkt_len = mi->pkt.data_len; mi->pkt.nb_segs = 1; + mi->ol_flags = md->ol_flags; __rte_mbuf_sanity_check(mi, RTE_MBUF_PKT, 1); __rte_mbuf_sanity_check(md, RTE_MBUF_PKT, 0); -- 2.20.1