summaryrefslogtreecommitdiff
path: root/include/uapi/rdma
diff options
context:
space:
mode:
authorPatrisious Haddad <phaddad@nvidia.com>2023-10-09 13:43:58 +0300
committerLeon Romanovsky <leon@kernel.org>2023-10-19 09:31:00 +0300
commit465d6b42f1a3b855c06da1d4d3b09907d261af69 (patch)
tree77fa511b88bb84e06d0e0c5f7db4b9c07e7d4852 /include/uapi/rdma
parent45cfa8864cd3ae228ddb17bf2316a0ab3284f70d (diff)
downloadlinux-465d6b42f1a3b855c06da1d4d3b09907d261af69.tar.xz
RDMA/core: Add support to set privileged QKEY parameter
Add netlink command that enables/disables privileged QKEY by default. It is disabled by default, since according to IB spec only privileged users are allowed to use privileged QKEY. According to the IB specification rel-1.6, section 3.5.3: "QKEYs with the most significant bit set are considered controlled QKEYs, and a HCA does not allow a consumer to arbitrarily specify a controlled QKEY." Using rdma tool, $rdma system set privileged-qkey on When enabled non-privileged users would be able to use controlled QKEYs which are considered privileged. Using rdma tool, $rdma system set privileged-qkey off When disabled only privileged users would be able to use controlled QKEYs. You can also use the command below to check the parameter state: $rdma system show netns shared privileged-qkey off copy-on-fork on Signed-off-by: Patrisious Haddad <phaddad@nvidia.com> Link: https://lore.kernel.org/r/90398be70a9d23d2aa9d0f9fd11d2c264c1be534.1696848201.git.leon@kernel.org Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'include/uapi/rdma')
-rw-r--r--include/uapi/rdma/rdma_netlink.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/uapi/rdma/rdma_netlink.h b/include/uapi/rdma/rdma_netlink.h
index 2830695c3556..723bbb0f7042 100644
--- a/include/uapi/rdma/rdma_netlink.h
+++ b/include/uapi/rdma/rdma_netlink.h
@@ -556,6 +556,8 @@ enum rdma_nldev_attr {
RDMA_NLDEV_ATTR_STAT_HWCOUNTER_INDEX, /* u32 */
RDMA_NLDEV_ATTR_STAT_HWCOUNTER_DYNAMIC, /* u8 */
+ RDMA_NLDEV_SYS_ATTR_PRIVILEGED_QKEY_MODE, /* u8 */
+
/*
* Always the end
*/