Lines Matching refs:smc
55 static int smc_rx_update_consumer(struct smc_sock *smc, in smc_rx_update_consumer() argument
58 struct smc_connection *conn = &smc->conn; in smc_rx_update_consumer()
59 struct sock *sk = &smc->sk; in smc_rx_update_consumer()
96 static void smc_rx_update_cons(struct smc_sock *smc, size_t len) in smc_rx_update_cons() argument
98 struct smc_connection *conn = &smc->conn; in smc_rx_update_cons()
102 smc_rx_update_consumer(smc, cons, len); in smc_rx_update_cons()
106 struct smc_sock *smc; member
114 struct smc_sock *smc = priv->smc; in smc_rx_pipe_buf_release() local
116 struct sock *sk = &smc->sk; in smc_rx_pipe_buf_release()
122 conn = &smc->conn; in smc_rx_pipe_buf_release()
124 smc_rx_update_cons(smc, priv->len); in smc_rx_pipe_buf_release()
146 struct smc_sock *smc) in smc_rx_splice() argument
157 priv->smc = smc; in smc_rx_splice()
158 partial.offset = src - (char *)smc->conn.rmb_desc->cpu_addr; in smc_rx_splice()
164 spd.pages = &smc->conn.rmb_desc->pages; in smc_rx_splice()
171 sock_hold(&smc->sk); in smc_rx_splice()
172 get_page(smc->conn.rmb_desc->pages); in smc_rx_splice()
173 atomic_add(bytes, &smc->conn.splice_pending); in smc_rx_splice()
193 int smc_rx_wait(struct smc_sock *smc, long *timeo, in smc_rx_wait() argument
197 struct smc_connection *conn = &smc->conn; in smc_rx_wait()
200 struct sock *sk = &smc->sk; in smc_rx_wait()
219 static int smc_rx_recv_urg(struct smc_sock *smc, struct msghdr *msg, int len, in smc_rx_recv_urg() argument
222 struct smc_connection *conn = &smc->conn; in smc_rx_recv_urg()
224 struct sock *sk = &smc->sk; in smc_rx_recv_urg()
232 SMC_STAT_INC(smc, urg_data_cnt); in smc_rx_recv_urg()
235 smc->conn.urg_state = SMC_URG_READ; in smc_rx_recv_urg()
249 smc_rx_update_consumer(smc, cons, 0); in smc_rx_recv_urg()
263 static bool smc_rx_recvmsg_data_available(struct smc_sock *smc) in smc_rx_recvmsg_data_available() argument
265 struct smc_connection *conn = &smc->conn; in smc_rx_recvmsg_data_available()
271 smc_rx_update_cons(smc, 0); in smc_rx_recvmsg_data_available()
282 int smc_rx_recvmsg(struct smc_sock *smc, struct msghdr *msg, in smc_rx_recvmsg() argument
287 struct smc_connection *conn = &smc->conn; in smc_rx_recvmsg()
301 sk = &smc->sk; in smc_rx_recvmsg()
305 return smc_rx_recv_urg(smc, msg, len, flags); in smc_rx_recvmsg()
311 SMC_STAT_RMB_RX_FULL(smc, !conn->lnk); in smc_rx_recvmsg()
314 SMC_STAT_RMB_RX_SIZE_SMALL(smc, !conn->lnk); in smc_rx_recvmsg()
325 if (smc_rx_recvmsg_data_available(smc)) in smc_rx_recvmsg()
332 if (smc_rx_recvmsg_data_available(smc)) in smc_rx_recvmsg()
367 smc_rx_wait(smc, &timeo, smc_rx_data_available); in smc_rx_recvmsg()
381 smc_rx_wait(smc, &timeo, func); in smc_rx_recvmsg()
390 sock_flag(&smc->sk, SOCK_URGINLINE) && in smc_rx_recvmsg()
411 smc); in smc_rx_recvmsg()
439 if (msg && smc_rx_update_consumer(smc, cons, copylen)) in smc_rx_recvmsg()
443 trace_smc_rx_recvmsg(smc, copylen); in smc_rx_recvmsg()
450 void smc_rx_init(struct smc_sock *smc) in smc_rx_init() argument
452 smc->sk.sk_data_ready = smc_rx_wake_up; in smc_rx_init()
453 atomic_set(&smc->conn.splice_pending, 0); in smc_rx_init()
454 smc->conn.urg_state = SMC_URG_READ; in smc_rx_init()