-----Original Message-----
> Date: Sun, 26 Nov 2017 18:00:23 -0800
> From: Jia He <[email protected]>
> To: [email protected], [email protected],
> [email protected], [email protected]
> Cc: [email protected], [email protected], [email protected], Jia
> He <[email protected]>, Jia He <[email protected]>
> 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 <[email protected]>
> Suggested-by: Jerin Jacob <[email protected]>
> Suggested-by: Ananyev, Konstantin <[email protected]>
Wrong tag: complaint from checkpatch.
Suggested-by: Ananyev, Konstantin <[email protected]>
> ---
> + */
> +
> +#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 <[email protected]>