History

Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma

Pull rdma fixes from Jason Gunthorpe: - Fix several syzkaller found bugs: - Poor parsing of the RDMA_NL_LS_OP_IP_RESOLVE netlink - GID entry refcount leaking when CM destruction races with multicast establishment - Missing refcount put in ib_del_sub_device_and_put() - Fixup recently introduced uABI padding for 32 bit consistency - Avoid user triggered math overflow in MANA and AFA - Reading invalid netdev data during an event - kdoc fixes - Fix never-working gid copying in ib_get_gids_from_rdma_hdr - Typo in bnxt when validating the BAR - bnxt mis-parsed IB_SEND_IP_CSUM so it didn't work always - bnxt out of bounds access in bnxt related to the counters on new devices - Allocate the bnxt PDE table with the right sizing - Use dma_free_coherent() correctly in bnxt - Allow rxe to be unloadable when CONFIG_PROVE_LOCKING by adjusting the tracking of the global sockets it uses - Missing unlocking on error path in rxe - Compute the right number of pages in a MR in rtrs * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: RDMA/bnxt_re: fix dma_free_coherent() pointer RDMA/rtrs: Fix clt_path::max_pages_per_mr calculation IB/rxe: Fix missing umem_odp->umem_mutex unlock on error path RDMA/bnxt_re: Fix to use correct page size for PDE table RDMA/bnxt_re: Fix OOB write in bnxt_re_copy_err_stats() RDMA/bnxt_re: Fix IB_SEND_IP_CSUM handling in post_send RDMA/core: always drop device refcount in ib_del_sub_device_and_put() RDMA/rxe: let rxe_reclassify_recv_socket() call sk_owner_put() RDMA/bnxt_re: Fix incorrect BAR check in bnxt_qplib_map_creq_db() RDMA/core: Fix logic error in ib_get_gids_from_rdma_hdr() RDMA/efa: Remove possible negative shift RTRS/rtrs: clean up rtrs headers kernel-doc RDMA/irdma: avoid invalid read in irdma_net_event RDMA/mana_ib: check cqe length for kernel CQs RDMA/irdma: Fix irdma_alloc_ucontext_resp padding RDMA/ucma: Fix rdma_ucm_query_ib_service_resp struct padding RDMA/cm: Fix leaking the multicast GID table reference RDMA/core: Check for the presence of LS_NLA_TYPE_DGID correctly

Linus Torvalds committed 10 months ago

Commit 6ce4d442 parents 3d35fa1 fcd431a18 files · +107 −68Browse files

Unified · Split

18 files
  1. drivers/infiniband/core/addr.c +10 −23
  2. drivers/infiniband/core/cma.c +3 −0
  3. drivers/infiniband/core/device.c +3 −1
  4. drivers/infiniband/core/verbs.c +1 −1
  5. drivers/infiniband/hw/bnxt_re/hw_counters.h +3 −3
  6. drivers/infiniband/hw/bnxt_re/ib_verbs.c +1 −6
  7. drivers/infiniband/hw/bnxt_re/qplib_rcfw.c +1 −1
  8. drivers/infiniband/hw/bnxt_re/qplib_res.c +3 −5
  9. drivers/infiniband/hw/efa/efa_verbs.c +0 −4
  10. drivers/infiniband/hw/irdma/utils.c +2 −1
  11. drivers/infiniband/hw/mana/cq.c +4 −0
  12. drivers/infiniband/sw/rxe/rxe_net.c +32 −0
  13. drivers/infiniband/sw/rxe/rxe_odp.c +3 −1
  14. drivers/infiniband/ulp/rtrs/rtrs-clt.c +1 −0
  15. drivers/infiniband/ulp/rtrs/rtrs-pri.h +21 −11
  16. drivers/infiniband/ulp/rtrs/rtrs.h +15 −9
  17. include/uapi/rdma/irdma-abi.h +1 −1
  18. include/uapi/rdma/rdma_user_cm.h +3 −1
