[ofa-general] Re: [PATCH] IB/core user memory registrations

Roland Dreier rdreier at cisco.com
Wed May 9 20:00:58 PDT 2007


 > @@ -1020,7 +1020,7 @@ static struct ib_mr *mthca_reg_user_mr(s
 >  	int shift, n, len;
 >  	int i, j, k;
 >  	int err = 0;
 > -	int write_mtt_size;
 > +	int write_mtt_size = mthca_write_mtt_size(dev);
 >  
 >  	mr = kmalloc(sizeof *mr, GFP_KERNEL);
 >  	if (!mr)

Not sure I understand what this is fixing... can you be more explicit?
As far as I can see, the first use of write_mtt_size in mthca_reg_user_mr()
is the line

	write_mtt_size = min(mthca_write_mtt_size(dev), (int) (PAGE_SIZE / sizeof *pages));

so I'm not sure why we need another initialization?  (I'm looking at
Linus's latest tree, which contains the mlx4 merge)

 - R.



More information about the general mailing list