From: Wang Hai wanghai38@huawei.com
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I4HE7P?from=project-issue CVE: NA
--------
Reserve some fields beforehand for net rdma framework related structures prone to change.
---------
Signed-off-by: Wang Hai wanghai38@huawei.com Reviewed-by: Wei Yongjun weiyongjun1@huawei.com Reviewed-by: Yue Haibing yuehaibing@huawei.com Signed-off-by: Zheng Zengkai zhengzengkai@huawei.com --- include/rdma/ib_addr.h | 3 +++ include/rdma/rdma_cm.h | 8 ++++++++ include/rdma/rdma_counter.h | 3 +++ include/rdma/rdma_netlink.h | 4 ++++ include/rdma/rdma_vt.h | 6 ++++++ include/rdma/rdmavt_qp.h | 5 +++++ 6 files changed, 29 insertions(+)
diff --git a/include/rdma/ib_addr.h b/include/rdma/ib_addr.h index b0e636ac6690..f315a3dce9e7 100644 --- a/include/rdma/ib_addr.h +++ b/include/rdma/ib_addr.h @@ -20,6 +20,7 @@ #include <rdma/ib_verbs.h> #include <rdma/ib_pack.h> #include <net/net_namespace.h> +#include <linux/kabi.h>
/** * struct rdma_dev_addr - Contains resolved RDMA hardware addresses @@ -43,6 +44,8 @@ struct rdma_dev_addr { const struct ib_gid_attr *sgid_attr; enum rdma_network_type network; int hoplimit; + + KABI_RESERVE(1) };
/** diff --git a/include/rdma/rdma_cm.h b/include/rdma/rdma_cm.h index 32a67af18415..4d703c848214 100644 --- a/include/rdma/rdma_cm.h +++ b/include/rdma/rdma_cm.h @@ -12,6 +12,7 @@ #include <rdma/ib_addr.h> #include <rdma/ib_sa.h> #include <uapi/rdma/rdma_user_cm.h> +#include <linux/kabi.h>
/* * Upon receiving a device removal event, users must destroy the associated @@ -67,6 +68,9 @@ struct rdma_conn_param { u8 srq; u32 qp_num; u32 qkey; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
struct rdma_ud_param { @@ -85,6 +89,8 @@ struct rdma_cm_event { struct rdma_ud_param ud; } param; struct rdma_ucm_ece ece; + + KABI_RESERVE(1) };
struct rdma_cm_id; @@ -108,6 +114,8 @@ struct rdma_cm_id { enum rdma_ucm_port_space ps; enum ib_qp_type qp_type; u8 port_num; + + KABI_RESERVE(1) };
struct rdma_cm_id * diff --git a/include/rdma/rdma_counter.h b/include/rdma/rdma_counter.h index eb99856e8b30..74ee0392b238 100644 --- a/include/rdma/rdma_counter.h +++ b/include/rdma/rdma_counter.h @@ -11,6 +11,7 @@
#include <rdma/restrack.h> #include <rdma/rdma_netlink.h> +#include <linux/kabi.h>
struct ib_device; struct ib_qp; @@ -41,6 +42,8 @@ struct rdma_counter { struct mutex lock; struct rdma_hw_stats *stats; u8 port; + + KABI_RESERVE(1) };
void rdma_counter_init(struct ib_device *dev); diff --git a/include/rdma/rdma_netlink.h b/include/rdma/rdma_netlink.h index 2758d9df71ee..f8b3be61a841 100644 --- a/include/rdma/rdma_netlink.h +++ b/include/rdma/rdma_netlink.h @@ -5,6 +5,7 @@
#include <linux/netlink.h> #include <uapi/rdma/rdma_netlink.h> +#include <linux/kabi.h>
enum { RDMA_NLDEV_ATTR_EMPTY_STRING = 1, @@ -114,6 +115,9 @@ struct rdma_link_ops { struct list_head list; const char *type; int (*newlink)(const char *ibdev_name, struct net_device *ndev); + + KABI_RESERVE(1) + KABI_RESERVE(2) };
void rdma_link_register(struct rdma_link_ops *ops); diff --git a/include/rdma/rdma_vt.h b/include/rdma/rdma_vt.h index 9fd217b24916..5717236f1127 100644 --- a/include/rdma/rdma_vt.h +++ b/include/rdma/rdma_vt.h @@ -17,6 +17,7 @@ #include <rdma/ib_verbs.h> #include <rdma/ib_mad.h> #include <rdma/rdmavt_mr.h> +#include <linux/kabi.h>
#define RVT_MAX_PKEY_VALUES 16
@@ -105,6 +106,8 @@ struct rvt_ibport { */ struct trap_list trap_lists[RVT_MAX_TRAP_LISTS]; struct timer_list trap_timer; + + KABI_RESERVE(1) };
#define RVT_CQN_MAX 16 /* maximum length of cq name */ @@ -426,6 +429,9 @@ struct rvt_dev_info {
/* Memory Working Set Size */ struct rvt_wss *wss; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
/** diff --git a/include/rdma/rdmavt_qp.h b/include/rdma/rdmavt_qp.h index 8275954f5ce6..5a58e7836780 100644 --- a/include/rdma/rdmavt_qp.h +++ b/include/rdma/rdmavt_qp.h @@ -11,6 +11,7 @@ #include <rdma/ib_verbs.h> #include <rdma/rdmavt_cq.h> #include <rdma/rvt-abi.h> +#include <linux/kabi.h> /* * Atomic bit definitions for r_aflags. */ @@ -441,6 +442,10 @@ struct rvt_qp {
atomic_t local_ops_pending; /* number of fast_reg/local_inv reqs */
+ + KABI_RESERVE(1) + KABI_RESERVE(2) + /* * This sge list MUST be last. Do not add anything below here. */