Skip to content

Commit c1776cc

Browse files
rddunlapjgunthorpe
authored andcommitted
RTRS/rtrs: clean up rtrs headers kernel-doc
Fix all (30+) kernel-doc warnings in rtrs.h and rtrs-pri.h. The changes are: - add ending ':' to enum member names - change enum description separators from '-' to ':' - add "struct" keyword to kernel-doc for structs where missing - fix enum names in enum rtrs_clt_con_type - add a '-' separator and drop the "()" in enum rtrs_clt_con_type - convert struct rtrs_addr to kernel-doc format - add missing struct member descriptions for struct rtrs_attrs Link: https://patch.msgid.link/r/20251129022146.1498273-1-rdunlap@infradead.org Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Acked-by: Jack Wang <jinpu.wang@ionos.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
1 parent 6f05611 commit c1776cc

2 files changed

Lines changed: 36 additions & 20 deletions

File tree

drivers/infiniband/ulp/rtrs/rtrs-pri.h

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ enum rtrs_msg_types {
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 {
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 {
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 {
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,35 +227,39 @@ struct rtrs_msg_conn_rsp {
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
244251
*/
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 {
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 {
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 {
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

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,26 @@ struct rtrs_srv_op;
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,
3232
RTRS_CLT_LINK_EV_DISCONNECTED,
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;
4042
struct sockaddr_storage *dst;
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 {
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,
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,
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;

0 commit comments

Comments
 (0)