Lines Matching full:smc

3  * Shared Memory Communications over RDMA (SMC-R) and RoCE
15 #include "smc.h"
31 struct smc_sock *smc; in smc_cdc_tx_handler() local
38 smc = container_of(conn, struct smc_sock, conn); in smc_cdc_tx_handler()
39 bh_lock_sock(&smc->sk); in smc_cdc_tx_handler()
54 smc_tx_sndbuf_nonfull(smc); in smc_cdc_tx_handler()
55 bh_unlock_sock(&smc->sk); in smc_cdc_tx_handler()
218 /* Send a SMC-D CDC header.
224 struct smc_sock *smc = container_of(conn, struct smc_sock, conn); in smcd_cdc_msg_send() local
254 smc_tx_sndbuf_nonfull(smc); in smcd_cdc_msg_send()
265 static void smc_cdc_handle_urg_data_arrival(struct smc_sock *smc, in smc_cdc_handle_urg_data_arrival() argument
268 struct smc_connection *conn = &smc->conn; in smc_cdc_handle_urg_data_arrival()
274 if (!sock_flag(&smc->sk, SOCK_URGINLINE)) in smc_cdc_handle_urg_data_arrival()
282 sk_send_sigurg(&smc->sk); in smc_cdc_handle_urg_data_arrival()
285 static void smc_cdc_msg_validate(struct smc_sock *smc, struct smc_cdc_msg *cdc, in smc_cdc_msg_validate() argument
288 struct smc_connection *conn = &smc->conn; in smc_cdc_msg_validate()
301 sock_hold(&smc->sk); /* sock_put in abort_work */ in smc_cdc_msg_validate()
303 sock_put(&smc->sk); in smc_cdc_msg_validate()
307 static void smc_cdc_msg_recv_action(struct smc_sock *smc, in smc_cdc_msg_recv_action() argument
311 struct smc_connection *conn = &smc->conn; in smc_cdc_msg_recv_action()
334 smc_cdc_handle_urg_data_arrival(smc, &diff_prod); in smc_cdc_msg_recv_action()
340 smc->sk.sk_data_ready(&smc->sk); in smc_cdc_msg_recv_action()
343 smc->sk.sk_data_ready(&smc->sk); in smc_cdc_msg_recv_action()
358 smc->sk.sk_write_space(&smc->sk); in smc_cdc_msg_recv_action()
362 smc->sk.sk_err = ECONNRESET; in smc_cdc_msg_recv_action()
366 smc->sk.sk_shutdown |= RCV_SHUTDOWN; in smc_cdc_msg_recv_action()
367 if (smc->clcsock && smc->clcsock->sk) in smc_cdc_msg_recv_action()
368 smc->clcsock->sk->sk_shutdown |= RCV_SHUTDOWN; in smc_cdc_msg_recv_action()
369 sock_set_flag(&smc->sk, SOCK_DONE); in smc_cdc_msg_recv_action()
370 sock_hold(&smc->sk); /* sock_put in close_work */ in smc_cdc_msg_recv_action()
372 sock_put(&smc->sk); in smc_cdc_msg_recv_action()
377 static void smc_cdc_msg_recv(struct smc_sock *smc, struct smc_cdc_msg *cdc) in smc_cdc_msg_recv() argument
379 sock_hold(&smc->sk); in smc_cdc_msg_recv()
380 bh_lock_sock(&smc->sk); in smc_cdc_msg_recv()
381 smc_cdc_msg_recv_action(smc, cdc); in smc_cdc_msg_recv()
382 bh_unlock_sock(&smc->sk); in smc_cdc_msg_recv()
383 sock_put(&smc->sk); /* no free sk in softirq-context */ in smc_cdc_msg_recv()
397 struct smc_sock *smc; in smcd_cdc_rx_tsklet() local
405 smc = container_of(conn, struct smc_sock, conn); in smcd_cdc_rx_tsklet()
406 smc_cdc_msg_recv(smc, (struct smc_cdc_msg *)&cdc); in smcd_cdc_rx_tsklet()
425 struct smc_sock *smc; in smc_cdc_rx_handler() local
439 smc = container_of(conn, struct smc_sock, conn); in smc_cdc_rx_handler()
442 smc_cdc_msg_validate(smc, cdc, link); in smc_cdc_rx_handler()
450 smc_cdc_msg_recv(smc, cdc); in smc_cdc_rx_handler()