/net/smc/ |
D | smc_close.c | 33 static void smc_close_wait_tx_pends(struct smc_sock *smc) in smc_close_wait_tx_pends() argument 36 struct sock *sk = &smc->sk; in smc_close_wait_tx_pends() 45 !smc_cdc_tx_has_pending(&smc->conn), in smc_close_wait_tx_pends() 54 static void smc_close_stream_wait(struct smc_sock *smc, long timeout) in smc_close_stream_wait() argument 57 struct sock *sk = &smc->sk; in smc_close_stream_wait() 62 if (!smc_tx_prepared_sends(&smc->conn)) in smc_close_stream_wait() 65 smc->wait_close_tx_prepared = 1; in smc_close_stream_wait() 71 !smc_tx_prepared_sends(&smc->conn) || in smc_close_stream_wait() 79 smc->wait_close_tx_prepared = 0; in smc_close_stream_wait() 82 void smc_close_wake_tx_prepared(struct smc_sock *smc) in smc_close_wake_tx_prepared() argument [all …]
|
D | af_smc.c | 60 struct smc_sock *smc = smc_sk(sk); in smc_set_keepalive() local 62 smc->clcsock->sk->sk_prot->keepalive(smc->clcsock->sk, val); in smc_set_keepalive() 111 struct smc_sock *smc; in smc_release() local 117 smc = smc_sk(sk); in smc_release() 127 if (smc->use_fallback) { in smc_release() 131 rc = smc_close_active(smc); in smc_release() 135 if (smc->clcsock) { in smc_release() 136 if (smc->use_fallback && sk->sk_state == SMC_LISTEN) { in smc_release() 138 rc = kernel_sock_shutdown(smc->clcsock, SHUT_RDWR); in smc_release() 140 mutex_lock(&smc->clcsock_release_lock); in smc_release() [all …]
|
D | smc_cdc.c | 37 struct smc_sock *smc; in smc_cdc_tx_handler() local 44 smc = container_of(cdcpend->conn, struct smc_sock, conn); in smc_cdc_tx_handler() 45 bh_lock_sock(&smc->sk); in smc_cdc_tx_handler() 59 smc_tx_sndbuf_nonfull(smc); in smc_cdc_tx_handler() 60 if (smc->sk.sk_state != SMC_ACTIVE) in smc_cdc_tx_handler() 62 smc->sk.sk_state_change(&smc->sk); in smc_cdc_tx_handler() 63 bh_unlock_sock(&smc->sk); in smc_cdc_tx_handler() 172 static void smc_cdc_msg_recv_action(struct smc_sock *smc, in smc_cdc_msg_recv_action() argument 177 struct smc_connection *conn = &smc->conn; in smc_cdc_msg_recv_action() 214 smc->sk.sk_data_ready(&smc->sk); in smc_cdc_msg_recv_action() [all …]
|
D | smc_clc.c | 31 int smc_clc_wait_msg(struct smc_sock *smc, void *buf, int buflen, in smc_clc_wait_msg() argument 34 struct sock *clc_sk = smc->clcsock->sk; in smc_clc_wait_msg() 49 smc->clcsock->sk->sk_rcvtimeo = CLC_WAIT_TIME; in smc_clc_wait_msg() 50 len = kernel_recvmsg(smc->clcsock, &msg, &vec, 1, in smc_clc_wait_msg() 55 smc->sk.sk_err = EINTR; in smc_clc_wait_msg() 60 smc->sk.sk_err = clc_sk->sk_err; in smc_clc_wait_msg() 64 smc->sk.sk_err = ECONNRESET; in smc_clc_wait_msg() 69 smc->sk.sk_err = -len; in smc_clc_wait_msg() 80 smc->sk.sk_err = EPROTO; in smc_clc_wait_msg() 90 smc->clcsock->sk->sk_rcvtimeo = CLC_WAIT_TIME; in smc_clc_wait_msg() [all …]
|
D | smc_diag.c | 39 struct smc_sock *smc = smc_sk(sk); in smc_diag_msg_common_fill() local 44 if (!smc->clcsock) in smc_diag_msg_common_fill() 46 r->id.idiag_sport = htons(smc->clcsock->sk->sk_num); in smc_diag_msg_common_fill() 47 r->id.idiag_dport = smc->clcsock->sk->sk_dport; in smc_diag_msg_common_fill() 48 r->id.idiag_if = smc->clcsock->sk->sk_bound_dev_if; in smc_diag_msg_common_fill() 49 r->id.idiag_src[0] = smc->clcsock->sk->sk_rcv_saddr; in smc_diag_msg_common_fill() 50 r->id.idiag_dst[0] = smc->clcsock->sk->sk_daddr; in smc_diag_msg_common_fill() 70 struct smc_sock *smc = smc_sk(sk); in __smc_diag_dump() local 83 r->diag_fallback = smc->use_fallback; in __smc_diag_dump() 88 if ((req->diag_ext & (1 << (SMC_DIAG_CONNINFO - 1))) && smc->conn.lgr) { in __smc_diag_dump() [all …]
|
D | smc_tx.c | 39 struct smc_sock *smc = smc_sk(sk); in smc_tx_write_space() local 43 if (atomic_read(&smc->conn.sndbuf_space) && sock) { in smc_tx_write_space() 60 void smc_tx_sndbuf_nonfull(struct smc_sock *smc) in smc_tx_sndbuf_nonfull() argument 62 if (smc->sk.sk_socket && in smc_tx_sndbuf_nonfull() 63 test_bit(SOCK_NOSPACE, &smc->sk.sk_socket->flags)) in smc_tx_sndbuf_nonfull() 64 smc->sk.sk_write_space(&smc->sk); in smc_tx_sndbuf_nonfull() 68 static int smc_tx_wait_memory(struct smc_sock *smc, int flags) in smc_tx_wait_memory() argument 71 struct smc_connection *conn = &smc->conn; in smc_tx_wait_memory() 72 struct sock *sk = &smc->sk; in smc_tx_wait_memory() 121 int smc_tx_sendmsg(struct smc_sock *smc, struct msghdr *msg, size_t len) in smc_tx_sendmsg() argument [all …]
|
D | smc_core.c | 69 struct smc_sock *smc = container_of(conn, struct smc_sock, conn); in smc_lgr_register_conn() local 75 sock_hold(&smc->sk); /* sock_put in smc_lgr_unregister_conn() */ in smc_lgr_register_conn() 89 struct smc_sock *smc = container_of(conn, struct smc_sock, conn); in __smc_lgr_unregister_conn() local 96 sock_put(&smc->sk); /* sock_hold in smc_lgr_register_conn() */ in __smc_lgr_unregister_conn() 146 static int smc_lgr_create(struct smc_sock *smc, __be32 peer_in_addr, in smc_lgr_create() argument 161 lgr->role = smc->listen_smc ? SMC_SERV : SMC_CLNT; in smc_lgr_create() 202 smc->conn.lgr = lgr; in smc_lgr_create() 315 struct smc_sock *smc; in smc_lgr_terminate() local 332 smc = container_of(conn, struct smc_sock, conn); in smc_lgr_terminate() 333 sock_hold(&smc->sk); in smc_lgr_terminate() [all …]
|
D | smc_rx.c | 54 static int smc_rx_wait_data(struct smc_sock *smc, long *timeo) in smc_rx_wait_data() argument 57 struct smc_connection *conn = &smc->conn; in smc_rx_wait_data() 58 struct sock *sk = &smc->sk; in smc_rx_wait_data() 80 int smc_rx_recvmsg(struct smc_sock *smc, struct msghdr *msg, size_t len, in smc_rx_recvmsg() argument 85 struct smc_connection *conn = &smc->conn; in smc_rx_recvmsg() 99 sk = &smc->sk; in smc_rx_recvmsg() 157 smc_rx_wait_data(smc, &timeo); in smc_rx_recvmsg() 221 void smc_rx_init(struct smc_sock *smc) in smc_rx_init() argument 223 smc->sk.sk_data_ready = smc_rx_data_ready; in smc_rx_init()
|
D | smc_close.h | 22 void smc_close_wake_tx_prepared(struct smc_sock *smc); 23 void smc_close_active_abort(struct smc_sock *smc); 24 int smc_close_active(struct smc_sock *smc); 26 int smc_close_shutdown_write(struct smc_sock *smc); 27 void smc_close_init(struct smc_sock *smc);
|
D | smc_clc.h | 108 int smc_clc_wait_msg(struct smc_sock *smc, void *buf, int buflen, 110 int smc_clc_send_decline(struct smc_sock *smc, u32 peer_diag_info); 111 int smc_clc_send_proposal(struct smc_sock *smc, struct smc_ib_device *smcibdev, 113 int smc_clc_send_confirm(struct smc_sock *smc); 114 int smc_clc_send_accept(struct smc_sock *smc, int srv_first_contact);
|
D | Makefile | 1 obj-$(CONFIG_SMC) += smc.o 3 smc-y := af_smc.o smc_pnet.o smc_ib.o smc_clc.o smc_core.o smc_wr.o smc_llc.o 4 smc-y += smc_cdc.o smc_tx.o smc_rx.o smc_close.o
|
D | smc_tx.h | 30 void smc_tx_init(struct smc_sock *smc); 31 int smc_tx_sendmsg(struct smc_sock *smc, struct msghdr *msg, size_t len); 33 void smc_tx_sndbuf_nonfull(struct smc_sock *smc);
|
D | smc.h | 257 static inline bool using_ipsec(struct smc_sock *smc) in using_ipsec() argument 259 return (smc->clcsock->sk->sk_policy[0] || in using_ipsec() 260 smc->clcsock->sk->sk_policy[1]) ? 1 : 0; in using_ipsec() 263 static inline bool using_ipsec(struct smc_sock *smc) in using_ipsec() argument 274 int smc_conn_create(struct smc_sock *smc, __be32 peer_in_addr,
|
D | smc_rx.h | 20 void smc_rx_init(struct smc_sock *smc); 21 int smc_rx_recvmsg(struct smc_sock *smc, struct msghdr *msg, size_t len,
|
D | smc_core.h | 190 int smc_buf_create(struct smc_sock *smc);
|
/net/ |
D | Makefile | 55 obj-$(CONFIG_SMC) += smc/
|
D | Kconfig | 61 source "net/smc/Kconfig"
|