public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] librdmacm/mckey: enforce local binding for unmapped multicast addresses
@ 2009-11-01  9:31 Or Gerlitz
       [not found] ` <Pine.LNX.4.64.0911011130140.6591-aDiYczhfhVLdX2U7gxhm1tBPR1lH4CV8@public.gmane.org>
  0 siblings, 1 reply; 11+ messages in thread
From: Or Gerlitz @ 2009-11-01  9:31 UTC (permalink / raw)
  To: Sean Hefty; +Cc: linux-rdma

enforce local binding is specified for unmapped multicast addresses, otherwise mckey
crashes when attempting to use the cma_id->verbs pointer in the port query verb.

Signed-off-by: Or Gerlitz <ogerlitz-smomgflXvOZWk0Htik3J/w@public.gmane.org>

Sean, using unmapped multicast addresses I see that a different broacast group is
created by the SM such that mckey doesn't manage to join the ipv4 broadcast group

$ ./mckey -M ff12:401b:ffff:0:0:0:ffff:ffff -b 10.10.5.62 -p 0x2

mckey: joined dgid: ff12:401b:ffff:: mlid c00b sl 0

looking in the SA, I see that the MGID used by the rdma-cm is a bif different
from the one used by IPoIB, since the former uses/set only the lower 28 bits where
the latter sets the lower 32 bits for this mgid, any idea what can be  done here?

$ saquery $THIS_NODE_LID

MCMemberRecord group dump:
                MGID....................ff12:401b:ffff::ffff:ffff
                Mlid....................0xC000
                Mtu.....................0x84
                pkey....................0xFFFF
                Rate....................0x83
                SL......................0x0
....

MCMemberRecord group dump:
                MGID....................ff12:401b:ffff::fff:ffff
                Mlid....................0xC00B
                Mtu.....................0x84
                pkey....................0xFFFF
                Rate....................0x83
                SL......................0x0


Index: librdmacm/examples/mckey.c
===================================================================
--- librdmacm.orig/examples/mckey.c
+++ librdmacm/examples/mckey.c
@@ -273,7 +273,7 @@ static int join_handler(struct cmatest_n
 	char buf[40];

 	inet_ntop(AF_INET6, param->ah_attr.grh.dgid.raw, buf, 40);
-	printf("mckey: joined dgid: %s\n", buf);
+	printf("mckey: joined dgid: %s mlid %x sl %d\n", buf, param->ah_attr.dlid, param->ah_attr.sl);

 	node->remote_qpn = param->qp_num;
 	node->remote_qkey = param->qkey;
@@ -556,6 +556,11 @@ int main(int argc, char **argv)
 		}
 	}

+	if (unmapped_addr && !src_addr) {
+		printf("unmapped multicast address requires binding to source address\n");
+		exit(1);
+	}
+
 	test.dst_addr = (struct sockaddr *) &test.dst_in;
 	test.connects_left = connections;

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2009-11-09 17:34 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-01  9:31 [PATCH] librdmacm/mckey: enforce local binding for unmapped multicast addresses Or Gerlitz
     [not found] ` <Pine.LNX.4.64.0911011130140.6591-aDiYczhfhVLdX2U7gxhm1tBPR1lH4CV8@public.gmane.org>
2009-11-02 16:27   ` Sean Hefty
     [not found]     ` <AB1AB5E171B44E1AA5FAFB87901C69C7-Zpru7NauK7drdx17CPfAsdBPR1lH4CV8@public.gmane.org>
2009-11-03 14:02       ` Or Gerlitz
     [not found]         ` <4AF037F7.9080100-smomgflXvOZWk0Htik3J/w@public.gmane.org>
2009-11-03 16:43           ` Sean Hefty
     [not found]             ` <72E827020C9E497DB3CAA3DD720E9604-Zpru7NauK7drdx17CPfAsdBPR1lH4CV8@public.gmane.org>
2009-11-03 17:29               ` Jason Gunthorpe
     [not found]                 ` <20091103172949.GR1966-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2009-11-03 18:11                   ` Sean Hefty
2009-11-05 11:38               ` Or Gerlitz
     [not found]                 ` <4AF2B92E.2030807-hKgKHo2Ms0FWk0Htik3J/w@public.gmane.org>
2009-11-05 19:44                   ` Sean Hefty
     [not found]                     ` <EE242E2A2A6A45A581F62AAFD24CD761-Zpru7NauK7drdx17CPfAsdBPR1lH4CV8@public.gmane.org>
2009-11-08  6:08                       ` Or Gerlitz
     [not found]                         ` <4AF66069.60709-smomgflXvOZWk0Htik3J/w@public.gmane.org>
2009-11-09 17:34                           ` Hefty, Sean
2009-11-02 18:42   ` Jason Gunthorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox