From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bruce Richardson Subject: Re: [PATCH 1/2] ixgbe: fix setup of mbuf initializer template Date: Thu, 4 Dec 2014 14:39:31 +0000 Message-ID: <20141204143930.GA9300@bricha3-MOBL3> References: <1417703181-23093-1-git-send-email-jean-mickael.guerin@6wind.com> <1417703181-23093-2-git-send-email-jean-mickael.guerin@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev-VfR2kkLFssw@public.gmane.org To: Jean-Mickael Guerin Return-path: Content-Disposition: inline In-Reply-To: <1417703181-23093-2-git-send-email-jean-mickael.guerin-pdR9zngts4EAvxtiuMwx3w@public.gmane.org> 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" On Thu, Dec 04, 2014 at 03:26:20PM +0100, Jean-Mickael Guerin wrote: > Add a compiler barrier to make sure all fields covered by > the marker rearm_data are assigned before the read. > > Signed-off-by: Jean-Mickael Guerin > Acked-by: David Marchand > Fixes: 0ff3324da2 ("ixgbe: rework vector pmd following mbuf changes") Acked-by: Bruce Richardson > --- > lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c b/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c > index 579bc46..c1b5a78 100644 > --- a/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c > +++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c > @@ -739,6 +739,9 @@ ixgbe_rxq_vec_setup(struct igb_rx_queue *rxq) > mb_def.buf_len = rxq->mb_pool->elt_size - sizeof(struct rte_mbuf); > mb_def.port = rxq->port_id; > rte_mbuf_refcnt_set(&mb_def, 1); > + > + /* prevent compiler reordering: rearm_data covers previous fields */ > + rte_compiler_barrier(); > rxq->mbuf_initializer = *((uint64_t *)&mb_def.rearm_data); > return 0; > } > -- > 2.1.3 >