[openib-general] Re: [PATCH] mthca - optimize sinai large message

Roland Dreier rdreier at cisco.com
Wed Mar 1 14:32:53 PST 2006


 > +	/* for Sinai MPT table must be smaller the 2^24 for optimized oprtatipn */
 > +	if ((dev->mthca_flags & MTHCA_FLAG_SINAI_OPT) && init_hca->log_mpt_sz > 23) {
 > +		total_size = -ENOSYS;
 > +		mthca_err(dev, "MPT table too large\n");
 > +		goto exit;
 > +	}

Do we really want to give up if someone wants to use a large MPT
table?  It seems we should just disable the optimization in this case.

 > +	[SINAI]        = { .latest_fw = MTHCA_FW_VER(1, 0, 1), .is_memfree = 1, .is_pcie = 1, .mkey_opt = 1 }

...

 >  		mdev->mthca_flags |= MTHCA_FLAG_MEMFREE;
 >  	if (mthca_hca_table[id->driver_data].is_pcie)
 >  		mdev->mthca_flags |= MTHCA_FLAG_PCIE;
 > +	if (mthca_hca_table[id->driver_data].mkey_opt)
 > +		mdev->mthca_flags |= MTHCA_FLAG_SINAI_OPT;

This is starting to look kind of unwieldy.  Maybe it would be cleaner
to switch over to having the initial flags in the table, rather than
separate flag members?  (I know, I was the one that started down this
road but now I don't think I like where it's leading us)

 - R.



More information about the general mailing list