[ewg] problem with ipoib_mcast_fix_ip_ib_mc_map_to_2_6_24.patch

Jason Gunthorpe jgunthorpe at obsidianresearch.com
Wed Mar 10 11:05:04 PST 2010


On Wed, Mar 10, 2010 at 08:57:17PM +0200, Eli Cohen wrote:
> On Wed, Mar 10, 2010 at 10:42:22AM -0700, Jason Gunthorpe wrote:
> > 
> > I guess, the best fix is to revert c12481586c4ba09cb88dc2090c67fdce7c856cde,
> > alter ipoib_mcast_addr_is_valid to not compare bytes 5, 8 and 9,
> 
> 
> > and
> > fixup the 'Add in the P_Key' hunk to also fixup the scope byte too.
> 
> Can you elaborate on this? 

+ 
++      /* Work around broken ip_ib_mc_map */
++      if (mclist->dmi_addrlen == INFINIBAND_ALEN) {
++              mclist->dmi_addr[5] = 0x10 | (dev->broadcast[5] & 0xF);
++              mclist->dmi_addr[8] = dev->broadcast[8];
++              mclist->dmi_addr[9] = dev->broadcast[9];
++      }

5 in the dmi_addr is the scope byte. The old patch:

-+              /* Add in the P_Key */
-+              mgid.raw[4] = (priv->pkey >> 8) & 0xff;
-+              mgid.raw[5] = priv->pkey & 0xff;
-+

Only includes the dmi_addr bytes 8 and 9. This is also a small bug.

The above should read something like:

mgid.raw[1] = 0x10 | (dev->broadcast[5] & 0xF);
mgid.raw[4] = dev->broadcast[8];
mgid.raw[5] = dev->broadcast[9];

Jason



More information about the ewg mailing list