[openib-general] Re: Incoorect cm_find_port result.
Sean Hefty
mshefty at ichips.intel.com
Wed Jan 26 15:45:00 PST 2005
On Wed, 26 Jan 2005 12:49:21 -0800
Libor Michalek <libor at topspin.com> wrote:
> Sean,
>
> There is an inconsistency between the port returned by cm_find_port()
> and the port needed for ib_find_cached_pkey()
>
> cm_find_port() is using base 0 port numbering, while
> ib_find_cached_pkey() uses base 1 port numbering. If I make this change
> ib_send_cm_req() appears to work correctly:
I'm wondering if the issue isn't in ib_find_cached_gid instead. Can you
retest using this patch in place of yours?
Thanks,
Sean
Index: core/cache.c
===================================================================
--- core/cache.c (revision 1665)
+++ core/cache.c (working copy)
@@ -112,7 +112,7 @@ int ib_find_cached_gid(struct ib_device
cache = device->cache.gid_cache[p];
for (i = 0; i < cache->table_len; ++i) {
if (!memcmp(gid, &cache->table[i], sizeof *gid)) {
- *port_num = p;
+ *port_num = p + start_port(device);
if (index)
*index = i;
ret = 0;
More information about the general
mailing list