Re: [PATCH rdma-core 04/11] libbnxtre: Add support for posting and polling

Jason Gunthorpe
2017-01-29T23:43:38Z

On Sat, Jan 28, 2017 at 05:13:35PM -0500, Devesh Sharma wrote:

> +#define true 1
> +#define false 0

Nope, delete.

> +
> +static void bnxt_re_ring_db(struct bnxt_re_dpi *dpi,
> + struct bnxt_re_db_hdr *hdr)
> +{
> + uint64_t *dbval = (uint64_t *)&hdr->indx;
> +
> + /*TODO: cpu_to_le64 */
> + pthread_spin_lock(&dpi->db_lock);
> + iowrite64(dpi->dbpage, dbval);
> + /* write barrier */
> + wmb();
> + pthread_spin_unlock(&dpi->db_lock);

That wmb sure looks like it is in the wrong place. Better check them all..

Jason