[openib-general] Re: mthca_tavor_post_send() question
James Lentini
jlentini at netapp.com
Tue Jun 14 12:47:21 PDT 2005
On Tue, 14 Jun 2005, Roland Dreier wrote:
roland> James> In mthca_tavor_post_send() at line 1524 of
roland> James> hw/mthca/mthca_qp.c, an int variable, "ind", is used to
roland> James> store the unsigned "next_ind" value. Why does "ind" not
roland> James> need to represent all of the possible "next_ind" values?
roland> James> Should the type of "ind" also be unsigned?
roland>
roland> I don't think it makes much practical difference, since the largest
roland> value they'll store is 65535. It might be cleaner to change them to
roland> match, although I don't know which one should change.
I understand. The mthca_wq structure is used for both Tavor and Arbel,
so "next_ind" needs to be able to store the maximum number of work
requests supported by either chip.
I would suggest changing the "ind" variables type to unsigned so
someone reading the code for the first time doesn't get sidetracked by
it. As you say, this isn't of any practical importance.
james
More information about the general
mailing list