.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */ |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (C) 2017, Microsoft Corporation. |
---|
3 | 4 | * |
---|
4 | 5 | * 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. |
---|
15 | 6 | */ |
---|
16 | 7 | #ifndef _SMBDIRECT_H |
---|
17 | 8 | #define _SMBDIRECT_H |
---|
.. | .. |
---|
70 | 61 | int ri_rc; |
---|
71 | 62 | struct completion ri_done; |
---|
72 | 63 | wait_queue_head_t conn_wait; |
---|
73 | | - wait_queue_head_t wait_destroy; |
---|
| 64 | + wait_queue_head_t disconn_wait; |
---|
74 | 65 | |
---|
75 | 66 | struct completion negotiate_completion; |
---|
76 | 67 | bool negotiate_done; |
---|
77 | 68 | |
---|
78 | | - struct work_struct destroy_work; |
---|
79 | 69 | struct work_struct disconnect_work; |
---|
80 | | - struct work_struct recv_done_work; |
---|
81 | 70 | struct work_struct post_send_credits_work; |
---|
82 | 71 | |
---|
83 | 72 | spinlock_t lock_new_credits_offered; |
---|
.. | .. |
---|
123 | 112 | wait_queue_head_t wait_for_mr_cleanup; |
---|
124 | 113 | |
---|
125 | 114 | /* 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 | | - |
---|
133 | 115 | atomic_t send_pending; |
---|
134 | 116 | 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; |
---|
137 | 118 | |
---|
138 | 119 | /* Receive queue */ |
---|
139 | 120 | struct list_head receive_queue; |
---|
.. | .. |
---|
172 | 153 | |
---|
173 | 154 | struct workqueue_struct *workqueue; |
---|
174 | 155 | struct delayed_work idle_timer_work; |
---|
175 | | - struct delayed_work send_immediate_work; |
---|
176 | 156 | |
---|
177 | 157 | /* Memory pool for preallocating buffers */ |
---|
178 | 158 | /* request pool for RDMA send */ |
---|
.. | .. |
---|
252 | 232 | struct smbd_connection *info; |
---|
253 | 233 | struct ib_cqe cqe; |
---|
254 | 234 | |
---|
255 | | - /* true if this request carries upper layer payload */ |
---|
256 | | - bool has_payload; |
---|
257 | | - |
---|
258 | 235 | /* the SGE entries for this packet */ |
---|
259 | 236 | struct ib_sge sge[SMBDIRECT_MAX_SGE]; |
---|
260 | 237 | int num_sge; |
---|
.. | .. |
---|
288 | 265 | /* Reconnect SMBDirect session */ |
---|
289 | 266 | int smbd_reconnect(struct TCP_Server_Info *server); |
---|
290 | 267 | /* Destroy SMBDirect session */ |
---|
291 | | -void smbd_destroy(struct smbd_connection *info); |
---|
| 268 | +void smbd_destroy(struct TCP_Server_Info *server); |
---|
292 | 269 | |
---|
293 | 270 | /* Interface for carrying upper layer I/O through send/recv */ |
---|
294 | 271 | int smbd_recv(struct smbd_connection *info, struct msghdr *msg); |
---|
.. | .. |
---|
331 | 308 | static inline void *smbd_get_connection( |
---|
332 | 309 | struct TCP_Server_Info *server, struct sockaddr *dstaddr) {return NULL;} |
---|
333 | 310 | 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) {} |
---|
335 | 312 | static inline int smbd_recv(struct smbd_connection *info, struct msghdr *msg) {return -1; } |
---|
336 | 313 | static inline int smbd_send(struct TCP_Server_Info *server, int num_rqst, struct smb_rqst *rqst) {return -1; } |
---|
337 | 314 | #endif |
---|