/net/smc/ |
D | af_smc.c | 86 sock_net(skb->sk)->smc.limit_smc_hs)) in smc_nl_dump_hs_limitation() 100 sock_net(skb->sk)->smc.limit_smc_hs = true; in smc_nl_enable_hs_limitation() 106 sock_net(skb->sk)->smc.limit_smc_hs = false; in smc_nl_disable_hs_limitation() 112 struct smc_sock *smc = smc_sk(sk); in smc_set_keepalive() local 114 smc->clcsock->sk->sk_prot->keepalive(smc->clcsock->sk, val); in smc_set_keepalive() 124 struct smc_sock *smc; in smc_tcp_syn_recv_sock() local 127 smc = smc_clcsock_user_data(sk); in smc_tcp_syn_recv_sock() 129 if (READ_ONCE(sk->sk_ack_backlog) + atomic_read(&smc->queued_smc_hs) > in smc_tcp_syn_recv_sock() 133 if (sk_acceptq_is_full(&smc->sk)) { in smc_tcp_syn_recv_sock() 139 child = smc->ori_af_ops->syn_recv_sock(sk, skb, req, dst, req_unhash, in smc_tcp_syn_recv_sock() [all …]
|
D | smc_close.c | 24 void smc_clcsock_release(struct smc_sock *smc) in smc_clcsock_release() argument 28 if (smc->listen_smc && current_work() != &smc->smc_listen_work) in smc_clcsock_release() 29 cancel_work_sync(&smc->smc_listen_work); in smc_clcsock_release() 30 mutex_lock(&smc->clcsock_release_lock); in smc_clcsock_release() 31 if (smc->clcsock) { in smc_clcsock_release() 32 tcp = smc->clcsock; in smc_clcsock_release() 33 smc->clcsock = NULL; in smc_clcsock_release() 36 mutex_unlock(&smc->clcsock_release_lock); in smc_clcsock_release() 49 static void smc_close_stream_wait(struct smc_sock *smc, long timeout) in smc_close_stream_wait() argument 52 struct sock *sk = &smc->sk; in smc_close_stream_wait() [all …]
|
D | smc_rx.c | 59 static int smc_rx_update_consumer(struct smc_sock *smc, in smc_rx_update_consumer() argument 62 struct smc_connection *conn = &smc->conn; in smc_rx_update_consumer() 63 struct sock *sk = &smc->sk; in smc_rx_update_consumer() 100 static void smc_rx_update_cons(struct smc_sock *smc, size_t len) in smc_rx_update_cons() argument 102 struct smc_connection *conn = &smc->conn; in smc_rx_update_cons() 106 smc_rx_update_consumer(smc, cons, len); in smc_rx_update_cons() 110 struct smc_sock *smc; member 118 struct smc_sock *smc = priv->smc; in smc_rx_pipe_buf_release() local 120 struct sock *sk = &smc->sk; in smc_rx_pipe_buf_release() 126 conn = &smc->conn; in smc_rx_pipe_buf_release() [all …]
|
D | smc_stats.h | 85 struct smc_stats_tech smc[2]; member 98 this_cpu_inc((*stats).smc[t].key ## _cnt); \ 103 this_cpu_inc((*stats).smc[t].key ## _pd.buf[_pos]); \ 104 this_cpu_add((*stats).smc[t].key ## _bytes, r); \ 112 struct smc_stats __percpu *_smc_stats = _net->smc.smc_stats; \ 127 struct smc_stats __percpu *_smc_stats = _net->smc.smc_stats; \ 148 this_cpu_inc((*(_smc_stats)).smc[t].k ## _rmbsize.buf[_pos]); \ 153 this_cpu_inc((*(_smc_stats)).smc[t].rmb ## _ ## key.type ## _cnt) 158 struct smc_stats __percpu *_smc_stats = _net->smc.smc_stats; \ 176 struct smc_stats __percpu *_smc_stats = net->smc.smc_stats; \ [all …]
|
D | smc_cdc.c | 32 struct smc_sock *smc; in smc_cdc_tx_handler() local 36 smc = container_of(conn, struct smc_sock, conn); in smc_cdc_tx_handler() 37 bh_lock_sock(&smc->sk); in smc_cdc_tx_handler() 58 if (sock_owned_by_user(&smc->sk)) in smc_cdc_tx_handler() 68 smc_tx_sndbuf_nonfull(smc); in smc_cdc_tx_handler() 69 bh_unlock_sock(&smc->sk); in smc_cdc_tx_handler() 238 struct smc_sock *smc = container_of(conn, struct smc_sock, conn); in smcd_cdc_msg_send() local 268 smc_tx_sndbuf_nonfull(smc); in smcd_cdc_msg_send() 279 static void smc_cdc_handle_urg_data_arrival(struct smc_sock *smc, in smc_cdc_handle_urg_data_arrival() argument 282 struct smc_connection *conn = &smc->conn; in smc_cdc_handle_urg_data_arrival() [all …]
|
D | smc_tracepoint.h | 4 #define TRACE_SYSTEM smc 18 TP_PROTO(const struct smc_sock *smc, int fallback_rsn), 20 TP_ARGS(smc, fallback_rsn), 30 const struct sock *sk = &smc->sk; 31 const struct sock *clcsk = smc->clcsock->sk; 46 TP_PROTO(const struct smc_sock *smc, size_t len), 48 TP_ARGS(smc, len), 51 __field(const void *, smc) 54 __string(name, smc->conn.lnk->ibname) 58 const struct sock *sk = &smc->sk; [all …]
|
D | smc_tx.c | 44 struct smc_sock *smc = smc_sk(sk); in smc_tx_write_space() local 48 if (atomic_read(&smc->conn.sndbuf_space) && sock) { in smc_tx_write_space() 50 SMC_STAT_RMB_TX_FULL(smc, !smc->conn.lnk); in smc_tx_write_space() 67 void smc_tx_sndbuf_nonfull(struct smc_sock *smc) in smc_tx_sndbuf_nonfull() argument 69 if (smc->sk.sk_socket && in smc_tx_sndbuf_nonfull() 70 test_bit(SOCK_NOSPACE, &smc->sk.sk_socket->flags)) in smc_tx_sndbuf_nonfull() 71 smc->sk.sk_write_space(&smc->sk); in smc_tx_sndbuf_nonfull() 77 static int smc_tx_wait(struct smc_sock *smc, int flags) in smc_tx_wait() argument 80 struct smc_connection *conn = &smc->conn; in smc_tx_wait() 81 struct sock *sk = &smc->sk; in smc_tx_wait() [all …]
|
D | smc_diag.c | 36 struct smc_sock *smc = smc_sk(sk); in smc_diag_msg_common_fill() local 41 if (!smc->clcsock) in smc_diag_msg_common_fill() 43 r->id.idiag_sport = htons(smc->clcsock->sk->sk_num); in smc_diag_msg_common_fill() 44 r->id.idiag_dport = smc->clcsock->sk->sk_dport; in smc_diag_msg_common_fill() 45 r->id.idiag_if = smc->clcsock->sk->sk_bound_dev_if; in smc_diag_msg_common_fill() 47 r->id.idiag_src[0] = smc->clcsock->sk->sk_rcv_saddr; in smc_diag_msg_common_fill() 48 r->id.idiag_dst[0] = smc->clcsock->sk->sk_daddr; in smc_diag_msg_common_fill() 51 memcpy(&r->id.idiag_src, &smc->clcsock->sk->sk_v6_rcv_saddr, in smc_diag_msg_common_fill() 52 sizeof(smc->clcsock->sk->sk_v6_rcv_saddr)); in smc_diag_msg_common_fill() 53 memcpy(&r->id.idiag_dst, &smc->clcsock->sk->sk_v6_daddr, in smc_diag_msg_common_fill() [all …]
|
D | smc_sysctl.c | 32 .data = &init_net.smc.sysctl_autocorking_size, 39 .data = &init_net.smc.sysctl_smcr_buf_type, 48 .data = &init_net.smc.sysctl_smcr_testlink_time, 55 .data = &init_net.smc.sysctl_wmem, 64 .data = &init_net.smc.sysctl_rmem, 90 net->smc.smc_hdr = register_net_sysctl_sz(net, "net/smc", table, in smc_sysctl_net_init() 92 if (!net->smc.smc_hdr) in smc_sysctl_net_init() 95 net->smc.sysctl_autocorking_size = SMC_AUTOCORKING_DEFAULT_SIZE; in smc_sysctl_net_init() 96 net->smc.sysctl_smcr_buf_type = SMCR_PHYS_CONT_BUFS; in smc_sysctl_net_init() 97 net->smc.sysctl_smcr_testlink_time = SMC_LLC_TESTLINK_DEFAULT_TIME; in smc_sysctl_net_init() [all …]
|
D | smc_stats.c | 23 net->smc.fback_rsn = kzalloc(sizeof(*net->smc.fback_rsn), GFP_KERNEL); in smc_stats_init() 24 if (!net->smc.fback_rsn) in smc_stats_init() 26 net->smc.smc_stats = alloc_percpu(struct smc_stats); in smc_stats_init() 27 if (!net->smc.smc_stats) in smc_stats_init() 29 mutex_init(&net->smc.mutex_fback_rsn); in smc_stats_init() 33 kfree(net->smc.fback_rsn); in smc_stats_init() 40 kfree(net->smc.fback_rsn); in smc_stats_exit() 41 if (net->smc.smc_stats) in smc_stats_exit() 42 free_percpu(net->smc.smc_stats); in smc_stats_exit() 53 stats_rmb_cnt = &stats->smc[tech].rmb_tx; in smc_nl_fill_stats_rmb_data() [all …]
|
D | smc_close.h | 22 void smc_close_wake_tx_prepared(struct smc_sock *smc); 23 int smc_close_active(struct smc_sock *smc); 24 int smc_close_shutdown_write(struct smc_sock *smc); 25 void smc_close_init(struct smc_sock *smc); 26 void smc_clcsock_release(struct smc_sock *smc); 28 void smc_close_active_abort(struct smc_sock *smc);
|
D | smc_core.c | 169 struct smc_sock *smc = container_of(conn, struct smc_sock, conn); in smc_lgr_register_conn() local 183 sock_hold(&smc->sk); /* sock_put in smc_lgr_unregister_conn() */ in smc_lgr_register_conn() 198 struct smc_sock *smc = container_of(conn, struct smc_sock, conn); in __smc_lgr_unregister_conn() local 206 sock_put(&smc->sk); /* sock_hold in smc_lgr_register_conn() */ in __smc_lgr_unregister_conn() 826 static int smc_lgr_create(struct smc_sock *smc, struct smc_init_info *ini) in smc_lgr_create() argument 891 lgr->role = smc->listen_smc ? SMC_SERV : SMC_CLNT; in smc_lgr_create() 915 smc_llc_lgr_init(lgr, smc); in smc_lgr_create() 927 lgr->buf_type = lgr->net->smc.sysctl_smcr_buf_type; in smc_lgr_create() 930 smc->conn.lgr = lgr; in smc_lgr_create() 967 static int smc_switch_cursor(struct smc_sock *smc, struct smc_cdc_tx_pend *pend, in smc_switch_cursor() argument [all …]
|
D | smc_clc.c | 677 int smc_clc_wait_msg(struct smc_sock *smc, void *buf, int buflen, in smc_clc_wait_msg() argument 680 long rcvtimeo = smc->clcsock->sk->sk_rcvtimeo; in smc_clc_wait_msg() 681 struct sock *clc_sk = smc->clcsock->sk; in smc_clc_wait_msg() 702 len = sock_recvmsg(smc->clcsock, &msg, krflags); in smc_clc_wait_msg() 706 smc->sk.sk_err = EINTR; in smc_clc_wait_msg() 715 smc->sk.sk_err = clc_sk->sk_err; in smc_clc_wait_msg() 719 smc->sk.sk_err = ECONNRESET; in smc_clc_wait_msg() 725 smc->sk.sk_err = -len; in smc_clc_wait_msg() 734 smc->sk.sk_err = EPROTO; in smc_clc_wait_msg() 749 len = sock_recvmsg(smc->clcsock, &msg, krflags); in smc_clc_wait_msg() [all …]
|
D | Makefile | 3 obj-$(CONFIG_SMC) += smc.o 5 smc-y := af_smc.o smc_pnet.o smc_ib.o smc_clc.o smc_core.o smc_wr.o smc_llc.o 6 smc-y += smc_cdc.o smc_tx.o smc_rx.o smc_close.o smc_ism.o smc_netlink.o smc_stats.o 7 smc-y += smc_tracepoint.o 8 smc-$(CONFIG_SYSCTL) += smc_sysctl.o
|
D | smc.h | 291 static inline void smc_init_saved_callbacks(struct smc_sock *smc) in smc_init_saved_callbacks() argument 293 smc->clcsk_state_change = NULL; in smc_init_saved_callbacks() 294 smc->clcsk_data_ready = NULL; in smc_init_saved_callbacks() 295 smc->clcsk_write_space = NULL; in smc_init_saved_callbacks() 296 smc->clcsk_error_report = NULL; in smc_init_saved_callbacks() 355 static inline bool using_ipsec(struct smc_sock *smc) in using_ipsec() argument 357 return (smc->clcsock->sk->sk_policy[0] || in using_ipsec() 358 smc->clcsock->sk->sk_policy[1]) ? true : false; in using_ipsec() 361 static inline bool using_ipsec(struct smc_sock *smc) in using_ipsec() argument
|
D | smc_rx.h | 20 void smc_rx_init(struct smc_sock *smc); 22 int smc_rx_recvmsg(struct smc_sock *smc, struct msghdr *msg, 24 int smc_rx_wait(struct smc_sock *smc, long *timeo,
|
D | smc_tx.h | 32 void smc_tx_init(struct smc_sock *smc); 33 int smc_tx_sendmsg(struct smc_sock *smc, struct msghdr *msg, size_t len); 35 void smc_tx_sndbuf_nonfull(struct smc_sock *smc);
|
D | smc_clc.h | 417 int smc_clc_wait_msg(struct smc_sock *smc, void *buf, int buflen, 419 int smc_clc_send_decline(struct smc_sock *smc, u32 peer_diag_info, u8 version); 420 int smc_clc_send_proposal(struct smc_sock *smc, struct smc_init_info *ini); 421 int smc_clc_send_confirm(struct smc_sock *smc, bool clnt_first_contact, 423 int smc_clc_send_accept(struct smc_sock *smc, bool srv_first_contact,
|
D | smc_sysctl.h | 25 net->smc.sysctl_autocorking_size = SMC_AUTOCORKING_DEFAULT_SIZE; in smc_sysctl_net_init()
|
D | smc_llc.h | 91 void smc_llc_lgr_init(struct smc_link_group *lgr, struct smc_sock *smc);
|
D | smc_core.h | 551 int smc_buf_create(struct smc_sock *smc, bool is_smcd); 566 int smc_conn_create(struct smc_sock *smc, struct smc_init_info *ini);
|
D | smc_llc.c | 2137 void smc_llc_lgr_init(struct smc_link_group *lgr, struct smc_sock *smc) in smc_llc_lgr_init() argument 2139 struct net *net = sock_net(smc->clcsock->sk); in smc_llc_lgr_init() 2150 lgr->llc_testlink_time = READ_ONCE(net->smc.sysctl_smcr_testlink_time); in smc_llc_lgr_init()
|
D | smc_pnet.c | 891 net->smc.limit_smc_hs = 0; in smc_pnet_net_init()
|
/net/ |
D | Makefile | 54 obj-$(CONFIG_SMC) += smc/
|
D | Kconfig | 73 source "net/smc/Kconfig"
|