aboutsummaryrefslogtreecommitdiffstats
path: root/net/smc/smc_core.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/smc/smc_core.h')
-rw-r--r--net/smc/smc_core.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/net/smc/smc_core.h b/net/smc/smc_core.h
index 3d4bd7011ab3..93cb3523bf50 100644
--- a/net/smc/smc_core.h
+++ b/net/smc/smc_core.h
@@ -141,6 +141,12 @@ struct smc_rtoken { /* address/key of remote RMB */
141}; 141};
142 142
143#define SMC_LGR_ID_SIZE 4 143#define SMC_LGR_ID_SIZE 4
144#define SMC_BUF_MIN_SIZE 16384 /* minimum size of an RMB */
145#define SMC_RMBE_SIZES 16 /* number of distinct RMBE sizes */
146/* theoretically, the RFC states that largest size would be 512K,
147 * i.e. compressed 5 and thus 6 sizes (0..5), despite
148 * struct smc_clc_msg_accept_confirm.rmbe_size being a 4 bit value (0..15)
149 */
144 150
145struct smc_link_group { 151struct smc_link_group {
146 struct list_head list; 152 struct list_head list;
@@ -205,12 +211,14 @@ static inline struct smc_connection *smc_lgr_find_conn(
205 211
206struct smc_sock; 212struct smc_sock;
207struct smc_clc_msg_accept_confirm; 213struct smc_clc_msg_accept_confirm;
214struct smc_clc_msg_local;
208 215
209void smc_lgr_free(struct smc_link_group *lgr); 216void smc_lgr_free(struct smc_link_group *lgr);
210void smc_lgr_forget(struct smc_link_group *lgr); 217void smc_lgr_forget(struct smc_link_group *lgr);
211void smc_lgr_terminate(struct smc_link_group *lgr); 218void smc_lgr_terminate(struct smc_link_group *lgr);
212void smc_port_terminate(struct smc_ib_device *smcibdev, u8 ibport); 219void smc_port_terminate(struct smc_ib_device *smcibdev, u8 ibport);
213int smc_buf_create(struct smc_sock *smc); 220int smc_buf_create(struct smc_sock *smc);
221int smc_uncompress_bufsize(u8 compressed);
214int smc_rmb_rtoken_handling(struct smc_connection *conn, 222int smc_rmb_rtoken_handling(struct smc_connection *conn,
215 struct smc_clc_msg_accept_confirm *clc); 223 struct smc_clc_msg_accept_confirm *clc);
216int smc_rtoken_add(struct smc_link_group *lgr, __be64 nw_vaddr, __be32 nw_rkey); 224int smc_rtoken_add(struct smc_link_group *lgr, __be64 nw_vaddr, __be32 nw_rkey);
@@ -219,5 +227,9 @@ void smc_sndbuf_sync_sg_for_cpu(struct smc_connection *conn);
219void smc_sndbuf_sync_sg_for_device(struct smc_connection *conn); 227void smc_sndbuf_sync_sg_for_device(struct smc_connection *conn);
220void smc_rmb_sync_sg_for_cpu(struct smc_connection *conn); 228void smc_rmb_sync_sg_for_cpu(struct smc_connection *conn);
221void smc_rmb_sync_sg_for_device(struct smc_connection *conn); 229void smc_rmb_sync_sg_for_device(struct smc_connection *conn);
230void smc_conn_free(struct smc_connection *conn);
231int smc_conn_create(struct smc_sock *smc,
232 struct smc_ib_device *smcibdev, u8 ibport,
233 struct smc_clc_msg_local *lcl, int srv_first_contact);
222void smc_core_exit(void); 234void smc_core_exit(void);
223#endif 235#endif