From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: [PATCH 1/6] rte_mbuf: copy offload flags when doing attach/clone of mbuf Date: Fri, 07 Mar 2014 10:13:36 -0800 Message-ID: <20140307181421.045171437@vyatta.com> References: <20140307181335.024904493@vyatta.com> Cc: dev-VfR2kkLFssw@public.gmane.org, Stephen Hemminger To: "Venkatesan, Venky" Return-path: Content-Disposition: inline; filename=mbuf-ol-flags.patch List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 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 --- a/lib/librte_mbuf/rte_mbuf.h 2013-12-06 08:39:43.000000000 -0800 +++ b/lib/librte_mbuf/rte_mbuf.h 2014-03-06 15:16:44.525440437 -0800 @@ -624,6 +624,7 @@ static inline void rte_pktmbuf_attach(st 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);