From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roland Dreier Subject: Re: [PATCHv10 02/12] ib_core: IBoE CMA device binding Date: Thu, 02 Sep 2010 14:57:10 -0700 Message-ID: References: <20100826141723.GC8795@mtldesk30> <20100827054256.GA9755@mtldesk30> <20100829143914.GA14370@mtldesk30> <20100902192745.GA22039@mtldesk30> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: In-Reply-To: (Sean Hefty's message of "Thu, 2 Sep 2010 13:30:11 -0700") Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: "Hefty, Sean" Cc: Eli Cohen , RDMA list List-Id: linux-rdma@vger.kernel.org > In cma_acquire_dev, we try to match up a portion of the dev_addr with > a GID. The current code does this by checking the dev_type to > determine if the GID would start at offset 0 or 4 in the dev_addr. > With IBoE, this check is no longer possible, so we select the offset > based on the rdma device that we're trying to compare against, rather > than using data stored with the net_device. > > Maybe it's just so unlikely that we don't care, but can this lead to > a false match? (and maybe the current code can have a false match..) I don't think there's any chance of a false positive. We can tell if the GID offset is 0 or 4 based on the ARPHRD type of the address we're comparing, so that should always be correct. The only difference with between IBoE and iWARP GIDs is that the IBoE GIDs are actually IPv6 link-local addresses, so they need some munging to convert back to ethernet hardware addresses. But in any case there shouldn't be a collision unless there are duplicate ethernet addresses. -- 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