[openib-general] [PATCH][RFC] Put phys_port_cnt in device struct
Hal Rosenstock
halr at voltaire.com
Fri Nov 5 21:51:35 PST 2004
On Sat, 2004-11-06 at 00:39, Roland Dreier wrote:
> It seems that there are lots of places where consumers need to
> allocate an entire ib_device_attr struct and deal with the possibility
> that ib_query_device() might fail, just to find out how many ports a
> device has.
Yes, I noticed this when I added yet another case of this earlier
today/yesterday. You beat me to this :-)
> We discussed this before and concluded that it was OK to
> assume that the number of physical ports is constant.
Agreed.
> This patch simplifies a lot of code by making phys_port_cnt a field in
> struct ib_device, so consumers can just read the value when they need it.
>
> Does this look good to commit?
Looks good. Do you want me to try it (tomorrow/today depending on your
time zone before committing it) ?
-- Hal
More information about the general
mailing list