hc
2024-09-20 cf4ce59b3b70238352c7f1729f0f7223214828ad
kernel/fs/cifs/smbdirect.h
....@@ -1,17 +1,8 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /*
23 * Copyright (C) 2017, Microsoft Corporation.
34 *
45 * Author(s): Long Li <longli@microsoft.com>
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License as published by
8
- * the Free Software Foundation; either version 2 of the License, or
9
- * (at your option) any later version.
10
- *
11
- * This program is distributed in the hope that it will be useful,
12
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
14
- * the GNU General Public License for more details.
156 */
167 #ifndef _SMBDIRECT_H
178 #define _SMBDIRECT_H
....@@ -70,14 +61,12 @@
7061 int ri_rc;
7162 struct completion ri_done;
7263 wait_queue_head_t conn_wait;
73
- wait_queue_head_t wait_destroy;
64
+ wait_queue_head_t disconn_wait;
7465
7566 struct completion negotiate_completion;
7667 bool negotiate_done;
7768
78
- struct work_struct destroy_work;
7969 struct work_struct disconnect_work;
80
- struct work_struct recv_done_work;
8170 struct work_struct post_send_credits_work;
8271
8372 spinlock_t lock_new_credits_offered;
....@@ -123,17 +112,9 @@
123112 wait_queue_head_t wait_for_mr_cleanup;
124113
125114 /* Activity accoutning */
126
- /* Pending reqeusts issued from upper layer */
127
- int smbd_send_pending;
128
- wait_queue_head_t wait_smbd_send_pending;
129
-
130
- int smbd_recv_pending;
131
- wait_queue_head_t wait_smbd_recv_pending;
132
-
133115 atomic_t send_pending;
134116 wait_queue_head_t wait_send_pending;
135
- atomic_t send_payload_pending;
136
- wait_queue_head_t wait_send_payload_pending;
117
+ wait_queue_head_t wait_post_send;
137118
138119 /* Receive queue */
139120 struct list_head receive_queue;
....@@ -172,7 +153,6 @@
172153
173154 struct workqueue_struct *workqueue;
174155 struct delayed_work idle_timer_work;
175
- struct delayed_work send_immediate_work;
176156
177157 /* Memory pool for preallocating buffers */
178158 /* request pool for RDMA send */
....@@ -252,9 +232,6 @@
252232 struct smbd_connection *info;
253233 struct ib_cqe cqe;
254234
255
- /* true if this request carries upper layer payload */
256
- bool has_payload;
257
-
258235 /* the SGE entries for this packet */
259236 struct ib_sge sge[SMBDIRECT_MAX_SGE];
260237 int num_sge;
....@@ -288,7 +265,7 @@
288265 /* Reconnect SMBDirect session */
289266 int smbd_reconnect(struct TCP_Server_Info *server);
290267 /* Destroy SMBDirect session */
291
-void smbd_destroy(struct smbd_connection *info);
268
+void smbd_destroy(struct TCP_Server_Info *server);
292269
293270 /* Interface for carrying upper layer I/O through send/recv */
294271 int smbd_recv(struct smbd_connection *info, struct msghdr *msg);
....@@ -331,7 +308,7 @@
331308 static inline void *smbd_get_connection(
332309 struct TCP_Server_Info *server, struct sockaddr *dstaddr) {return NULL;}
333310 static inline int smbd_reconnect(struct TCP_Server_Info *server) {return -1; }
334
-static inline void smbd_destroy(struct smbd_connection *info) {}
311
+static inline void smbd_destroy(struct TCP_Server_Info *server) {}
335312 static inline int smbd_recv(struct smbd_connection *info, struct msghdr *msg) {return -1; }
336313 static inline int smbd_send(struct TCP_Server_Info *server, int num_rqst, struct smb_rqst *rqst) {return -1; }
337314 #endif