Subject: Re: [PATCH v4 for-next 00/12] Add network namespace support in the RDMA-CM

From: Jason Gunthorpe <[email-masked]>
Date: Wed, 3 Jun 2015 10:14:47 -0600

On Wed, Jun 03, 2015 at 01:03:01PM +0300, Haggai Eran wrote:
> > Then I'm inclined to say that we should map for namespaces using device,
> > port, guid/gid, pkey.  And in this situation, since a unique guid/gid on
> > any given pkey maps to a unique dhcp identifier and a unique ipv6
> > lladdr, this becomes freely interchangeable with device, port, pkey,
> > address mappings that this patchset was built around.
> 
> What if we change the namespaces patches to map (device, port, GID,
> P_Key, IP) to netdev / namespace? That is, to use both the GID and the
> IP address.

As I keep saying, you are not supposed to use the IP address as a key
to find the netdev, that is the wrong way to use the Linux netdev
model.

Requiring unique GID/PKey allows the implementation to avoid this
wrongness, which would be simplifying and more correct.

That is the appeal to blocking this scenario when children are created.

Jason