linux-next/include/uapi/rdma
Chiara Meiohas 7566752e4d RDMA/nldev: Add IB device and net device rename events
Implement event sending for IB device rename and IB device
port associated netdevice rename.

In iproute2, rdma monitor displays the IB device name, port
and the netdevice name when displaying event info. Since
users can modiy these names, we track and notify on renaming
events.

Note: In order to receive netdevice rename events, drivers
must use the ib_device_set_netdev() API when attaching net
devices to IB devices.

$ rdma monitor
$ rmmod mlx5_ib
[UNREGISTER]	dev 1  rocep8s0f1
[UNREGISTER]	dev 0  rocep8s0f0

$ modprobe mlx5_ib
[REGISTER]	dev 2  mlx5_0
[NETDEV_ATTACH]	dev 2  mlx5_0 port 1 netdev 4 eth2
[REGISTER]	dev 3  mlx5_1
[NETDEV_ATTACH]	dev 3  mlx5_1 port 1 netdev 5 eth3
[RENAME]	dev 2  rocep8s0f0
[RENAME]	dev 3  rocep8s0f1

$ devlink dev eswitch set pci/0000:08:00.0 mode switchdev
[UNREGISTER]	dev 2  rocep8s0f0
[REGISTER]	dev 4  mlx5_0
[NETDEV_ATTACH]	dev 4  mlx5_0 port 30 netdev 4 eth2
[RENAME]	dev 4  rdmap8s0f0

$ echo 4 > /sys/class/net/eth2/device/sriov_numvfs
[NETDEV_ATTACH]	dev 4  rdmap8s0f0 port 2 netdev 7 eth4
[NETDEV_ATTACH]	dev 4  rdmap8s0f0 port 3 netdev 8 eth5
[NETDEV_ATTACH]	dev 4  rdmap8s0f0 port 4 netdev 9 eth6
[NETDEV_ATTACH]	dev 4  rdmap8s0f0 port 5 netdev 10 eth7
[REGISTER]	dev 5  mlx5_0
[NETDEV_ATTACH]	dev 5  mlx5_0 port 1 netdev 11 eth8
[REGISTER]	dev 6  mlx5_1
[NETDEV_ATTACH]	dev 6  mlx5_1 port 1 netdev 12 eth9
[RENAME]	dev 5  rocep8s0f0v0
[RENAME]	dev 6  rocep8s0f0v1
[REGISTER]	dev 7  mlx5_0
[NETDEV_ATTACH]	dev 7  mlx5_0 port 1 netdev 13 eth10
[RENAME]	dev 7  rocep8s0f0v2
[REGISTER]	dev 8  mlx5_0
[NETDEV_ATTACH]	dev 8  mlx5_0 port 1 netdev 14 eth11
[RENAME]	dev 8  rocep8s0f0v3

$ ip link set eth2 name myeth2
[NETDEV_RENAME]	 netdev 4 myeth2

$ ip link set eth1 name myeth1

** no events received, because eth1 is not attached to
   an IB device **

Signed-off-by: Chiara Meiohas <cmeiohas@nvidia.com>
Link: https://patch.msgid.link/093c978ef2766fd3ab4ff8798eeb68f2f11582f6.1730367038.git.leon@kernel.org
Signed-off-by: Leon Romanovsky <leon@kernel.org>
2024-11-04 06:57:21 -05:00
..
hfi treewide: uapi: Replace zero-length arrays with flexible-array members 2022-06-28 21:26:05 +02:00
bnxt_re-abi.h RDMA/bnxt_re: Share a page to expose per SRQ info with userspace 2024-09-02 10:10:36 +03:00
cxgb4-abi.h iw_cxgb4: RDMA write with immediate support 2018-08-02 20:16:02 -06:00
efa-abi.h RDMA/efa: Add option to set QP service level on create 2024-10-21 13:58:07 -03:00
erdma-abi.h RDMA/erdma: Add the ABI definitions 2022-07-27 16:04:05 -03:00
hns-abi.h RDMA/hns: Support DSCP 2024-04-09 10:27:41 +03:00
ib_user_ioctl_cmds.h RDMA: Pass entire uverbs attr bundle to create cq function 2024-06-27 16:28:21 -03:00
ib_user_ioctl_verbs.h IB/core: Add support for XDR link speed 2023-09-26 12:38:39 +03:00
ib_user_mad.h RDMA/core: Use flexible array for mad data 2021-06-22 14:05:34 -03:00
ib_user_sa.h uapi: Fix SPDX tags for files referring to the 'OpenIB.org' license 2018-04-23 11:10:33 -04:00
ib_user_verbs.h RDMA: Extend RDMA user ABI to support flush 2022-12-09 19:36:01 -04:00
irdma-abi.h RDMA/irdma: Use HW specific minimum WQ size 2023-07-30 15:43:00 +03:00
mana-abi.h RDMA/mana_ib: Implement uapi to create and destroy RC QP 2024-05-30 15:26:57 +03:00
mlx4-abi.h uapi: Fix SPDX tags for files referring to the 'OpenIB.org' license 2018-04-23 11:10:33 -04:00
mlx5_user_ioctl_cmds.h RDMA/mlx5: Introduce GET_DATA_DIRECT_SYSFS_PATH ioctl 2024-08-11 11:12:50 +03:00
mlx5_user_ioctl_verbs.h RDMA/mlx5: Add support for DMABUF MR registrations with Data-direct 2024-08-11 11:12:50 +03:00
mlx5-abi.h RDMA/mlx5: Support OOO RX WQE consumption 2024-11-04 06:57:20 -05:00
mthca-abi.h uapi: Fix SPDX tags for files referring to the 'OpenIB.org' license 2018-04-23 11:10:33 -04:00
ocrdma-abi.h RDMA: Change all uapi headers to use __aligned_u64 instead of __u64 2018-03-27 14:25:09 -06:00
qedr-abi.h RDMA/qedr: Add EDPM max size to alloc ucontext response 2020-07-16 16:01:55 -03:00
rdma_netlink.h RDMA/nldev: Add IB device and net device rename events 2024-11-04 06:57:21 -05:00
rdma_user_cm.h treewide: uapi: Replace zero-length arrays with flexible-array members 2022-06-28 21:26:05 +02:00
rdma_user_ioctl_cmds.h treewide: uapi: Replace zero-length arrays with flexible-array members 2022-06-28 21:26:05 +02:00
rdma_user_ioctl.h RDMA: rdma_user_ioctl.h: fix a duplicated word + clarify 2020-07-20 16:42:08 -03:00
rdma_user_rxe.h RDMA/rxe: Extend rxe user ABI to support flush 2022-12-09 19:36:01 -04:00
rvt-abi.h treewide: add "WITH Linux-syscall-note" to SPDX tag of uapi headers 2019-07-25 11:05:10 +02:00
siw-abi.h IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
vmw_pvrdma-abi.h RDMA/vmw_pvrdma: Fix network_hdr_type reported in WC 2021-01-19 20:17:27 -04:00