From: Stephen Hemminger Date: Fri, 7 Mar 2014 18:13:36 +0000 (-0800) Subject: mbuf: copy offload flags when doing attach/clone X-Git-Tag: spdx-start~10909 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=156705307c73a5fd69396a4786b8d5e55f00b537;p=dpdk.git 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 --- 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);