[openib-general] Re: [PATCH] mthca: fix posting long work request lists

Michael S. Tsirkin mst at mellanox.co.il
Wed Nov 9 14:22:01 PST 2005


Quoting r. Roland Dreier <rolandd at cisco.com>:
> Subject: Re: [PATCH] mthca: fix posting long work request lists
> 
>     Michael> this one's wrong. nreq will overflow into bit 8.  You
>     Michael> want to put 0 there since we know nreq is 256:
>     Michael> doorbell[1] = cpu_to_be32(qp->qpn << 8);
> 
> Thanks, fixed both places.
> 
>     Michael> I know I did it differently, but I now think its better
>     Michael> to replace nreq with MTHCA_TAVOR_MAX_WQES_PER_RECV_DB in
>     Michael> the line above since wmb should prevent gcc from knowing
>     Michael> the value of nreq here or storing it in a register.
> 
> Good idea.
> 
> How's this:

Looks good. You didnt post the userspace part, I guess it would
be the same.
I'm going to sleep now.

-- 
MST



More information about the general mailing list