-----Original Message----- > Date: Sun, 26 Nov 2017 18:00:23 -0800 > From: Jia He <hejia...@gmail.com> > To: jerin.ja...@caviumnetworks.com, dev@dpdk.org, > bruce.richard...@intel.com, konstantin.anan...@intel.com > Cc: olivier.m...@6wind.com, jianbo....@arm.com, hemant.agra...@nxp.com, Jia > He <hejia...@gmail.com>, Jia He <jia...@hxt-semitech.com> > Subject: [PATCH V6 2/3] ring: introduce new header file to include common > functions > X-Mailer: git-send-email 2.7.4 > > move the common part of rte_ring.h into rte_ring_generic.h. > move the memory barrier part into update_tail(). > > no functional changes here. > > Signed-off-by: Jia He <jia...@hxt-semitech.com> > Suggested-by: Jerin Jacob <jerin.ja...@caviumnetworks.com> > Suggested-by: Ananyev, Konstantin <konstantin.anan...@intel.com>
Wrong tag: complaint from checkpatch. Suggested-by: Ananyev, Konstantin <konstantin.anan...@intel.com> > --- > + */ > + > +#ifndef _RTE_RING_GENERIC_H_ > +#define _RTE_RING_GENERIC_H_ > + > +static __rte_always_inline void > +update_tail(struct rte_ring_headtail *ht, uint32_t old_val, uint32_t new_val, > + uint32_t single, uint32_t enqueue) > +{ How about making enqueue as const. ie. const uint32_t enqueue ? > + if (enqueue) > + rte_smp_wmb(); > + else > + rte_smp_rmb(); Other than that, it looks good to me. Acked-by: Jerin Jacob <jerin.ja...@caviumnetworks.com>