[ofa-general] Re: wmb missing in libmthca?
Michael S. Tsirkin
mst at dev.mellanox.co.il
Wed May 30 21:34:47 PDT 2007
> Quoting Roland Dreier <rdreier at cisco.com>:
> Subject: Re: wmb missing in libmthca?
>
> > Roland, I see this in kernel:
> >
> > ((struct mthca_next_seg *) prev_wqe)->nda_op =
> > cpu_to_be32((ind << qp->rq.wqe_shift) | 1);
> > wmb();
> > ((struct mthca_next_seg *) prev_wqe)->ee_nds =
> > cpu_to_be32(MTHCA_NEXT_DBD | size);
> >
> > but userspace does not have wmb here.
> > Is it needed?
>
> It does seem that way -- otherwise the hardware might read prev_wqe
> and see the ee_nds field as set before the nda_op field has the right
> variable. Does this look right to you as a libmthca fix?
Looks ok.
--
MST
More information about the general
mailing list