Re: [PATCH rdma-next v3 08/14] RDMA/cgroup: Disambiguate devices across net namespaces

Michal Koutný <[email protected]>
Newsgroups org.kernel.vger.linux-rdma,org.kernel.vger.cgroups,org.kernel.vger.linux-kselftest,org.kernel.vger.linux-s390,org.kernel.vger.netdev
Message-ID <[email protected]>
Hello Jiri.

On Thu, Jul 16, 2026 at 03:23:09PM +0200, Jiri Pirko <[email protected]> wrote:
> From: Jiri Pirko <[email protected]>
> 
> RDMA device names are unique only within a network namespace, but an
> RDMA cgroup can account resources for devices from multiple namespaces.
> Duplicate names therefore make cgroup output ambiguous and can cause
> limit writes to select the wrong device.

From the cover letter:
| A device in one network namespace therefore cannot use a name already
| taken in another, even in exclusive netns mode (netns_mode=0) where
| the two are otherwise isolated. Net devices have no such restriction -
| their names only need to be unique within a network namespace.

If this is modelled after net devices, why not make the visibility netns
based?
I.e. only list (write to) devices of the caller's netns.

> 
> Use the system-wide RDMA device index to distinguish duplicate names
> while preserving the existing UAPI for unique names. Reject ambiguous
> name-only writes with -ENOTUNIQ and expose a complete device view to
> administrators.

I admit, the administrators won't get the full view but that's no
different from the netns devices situation.

Regards,
Michal
signature.asc (application/pgp-signature, 265 B)
-----BEGIN PGP SIGNATURE-----

iJEEABYKADkWIQRCE24Fn/AcRjnLivR+PQLnlNv4CAUCaoyNfxsUgAAAAAAEAA5t
YW51MiwyLjUrMS4xMiwyLDIACgkQfj0C55Tb+Ag9cgEAmqyg7SX/4xxY6jGBQ6Ho
ldb//2ddSquKpPFaT3oiD/8BAOPzNVL2AFncp/3gajGpePR8JfvA8gWP67r2kNjr
koMD
=6AcV
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.