From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: Or Gerlitz <ogerlitz-smomgflXvOZWk0Htik3J/w@public.gmane.org>
Cc: Sean Hefty <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
linux-rdma <linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] librdmacm/mckey: enforce local binding for unmapped multicast addresses
Date: Mon, 2 Nov 2009 11:42:27 -0700 [thread overview]
Message-ID: <20091102184227.GD7768@obsidianresearch.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0911011130140.6591-aDiYczhfhVLdX2U7gxhm1tBPR1lH4CV8@public.gmane.org>
On Sun, Nov 01, 2009 at 11:31:22AM +0200, Or Gerlitz wrote:
> 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
Erm, I'm not sure what is going on by the time things get to the SA,
but the above output shows this kernel bug. The joined DGID for that
AF_INET6 address should be FF12:601b::FFFF:FFFF
The AF_INET6 -M argument to mckey is not treated as a MGID unless it is
prefixed with FF10:A01B:: (so ugly..)
If you want to join the IPv4 all hosts group I think you need to use
-M 255.255.255.255
Your result does show that something else is wrong too, the group with
MLID 0xC00B should have been MGID ff12:401b:ffff:: like mckey reported
..
>From 9f3a76deb5bfda0f8243eadfa024eb547c03f583 Mon Sep 17 00:00:00 2001
From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
Date: Mon, 2 Nov 2009 11:23:38 -0700
Subject: [PATCH] RDMA CM: Fix AF_INET6 support in multicast joining
If joining to an AF_INET6 address we need to map the address to a MGID
in the same way as the IP stack. The old code would just fall through to
the IPv4 case and generate garbage.
Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
---
drivers/infiniband/core/cma.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
compile tested only.
diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index a0fa241..1e9a78a 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -2724,6 +2724,11 @@ static void cma_set_mgid(struct rdma_id_private *id_priv,
0xFF10A01B)) {
/* IPv6 address is an SA assigned MGID. */
memcpy(mgid, &sin6->sin6_addr, sizeof *mgid);
+ } else if ((addr->sa_family == AF_INET6)) {
+ ipv6_ib_mc_map(&sin6->sin6_addr, dev_addr->broadcast, mc_map);
+ if (id_priv->id.ps == RDMA_PS_UDP)
+ mc_map[7] = 0x01; /* Use RDMA CM signature */
+ *mgid = *(union ib_gid *) (mc_map + 4);
} else {
ip_ib_mc_map(sin->sin_addr.s_addr, dev_addr->broadcast, mc_map);
if (id_priv->id.ps == RDMA_PS_UDP)
--
1.5.4.2
--
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
prev parent reply other threads:[~2009-11-02 18:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091102184227.GD7768@obsidianresearch.com \
--to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=ogerlitz-smomgflXvOZWk0Htik3J/w@public.gmane.org \
--cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox