Re: [PATCH for-next V1 5/9] IB/core: Add rdma_network_type to wc

2015-12-01 Thread Matan Barak
On Mon, Nov 30, 2015 at 10:56 PM, Liran Liss wrote: >> From: linux-rdma-ow...@vger.kernel.org [mailto:linux-rdma- > >> >> The abstraction at the gid cache is making it too easy to make this mistake. >> It >> is enabling callers to do direct gid lookups without a route lookup, which is >> uncondit

RE: [PATCH for-next V1 5/9] IB/core: Add rdma_network_type to wc

2015-11-30 Thread Liran Liss
> From: linux-rdma-ow...@vger.kernel.org [mailto:linux-rdma- > > The abstraction at the gid cache is making it too easy to make this mistake. > It > is enabling callers to do direct gid lookups without a route lookup, which is > unconditionally wrong. Every call site into the gid cache I looked

Re: [PATCH for-next V1 5/9] IB/core: Add rdma_network_type to wc

2015-11-25 Thread Jason Gunthorpe
On Wed, Nov 25, 2015 at 04:18:25PM +0200, Matan Barak wrote: > On Wed, Nov 25, 2015 at 8:55 AM, Jason Gunthorpe > wrote: > > On Tue, Nov 24, 2015 at 09:07:41PM +0200, Matan Barak wrote: > > > >> IMHO, the user is entitles to choose any valid sgid_index for the > >> interface. Anything he chooses g

Re: [PATCH for-next V1 5/9] IB/core: Add rdma_network_type to wc

2015-11-25 Thread Matan Barak
On Wed, Nov 25, 2015 at 8:55 AM, Jason Gunthorpe wrote: > On Tue, Nov 24, 2015 at 09:07:41PM +0200, Matan Barak wrote: > >> IMHO, the user is entitles to choose any valid sgid_index for the >> interface. Anything he chooses guaranteed to be valid (from security >> perspective) > > No, the namespac

Re: [PATCH for-next V1 5/9] IB/core: Add rdma_network_type to wc

2015-11-24 Thread Jason Gunthorpe
On Tue, Nov 24, 2015 at 09:07:41PM +0200, Matan Barak wrote: > IMHO, the user is entitles to choose any valid sgid_index for the > interface. Anything he chooses guaranteed to be valid (from security > perspective) No, the namespace patches will have to limit the sgid_indexes that can be used wit

Re: [PATCH for-next V1 5/9] IB/core: Add rdma_network_type to wc

2015-11-24 Thread Matan Barak
On Tue, Nov 24, 2015 at 8:14 PM, Jason Gunthorpe wrote: > On Tue, Nov 24, 2015 at 03:47:51PM +0200, Matan Barak wrote: >> > It isn't just the hop limit that has to come from the route entry, all >> > the source information of the path comes from there. Ie the gid table >> > should accept the route

Re: [PATCH for-next V1 5/9] IB/core: Add rdma_network_type to wc

2015-11-24 Thread Jason Gunthorpe
On Tue, Nov 24, 2015 at 03:47:51PM +0200, Matan Barak wrote: > > It isn't just the hop limit that has to come from the route entry, all > > the source information of the path comes from there. Ie the gid table > > should accept the route entry directly and spit out the sgid_index. > > > > The respo

Re: [PATCH for-next V1 5/9] IB/core: Add rdma_network_type to wc

2015-11-24 Thread Matan Barak
On Mon, Nov 23, 2015 at 11:19 PM, Jason Gunthorpe wrote: >> + /* Use the hint from IP Stack to select GID Type */ >> + network_gid_type = ib_network_to_gid_type(addr->dev_addr.network); >> + if (addr->dev_addr.network != RDMA_NETWORK_IB) { >> + route->path_rec->gid_type = n

Re: [PATCH for-next V1 5/9] IB/core: Add rdma_network_type to wc

2015-11-23 Thread Jason Gunthorpe
> + /* Use the hint from IP Stack to select GID Type */ > + network_gid_type = ib_network_to_gid_type(addr->dev_addr.network); > + if (addr->dev_addr.network != RDMA_NETWORK_IB) { > + route->path_rec->gid_type = network_gid_type; > + /* TODO: get the hoplimit fro

[PATCH for-next V1 5/9] IB/core: Add rdma_network_type to wc

2015-10-15 Thread Matan Barak
From: Somnath Kotur Providers should tell IB core the wc's network type. This is used in order to search for the proper GID in the GID table. When using HCAs that can't provide this info, IB core tries to deep examine the packet and extract the GID type by itself. We choose sgid_index and type f