From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Gunthorpe Subject: Re: [PATCH for-next V2 05/11] IB/core: Add rdma_network_type to wc Date: Mon, 7 Dec 2015 10:12:28 -0700 Message-ID: <20151207171228.GA26969@obsidianresearch.com> References: <1449150450-13679-1-git-send-email-matanb@mellanox.com> <1449150450-13679-6-git-send-email-matanb@mellanox.com> <20151203140543.GA4283@infradead.org> <20151207060241.GA19038@obsidianresearch.com> <20151207063415.GB20066@obsidianresearch.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Moni Shoua Cc: Liran Liss , Christoph Hellwig , Matan Barak , Doug Ledford , "linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Eran Ben Elisha , Haggai Eran , Or Gerlitz , Somnath Kotur List-Id: linux-rdma@vger.kernel.org On Mon, Dec 07, 2015 at 08:37:41AM +0200, Moni Shoua wrote: > On Mon, Dec 7, 2015 at 8:34 AM, Jason Gunthorpe > wrote: > > On Mon, Dec 07, 2015 at 08:15:40AM +0200, Moni Shoua wrote: > > > >> What you have though is the sgid taken from the GRH that is scattered > >> to the first 40/20 bytes of the receive WQE. This is not enough to > >> determine the network type. > > > > It is enough to discover the sgid index which will tell you the type. > but how? all you have in hand is the sgid which can appear several > times in the GID table in different indices. Eh? Reliably recovering the gid index is not optional. The network namespace stuff that is already in the kernel hard requires that ability. (This is the same argument we went around on already why pkey had to come from the wc, not from the payload) If your position is it cannot be done from a WC,QP as is, then gid_index needs to be added to the wc, or something else to remove the ambiguity. In either case, network_type is absolutely the wrong thing to have in the wc. Jason -- 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