drivers/infiniband/core/addr.c+10−23
@@ -80,37 +80,25 @@ static const struct nla_policy ib_nl_addr_policy[LS_NLA_TYPE_MAX] = { · 79 unmodified lines
8080 .min = sizeof(struct rdma_nla_ls_gid)},
8181 };
8282
83−static inline bool ib_nl_is_good_ip_resp(const struct nlmsghdr *nlh)
83+static void ib_nl_process_ip_rsep(const struct nlmsghdr *nlh)
8484 {
8585 struct nlattr *tb[LS_NLA_TYPE_MAX] = {};
86+ union ib_gid gid;
87+ struct addr_req *req;
88+ int found = 0;
8689 int ret;
8790
8891 if (nlh->nlmsg_flags & RDMA_NL_LS_F_ERR)
89− return false;
92+ return;
9093
9194 ret = nla_parse_deprecated(tb, LS_NLA_TYPE_MAX - 1, nlmsg_data(nlh),
9295 nlmsg_len(nlh), ib_nl_addr_policy, NULL);
9396 if (ret)
94− return false;
95−
96− return true;
97−}
98−
99−static void ib_nl_process_good_ip_rsep(const struct nlmsghdr *nlh)
100−{
101− const struct nlattr *head, *curr;
102− union ib_gid gid;
103− struct addr_req *req;
104− int len, rem;
105− int found = 0;
106−
107− head = (const struct nlattr *)nlmsg_data(nlh);
108− len = nlmsg_len(nlh);
97+ return;
10998
110− nla_for_each_attr(curr, head, len, rem) {
111− if (curr->nla_type == LS_NLA_TYPE_DGID)
112− memcpy(&gid, nla_data(curr), nla_len(curr));
113− }
99+ if (!tb[LS_NLA_TYPE_DGID])
100+ return;
101+ memcpy(&gid, nla_data(tb[LS_NLA_TYPE_DGID]), sizeof(gid));
114102
115103 spin_lock_bh(&lock);
116104 list_for_each_entry(req, &req_list, list) {
@@ -137,8 +125,7 @@ int ib_nl_handle_ip_res_resp(struct sk_buff *skb, · 20 unmodified lines
137125 !(NETLINK_CB(skb).sk))
138126 return -EPERM;
139127
140− if (ib_nl_is_good_ip_resp(nlh))
141− ib_nl_process_good_ip_rsep(nlh);
128+ ib_nl_process_ip_rsep(nlh);
142129
143130 return 0;
144131 }
drivers/infiniband/core/cma.c+3−0
@@ -2009,6 +2009,7 @@ static void destroy_mc(struct rdma_id_private *id_priv, · 2008 unmodified lines
20092009 ib_sa_free_multicast(mc->sa_mc);
20102010
20112011 if (rdma_protocol_roce(id_priv->id.device, id_priv->id.port_num)) {
2012+ struct rdma_cm_event *event = &mc->iboe_join.event;
20122013 struct rdma_dev_addr *dev_addr =
20132014 &id_priv->id.route.addr.dev_addr;
20142015 struct net_device *ndev = NULL;
@@ -2031,6 +2032,8 @@ static void destroy_mc(struct rdma_id_private *id_priv, · 16 unmodified lines
20312032 dev_put(ndev);
20322033
20332034 cancel_work_sync(&mc->iboe_join.work);
2035+ if (event->event == RDMA_CM_EVENT_MULTICAST_JOIN)
2036+ rdma_destroy_ah_attr(&event->param.ud.ah_attr);
20342037 }
20352038 kfree(mc);
20362039 }
drivers/infiniband/core/device.c+3−1
@@ -2881,8 +2881,10 @@ int ib_del_sub_device_and_put(struct ib_device *sub) · 2880 unmodified lines
28812881 {
28822882 struct ib_device *parent = sub->parent;
28832883
2884− if (!parent)
2884+ if (!parent) {
2885+ ib_device_put(sub);
28852886 return -EOPNOTSUPP;
2887+ }
28862888
28872889 mutex_lock(&parent->subdev_lock);
28882890 list_del(&sub->subdev_list);
drivers/infiniband/core/verbs.c+1−1
@@ -738,7 +738,7 @@ int ib_get_gids_from_rdma_hdr(const union rdma_network_hdr *hdr, · 737 unmodified lines
738738 (struct in6_addr *)dgid);
739739 return 0;
740740 } else if (net_type == RDMA_NETWORK_IPV6 ||
741− net_type == RDMA_NETWORK_IB || RDMA_NETWORK_ROCE_V1) {
741+ net_type == RDMA_NETWORK_IB || net_type == RDMA_NETWORK_ROCE_V1) {
742742 *dgid = hdr->ibgrh.dgid;
743743 *sgid = hdr->ibgrh.sgid;
744744 return 0;
drivers/infiniband/hw/bnxt_re/hw_counters.h+3−3
@@ -89,6 +89,9 @@ enum bnxt_re_hw_stats { · 88 unmodified lines
8989 BNXT_RE_RES_SRQ_LOAD_ERR,
9090 BNXT_RE_RES_TX_PCI_ERR,
9191 BNXT_RE_RES_RX_PCI_ERR,
92+ BNXT_RE_REQ_CQE_ERROR,
93+ BNXT_RE_RESP_CQE_ERROR,
94+ BNXT_RE_RESP_REMOTE_ACCESS_ERRS,
9295 BNXT_RE_OUT_OF_SEQ_ERR,
9396 BNXT_RE_TX_ATOMIC_REQ,
9497 BNXT_RE_TX_READ_REQ,
@@ -110,9 +113,6 @@ enum bnxt_re_hw_stats { · 15 unmodified lines
110113 BNXT_RE_TX_CNP,
111114 BNXT_RE_RX_CNP,
112115 BNXT_RE_RX_ECN,
113− BNXT_RE_REQ_CQE_ERROR,
114− BNXT_RE_RESP_CQE_ERROR,
115− BNXT_RE_RESP_REMOTE_ACCESS_ERRS,
116116 BNXT_RE_NUM_EXT_COUNTERS
117117 };
118118
drivers/infiniband/hw/bnxt_re/ib_verbs.c+1−6
@@ -2919,14 +2919,9 @@ int bnxt_re_post_send(struct ib_qp *ib_qp, const struct ib_send_wr *wr, · 2918 unmodified lines
29192919 wqe.rawqp1.lflags |=
29202920 SQ_SEND_RAWETH_QP1_LFLAGS_ROCE_CRC;
29212921 }
2922− switch (wr->send_flags) {
2923− case IB_SEND_IP_CSUM:
2922+ if (wr->send_flags & IB_SEND_IP_CSUM)
29242923 wqe.rawqp1.lflags |=
29252924 SQ_SEND_RAWETH_QP1_LFLAGS_IP_CHKSUM;
2926− break;
2927− default:
2928− break;
2929− }
29302925 fallthrough;
29312926 case IB_WR_SEND_WITH_INV:
29322927 rc = bnxt_re_build_send_wqe(qp, wr, &wqe);
drivers/infiniband/hw/bnxt_re/qplib_rcfw.c+1−1
@@ -1112,7 +1112,7 @@ static int bnxt_qplib_map_creq_db(struct bnxt_qplib_rcfw *rcfw, u32 reg_offt) · 1111 unmodified lines
11121112 creq_db->dbinfo.flags = 0;
11131113 creq_db->reg.bar_id = RCFW_COMM_CONS_PCI_BAR_REGION;
11141114 creq_db->reg.bar_base = pci_resource_start(pdev, creq_db->reg.bar_id);
1115− if (!creq_db->reg.bar_id)
1115+ if (!creq_db->reg.bar_base)
11161116 dev_err(&pdev->dev,
11171117 "QPLIB: CREQ BAR region %d resc start is 0!",
11181118 creq_db->reg.bar_id);
drivers/infiniband/hw/bnxt_re/qplib_res.c+3−5
@@ -64,9 +64,7 @@ static void __free_pbl(struct bnxt_qplib_res *res, struct bnxt_qplib_pbl *pbl, · 63 unmodified lines
6464 for (i = 0; i < pbl->pg_count; i++) {
6565 if (pbl->pg_arr[i])
6666 dma_free_coherent(&pdev->dev, pbl->pg_size,
67− (void *)((unsigned long)
68− pbl->pg_arr[i] &
69− PAGE_MASK),
67+ pbl->pg_arr[i],
7068 pbl->pg_map_arr[i]);
7169 else
7270 dev_warn(&pdev->dev,
@@ -237,7 +235,7 @@ int bnxt_qplib_alloc_init_hwq(struct bnxt_qplib_hwq *hwq, · 164 unmodified lines
237235 if (npbl % BIT(MAX_PDL_LVL_SHIFT))
238236 npde++;
239237 /* Alloc PDE pages */
240− sginfo.pgsize = npde * pg_size;
238+ sginfo.pgsize = npde * ROCE_PG_SIZE_4K;
241239 sginfo.npages = 1;
242240 rc = __alloc_pbl(res, &hwq->pbl[PBL_LVL_0], &sginfo);
243241 if (rc)
@@ -245,7 +243,7 @@ int bnxt_qplib_alloc_init_hwq(struct bnxt_qplib_hwq *hwq, · 1 unmodified line
245243
246244 /* Alloc PBL pages */
247245 sginfo.npages = npbl;
248− sginfo.pgsize = PAGE_SIZE;
246+ sginfo.pgsize = ROCE_PG_SIZE_4K;
249247 rc = __alloc_pbl(res, &hwq->pbl[PBL_LVL_1], &sginfo);
250248 if (rc)
251249 goto fail;
drivers/infiniband/hw/efa/efa_verbs.c+0−4
@@ -1320,13 +1320,9 @@ static int umem_to_page_list(struct efa_dev *dev, · 1319 unmodified lines
13201320 u32 hp_cnt,
13211321 u8 hp_shift)
13221322 {
1323− u32 pages_in_hp = BIT(hp_shift - PAGE_SHIFT);
13241323 struct ib_block_iter biter;
13251324 unsigned int hp_idx = 0;
13261325
1327− ibdev_dbg(&dev->ibdev, "hp_cnt[%u], pages_in_hp[%u]\n",
1328− hp_cnt, pages_in_hp);
1329−
13301326 rdma_umem_for_each_dma_block(umem, &biter, BIT(hp_shift))
13311327 page_list[hp_idx++] = rdma_block_iter_dma_address(&biter);
13321328
drivers/infiniband/hw/irdma/utils.c+2−1
@@ -251,7 +251,7 @@ int irdma_net_event(struct notifier_block *notifier, unsigned long event, · 250 unmodified lines
251251 void *ptr)
252252 {
253253 struct neighbour *neigh = ptr;
254− struct net_device *real_dev, *netdev = (struct net_device *)neigh->dev;
254+ struct net_device *real_dev, *netdev;
255255 struct irdma_device *iwdev;
256256 struct ib_device *ibdev;
257257 __be32 *p;
@@ -260,6 +260,7 @@ int irdma_net_event(struct notifier_block *notifier, unsigned long event, · 2 unmodified lines
260260
261261 switch (event) {
262262 case NETEVENT_NEIGH_UPDATE:
263+ netdev = neigh->dev;
263264 real_dev = rdma_vlan_dev_real_dev(netdev);
264265 if (!real_dev)
265266 real_dev = netdev;
drivers/infiniband/hw/mana/cq.c+4−0
@@ -56,6 +56,10 @@ int mana_ib_create_cq(struct ib_cq *ibcq, const struct ib_cq_init_attr *attr, · 55 unmodified lines
5656 doorbell = mana_ucontext->doorbell;
5757 } else {
5858 is_rnic_cq = true;
59+ if (attr->cqe > U32_MAX / COMP_ENTRY_SIZE / 2 + 1) {
60+ ibdev_dbg(ibdev, "CQE %d exceeding limit\n", attr->cqe);
61+ return -EINVAL;
62+ }
5963 buf_size = MANA_PAGE_ALIGN(roundup_pow_of_two(attr->cqe * COMP_ENTRY_SIZE));
6064 cq->cqe = buf_size / COMP_ENTRY_SIZE;
6165 err = mana_ib_create_kernel_queue(mdev, buf_size, GDMA_CQ, &cq->queue);
drivers/infiniband/sw/rxe/rxe_net.c+32−0
@@ -64,7 +64,39 @@ static inline void rxe_reclassify_recv_socket(struct socket *sock) · 63 unmodified lines
6464 break;
6565 default:
6666 WARN_ON_ONCE(1);
67+ return;
6768 }
69+ /*
70+ * sock_lock_init_class_and_name() calls
71+ * sk_owner_set(sk, THIS_MODULE); in order
72+ * to make sure the referenced global
73+ * variables rxe_recv_slock_key and
74+ * rxe_recv_sk_key are not removed
75+ * before the socket is closed.
76+ *
77+ * However this prevents rxe_net_exit()
78+ * from being called and 'rmmod rdma_rxe'
79+ * is refused because of the references.
80+ *
81+ * For the global sockets in recv_sockets,
82+ * we are sure that rxe_net_exit() will call
83+ * rxe_release_udp_tunnel -> udp_tunnel_sock_release.
84+ *
85+ * So we don't need the additional reference to
86+ * our own (THIS_MODULE).
87+ */
88+ sk_owner_put(sk);
89+ /*
90+ * We also call sk_owner_clear() otherwise
91+ * sk_owner_put(sk) in sk_prot_free will
92+ * fail, which is called via
93+ * sk_free -> __sk_free -> sk_destruct
94+ * and sk_destruct calls __sk_destruct
95+ * directly or via call_rcu()
96+ * so sk_prot_free() might be called
97+ * after rxe_net_exit().
98+ */
99+ sk_owner_clear(sk);
68100 #endif /* CONFIG_DEBUG_LOCK_ALLOC */
69101 }
70102
drivers/infiniband/sw/rxe/rxe_odp.c+3−1
@@ -179,8 +179,10 @@ static int rxe_odp_map_range_and_lock(struct rxe_mr *mr, u64 iova, int length, u · 178 unmodified lines
179179 return err;
180180
181181 need_fault = rxe_check_pagefault(umem_odp, iova, length);
182− if (need_fault)
182+ if (need_fault) {
183+ mutex_unlock(&umem_odp->umem_mutex);
183184 return -EFAULT;
185+ }
184186 }
185187
186188 return 0;
drivers/infiniband/ulp/rtrs/rtrs-clt.c+1−0
@@ -1464,6 +1464,7 @@ static void query_fast_reg_mode(struct rtrs_clt_path *clt_path) · 1463 unmodified lines
14641464 mr_page_shift = max(12, ffs(ib_dev->attrs.page_size_cap) - 1);
14651465 max_pages_per_mr = ib_dev->attrs.max_mr_size;
14661466 do_div(max_pages_per_mr, (1ull << mr_page_shift));
1467+ max_pages_per_mr = min_not_zero((u32)max_pages_per_mr, U32_MAX);
14671468 clt_path->max_pages_per_mr =
14681469 min3(clt_path->max_pages_per_mr, (u32)max_pages_per_mr,
14691470 ib_dev->attrs.max_fast_reg_page_list_len);
drivers/infiniband/ulp/rtrs/rtrs-pri.h+21−11
@@ -150,7 +150,7 @@ enum rtrs_msg_types { · 149 unmodified lines
150150
151151 /**
152152 * enum rtrs_msg_flags - RTRS message flags.
153− * @RTRS_NEED_INVAL: Send invalidation in response.
153+ * @RTRS_MSG_NEED_INVAL_F: Send invalidation in response.
154154 * @RTRS_MSG_NEW_RKEY_F: Send refreshed rkey in response.
155155 */
156156 enum rtrs_msg_flags {
@@ -179,16 +179,19 @@ struct rtrs_sg_desc { · 22 unmodified lines
179179 * @recon_cnt: Reconnections counter
180180 * @sess_uuid: UUID of a session (path)
181181 * @paths_uuid: UUID of a group of sessions (paths)
182− *
182+ * @first_conn: %1 if the connection request is the first for that session,
183+ * otherwise %0
183184 * NOTE: max size 56 bytes, see man rdma_connect().
184185 */
185186 struct rtrs_msg_conn_req {
186− /* Is set to 0 by cma.c in case of AF_IB, do not touch that.
187− * see https://www.spinics.net/lists/linux-rdma/msg22397.html
187+ /**
188+ * @__cma_version: Is set to 0 by cma.c in case of AF_IB, do not touch
189+ * that. See https://www.spinics.net/lists/linux-rdma/msg22397.html
188190 */
189191 u8 __cma_version;
190− /* On sender side that should be set to 0, or cma_save_ip_info()
191− * extract garbage and will fail.
192+ /**
193+ * @__ip_version: On sender side that should be set to 0, or
194+ * cma_save_ip_info() extract garbage and will fail.
192195 */
193196 u8 __ip_version;
194197 __le16 magic;
@@ -199,6 +202,7 @@ struct rtrs_msg_conn_req { · 4 unmodified lines
199202 uuid_t sess_uuid;
200203 uuid_t paths_uuid;
201204 u8 first_conn : 1;
205+ /* private: */
202206 u8 reserved_bits : 7;
203207 u8 reserved[11];
204208 };
@@ -211,6 +215,7 @@ struct rtrs_msg_conn_req { · 6 unmodified lines
211215 * @queue_depth: max inflight messages (queue-depth) in this session
212216 * @max_io_size: max io size server supports
213217 * @max_hdr_size: max msg header size server supports
218+ * @flags: RTRS message flags for this message
214219 *
215220 * NOTE: size is 56 bytes, max possible is 136 bytes, see man rdma_accept().
216221 */
@@ -222,22 +227,24 @@ struct rtrs_msg_conn_rsp { · 5 unmodified lines
222227 __le32 max_io_size;
223228 __le32 max_hdr_size;
224229 __le32 flags;
230+ /* private: */
225231 u8 reserved[36];
226232 };
227233
228234 /**
229− * struct rtrs_msg_info_req
235+ * struct rtrs_msg_info_req - client additional info request
230236 * @type: @RTRS_MSG_INFO_REQ
231237 * @pathname: Path name chosen by client
232238 */
233239 struct rtrs_msg_info_req {
234240 __le16 type;
235241 u8 pathname[NAME_MAX];
242+ /* private: */
236243 u8 reserved[15];
237244 };
238245
239246 /**
240− * struct rtrs_msg_info_rsp
247+ * struct rtrs_msg_info_rsp - server additional info response
241248 * @type: @RTRS_MSG_INFO_RSP
242249 * @sg_cnt: Number of @desc entries
243250 * @desc: RDMA buffers where the client can write to server
@@ -245,12 +252,14 @@ struct rtrs_msg_info_req { · 1 unmodified line
245252 struct rtrs_msg_info_rsp {
246253 __le16 type;
247254 __le16 sg_cnt;
255+ /* private: */
248256 u8 reserved[4];
257+ /* public: */
249258 struct rtrs_sg_desc desc[];
250259 };
251260
252261 /**
253− * struct rtrs_msg_rkey_rsp
262+ * struct rtrs_msg_rkey_rsp - server refreshed rkey response
254263 * @type: @RTRS_MSG_RKEY_RSP
255264 * @buf_id: RDMA buf_id of the new rkey
256265 * @rkey: new remote key for RDMA buffers id from server
@@ -264,6 +273,7 @@ struct rtrs_msg_rkey_rsp { · 7 unmodified lines
264273 /**
265274 * struct rtrs_msg_rdma_read - RDMA data transfer request from client
266275 * @type: always @RTRS_MSG_READ
276+ * @flags: RTRS message flags (enum rtrs_msg_flags)
267277 * @usr_len: length of user payload
268278 * @sg_cnt: number of @desc entries
269279 * @desc: RDMA buffers where the server can write the result to
@@ -277,7 +287,7 @@ struct rtrs_msg_rdma_read { · 7 unmodified lines
277287 };
278288
279289 /**
280− * struct_msg_rdma_write - Message transferred to server with RDMA-Write
290+ * struct rtrs_msg_rdma_write - Message transferred to server with RDMA-Write
281291 * @type: always @RTRS_MSG_WRITE
282292 * @usr_len: length of user payload
283293 */
@@ -287,7 +297,7 @@ struct rtrs_msg_rdma_write { · 3 unmodified lines
287297 };
288298
289299 /**
290− * struct_msg_rdma_hdr - header for read or write request
300+ * struct rtrs_msg_rdma_hdr - header for read or write request
291301 * @type: @RTRS_MSG_WRITE | @RTRS_MSG_READ
292302 */
293303 struct rtrs_msg_rdma_hdr {
drivers/infiniband/ulp/rtrs/rtrs.h+15−9
@@ -24,8 +24,8 @@ struct rtrs_srv_op; · 23 unmodified lines
2424
2525 /**
2626 * enum rtrs_clt_link_ev - Events about connectivity state of a client
27− * @RTRS_CLT_LINK_EV_RECONNECTED Client was reconnected.
28− * @RTRS_CLT_LINK_EV_DISCONNECTED Client was disconnected.
27+ * @RTRS_CLT_LINK_EV_RECONNECTED: Client was reconnected.
28+ * @RTRS_CLT_LINK_EV_DISCONNECTED: Client was disconnected.
2929 */
3030 enum rtrs_clt_link_ev {
3131 RTRS_CLT_LINK_EV_RECONNECTED,
@@ -33,7 +33,9 @@ enum rtrs_clt_link_ev { · 1 unmodified line
3333 };
3434
3535 /**
36− * Source and destination address of a path to be established
36+ * struct rtrs_addr - Source and destination address of a path to be established
37+ * @src: source address
38+ * @dst: destination address
3739 */
3840 struct rtrs_addr {
3941 struct sockaddr_storage *src;
@@ -41,7 +43,7 @@ struct rtrs_addr { · 1 unmodified line
4143 };
4244
4345 /**
44− * rtrs_clt_ops - it holds the link event callback and private pointer.
46+ * struct rtrs_clt_ops - it holds the link event callback and private pointer.
4547 * @priv: User supplied private data.
4648 * @link_ev: Event notification callback function for connection state changes
4749 * @priv: User supplied data that was passed to rtrs_clt_open()
@@ -67,10 +69,10 @@ enum wait_type { · 19 unmodified lines
6769 };
6870
6971 /**
70− * enum rtrs_clt_con_type() type of ib connection to use with a given
72+ * enum rtrs_clt_con_type - type of ib connection to use with a given
7173 * rtrs_permit
72− * @ADMIN_CON - use connection reserved for "service" messages
73− * @IO_CON - use a connection reserved for IO
74+ * @RTRS_ADMIN_CON: use connection reserved for "service" messages
75+ * @RTRS_IO_CON: use a connection reserved for IO
7476 */
7577 enum rtrs_clt_con_type {
7678 RTRS_ADMIN_CON,
@@ -85,7 +87,7 @@ void rtrs_clt_put_permit(struct rtrs_clt_sess *sess, · 8 unmodified lines
8587 struct rtrs_permit *permit);
8688
8789 /**
88− * rtrs_clt_req_ops - it holds the request confirmation callback
90+ * struct rtrs_clt_req_ops - it holds the request confirmation callback
8991 * and a private pointer.
9092 * @priv: User supplied private data.
9193 * @conf_fn: callback function to be called as confirmation
@@ -105,7 +107,11 @@ int rtrs_clt_request(int dir, struct rtrs_clt_req_ops *ops, · 13 unmodified lines
105107 int rtrs_clt_rdma_cq_direct(struct rtrs_clt_sess *clt, unsigned int index);
106108
107109 /**
108− * rtrs_attrs - RTRS session attributes
110+ * struct rtrs_attrs - RTRS session attributes
111+ * @queue_depth: queue_depth saved from rtrs_clt_sess message
112+ * @max_io_size: max_io_size from rtrs_clt_sess message, capped to
113+ * @max_segments * %SZ_4K
114+ * @max_segments: max_segments saved from rtrs_clt_sess message
109115 */
110116 struct rtrs_attrs {
111117 u32 queue_depth;
include/uapi/rdma/irdma-abi.h+1−1
@@ -57,8 +57,8 @@ struct irdma_alloc_ucontext_resp { · 56 unmodified lines
5757 __u8 rsvd2;
5858 __aligned_u64 comp_mask;
5959 __u16 min_hw_wq_size;
60+ __u8 revd3[2];
6061 __u32 max_hw_srq_quanta;
61− __u8 rsvd3[2];
6262 };
6363
6464 struct irdma_alloc_pd_resp {
include/uapi/rdma/rdma_user_cm.h+3−1
@@ -192,6 +192,7 @@ struct rdma_ucm_query_path_resp { · 191 unmodified lines
192192
193193 struct rdma_ucm_query_ib_service_resp {
194194 __u32 num_service_recs;
195+ __u32 reserved;
195196 struct ib_user_service_rec recs[];
196197 };
197198
@@ -354,7 +355,7 @@ enum { · 156 unmodified lines
354355
355356 #define RDMA_USER_CM_IB_SERVICE_NAME_SIZE 64
356357 struct rdma_ucm_ib_service {
357− __u64 service_id;
358+ __aligned_u64 service_id;
358359 __u8 service_name[RDMA_USER_CM_IB_SERVICE_NAME_SIZE];
359360 __u32 flags;
360361 __u32 reserved;
@@ -362,6 +363,7 @@ struct rdma_ucm_ib_service { · 1 unmodified line
362363
363364 struct rdma_ucm_resolve_ib_service {
364365 __u32 id;
366+ __u32 reserved;
365367 struct rdma_ucm_ib_service ibs;
366368 };
367369

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t