On 6/12/2018 3:33 PM, Ruhl, Michael J wrote: >> -----Original Message----- >> From: Hal Rosenstock [mailto:hal@xxxxxxxxxxxxxxxxxx] >> Sent: Tuesday, June 12, 2018 3:05 PM >> To: Ruhl, Michael J <michael.j.ruhl@xxxxxxxxx>; Jason Gunthorpe >> <jgg@xxxxxxxx> >> Cc: RDMA mailing list <linux-rdma@xxxxxxxxxxxxxxx> >> Subject: Re: ipoib hw multicast addresses >> >> On 6/12/2018 12:06 PM, Ruhl, Michael J wrote: >>> When the netdev device is registered (netdev_register) from >>> ipoib_add_port(), the first (incorrect) "HW" address is added to the >>> device MC list: >>> >>> link 00:ff:ff:ff:ff:12:60:1b:80:00:00:00:00:00:00:00:00:00:00:01 >>> ^^^^ (invalid PKEY) >> >> Per RFC 4391, format is: >> | 8 | 4 | 4 | 16 bits | 16 bits | 80 bits | >> +------ -+----+----+-----------------+---------+-------------------+ >> |11111111|0001|scop|<IPoIB signature>|< P_Key >| group ID | >> +--------+----+----+-----------------+---------+-------------------+ >> >> so this is PKey 0x8000 for IPv6 (0x601b) multicast group ID 1 which is >> the "all nodes address". >> >>> The PKEY has not been set, so this address always will be wrong. >> >> At init time, IBA requires that pkey index 0 has the full default pkey >> (0x8000) so it probably comes from there. > > Hi Hal, > > The IBTA spec (section 10.9.1.2) says that the default pkey is 0xFFFF. > The invalid pkey is "low-order 15 bits are all zero". > > So I am confused by the usage of 0x8000 in RFC 4391. My bad; 0x8000 is invalid pkey (full membership) and 0xffff is full default pkey. -- Hal > During IPoIB module init, the value is queried from the PKEY table, but > this occurs before the PKEY table has been set. > > Should this value be set to 0xFFFF rather than 0x8000 before the > netdev_registration() is called? > > That still doesn't seem right. > > The net_device_ops callback function ndo_open() is called sometime after > the registration. > > It looks at the given pkey (0x8000) and determines that it is invalid and give > the warning: > > ib0: P_Key 0x8000 is Invalid > > So the init path sets up the incorrect value. The init call back exits without > doing any work. > > Or am I misunderstanding your comment? :) > > Thanks, > > Mike > -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html