I took a look at the actual port number being passed to cached pkey, port->port_num, and in the unmodified code the result from cm_find_port() has port_num set as 0, which seems incorrect since port numbering should be 1 based, right?
The cached functions are supposed to be 1 based, so that is correct.
If you walk through the following functions:
cm_add_one: records port_num as 1 based
cm_init_av: calls cm_find_port
cm_find_port: calls ib_find_cached_gid
ib_find_cached_gid: returns 0 based port_num
cm_find_port: uses returned port_num - 1 as an index into an array. This should walk off into oblivion if port_num is 0. (I should probably check that the returned port_num is > 0.)
ib_find_cached_pkey: uses the port returned from cm_find_port, which is off in space somewhere
At least that's what I think is happening.
- Sean _______________________________________________ openib-general mailing list [email protected] http://openib.org/mailman/listinfo/openib-general
To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
