[ofa-general] [PATCH] fix some ehca limits

Roland Dreier rdreier at cisco.com
Mon Oct 1 13:53:16 PDT 2007


 >  	props->max_sge         = min_t(int, rblock->max_sge, INT_MAX);
 >  	props->max_sge_rd      = min_t(int, rblock->max_sge_rd, INT_MAX);
 >  	props->max_cq          = min_t(int, rblock->max_cq, INT_MAX);
 > -	props->max_cqe         = min_t(int, rblock->max_cqe, INT_MAX);
 > +	props->max_cqe         = min_t(unsigned int, rblock->max_cqe, INT_MAX);
 >  	props->max_mr          = min_t(int, rblock->max_mr, INT_MAX);
 >  	props->max_mw          = min_t(int, rblock->max_mw, INT_MAX);
 > -	props->max_pd          = min_t(int, rblock->max_pd, INT_MAX);
 > -	props->max_ah          = min_t(int, rblock->max_ah, INT_MAX);
 > +	props->max_pd          = min_t(unsigned int, rblock->max_pd, INT_MAX);
 > +	props->max_ah          = min_t(unsigned int, rblock->max_ah, INT_MAX);
 >  	props->max_fmr         = min_t(int, rblock->max_mr, INT_MAX);

Seems like all these min_t(int, ..., INT_MAX) values are equally
buggy, right?  You're just fixing the two that happened to trigger but
I think they should all be cleaned up now that we noticed them.

 - R.



More information about the general mailing list