On Thu, Aug 26, 2010 at 04:17:08PM -0500, Christoph Lameter wrote: > On Thu, 26 Aug 2010, Roland Dreier wrote: > > > also it's not clear to me why it's OK to do this test of the DGID if the > > packet didn't have a GRH -- presumably we are just looking at random > > uninitialized memory so we might incorrectly say some packets are > > multicast if that byte happens to be 0xff. (or does that not matter? > > if so why can't we just always make everything PACKET_MULTICAST?) > > We will do an skb_pull to skip over the GRH next?
The GRH bytes are always present, but the HW may not fill them in if IB_WC_GRH is not set. Checking for the broadcast address should be done by comparing the MGID against dev->broadcast + 4, like Yossi was describing. This can be done as a sub-case of the multicast check since dev->broadcast+4 will always start with 0xff. IPv6 does not have a broadcast address, so the additional work to check the v6 MGID format Yossi was discussing is not required. Jason -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
