From: Wang Hai wanghai38@huawei.com
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I8OWRC
----------------------------------------------------
Reserve some fields beforehand for net rdma framework related structures prone to change.
Signed-off-by: Wang Hai wanghai38@huawei.com Signed-off-by: Zhengchao Shao shaozhengchao@huawei.com --- include/rdma/ib_addr.h | 4 ++++ include/rdma/rdma_cm.h | 10 ++++++++++ include/rdma/rdma_counter.h | 4 ++++ include/rdma/rdma_netlink.h | 4 ++++ include/rdma/rdma_vt.h | 7 +++++++ include/rdma/rdmavt_qp.h | 5 +++++ 6 files changed, 34 insertions(+)
diff --git a/include/rdma/ib_addr.h b/include/rdma/ib_addr.h index 811a0f11d0db..15307804a1a9 100644 --- a/include/rdma/ib_addr.h +++ b/include/rdma/ib_addr.h @@ -21,6 +21,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 @@ -44,6 +45,9 @@ struct rdma_dev_addr { const struct ib_gid_attr *sgid_attr; enum rdma_network_type network; int hoplimit; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
/** diff --git a/include/rdma/rdma_cm.h b/include/rdma/rdma_cm.h index 8a8ab2f793ab..aab31385fdce 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 @@ -77,6 +78,9 @@ struct rdma_conn_param { u8 srq; u32 qp_num; u32 qkey; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
struct rdma_ud_param { @@ -95,6 +99,9 @@ struct rdma_cm_event { struct rdma_ud_param ud; } param; struct rdma_ucm_ece ece; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
struct rdma_cm_id; @@ -119,6 +126,9 @@ struct rdma_cm_id { enum ib_qp_type qp_type; u32 port_num; struct work_struct net_work; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
struct rdma_cm_id * diff --git a/include/rdma/rdma_counter.h b/include/rdma/rdma_counter.h index 45d5481a7846..bbbe5a3e7c76 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,9 @@ struct rdma_counter { struct mutex lock; struct rdma_hw_stats *stats; u32 port; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
void rdma_counter_init(struct ib_device *dev); diff --git a/include/rdma/rdma_netlink.h b/include/rdma/rdma_netlink.h index c2a79aeee113..e822c977b8af 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 c429d6ddb129..5b262b7c0b53 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,9 @@ struct rvt_ibport { */ struct trap_list trap_lists[RVT_MAX_TRAP_LISTS]; struct timer_list trap_timer; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
#define RVT_CQN_MAX 16 /* maximum length of cq name */ @@ -426,6 +430,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 2e58d5e6ac0e..2e887cc48d8d 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. */