Subject: Re: [PATCH net-next v3] bnxt_en: New Broadcom ethernet driver.

From: Stephen Hemminger <[email-masked]>
Date: Sun, 18 Oct 2015 22:21:50 -0700

On Sat, 17 Oct 2015 00:21:44 -0400
Michael Chan <[email-masked]> wrote:

> +static inline u32 bnxt_tx_avail(struct bnxt *bp, struct bnxt_tx_ring_info *txr)
> +{
> +	/* Tell compiler to fetch tx indices from memory. */
> +	barrier();

Actually, you are telling compiler not to reorder. Which may not
be sufficient on some platforms. 

> +	return bp->tx_ring_size -
> +		((txr->tx_prod - txr->tx_cons) & bp->tx_ring_mask);
> +}