[ofa-general][PATCH] mlx4_core: Multi Protocol support

Roland Dreier rdreier at cisco.com
Wed Apr 16 11:52:27 PDT 2008


 > +	if (vector == 0) {
 > +		vector = priv->eq_table.last_comp_eq %
 > +			priv->eq_table.num_comp_eqs + 1;
 > +		priv->eq_table.last_comp_eq = vector;
 > +	}

The current IB code is written assuming that 0 is a normal completion
vector I think.  Making 0 be a special "round robin" value is a pretty
big change of policy.

Also there is no locking of last_comp_eq that I can see here, although
maybe it doesn't matter.

 > +	req_eqs = (dev->flags & MLX4_FLAG_MSI_X) ? num_online_cpus() : 1;

I don't think num_online_cpus() is the right thing really... what if a
CPU is hot-plugged later?  num_possible_cpus() seems better to me.

 - R.



More information about the general mailing list