/net/smc/ |
D | smc_cdc.c | 30 struct smc_connection *conn = cdcpend->conn; in smc_cdc_tx_handler() local 35 sndbuf_desc = conn->sndbuf_desc; in smc_cdc_tx_handler() 36 smc = container_of(conn, struct smc_sock, conn); in smc_cdc_tx_handler() 40 &cdcpend->conn->tx_curs_fin, in smc_cdc_tx_handler() 44 atomic_add(diff, &cdcpend->conn->sndbuf_space); in smc_cdc_tx_handler() 47 smc_curs_copy(&conn->tx_curs_fin, &cdcpend->cursor, conn); in smc_cdc_tx_handler() 48 smc_curs_copy(&conn->local_tx_ctrl_fin, &cdcpend->p_cursor, in smc_cdc_tx_handler() 49 conn); in smc_cdc_tx_handler() 50 conn->tx_cdc_seq_fin = cdcpend->ctrl_seq; in smc_cdc_tx_handler() 53 if (atomic_dec_and_test(&conn->cdc_pend_tx_wr)) { in smc_cdc_tx_handler() [all …]
|
D | smc_tx.c | 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() 80 struct smc_connection *conn = &smc->conn; in smc_tx_wait() local 92 conn->killed || in smc_tx_wait() 93 conn->local_tx_ctrl.conn_state_flags.peer_done_writing) { in smc_tx_wait() 97 if (smc_cdc_rxed_any_close(conn)) { in smc_tx_wait() 112 if (atomic_read(&conn->sndbuf_space) && !conn->urg_tx_pend) in smc_tx_wait() 118 smc_cdc_rxed_any_close(conn) || in smc_tx_wait() 119 (atomic_read(&conn->sndbuf_space) && in smc_tx_wait() 120 !conn->urg_tx_pend), in smc_tx_wait() [all …]
|
D | smc_rx.c | 62 struct smc_connection *conn = &smc->conn; in smc_rx_update_consumer() local 67 smc_curs_add(conn->rmb_desc->len, &cons, len); in smc_rx_update_consumer() 70 if (conn->urg_state == SMC_URG_VALID || conn->urg_rx_skip_pend) { in smc_rx_update_consumer() 71 diff = smc_curs_comp(conn->rmb_desc->len, &cons, in smc_rx_update_consumer() 72 &conn->urg_curs); in smc_rx_update_consumer() 77 conn->urg_state = SMC_URG_READ; in smc_rx_update_consumer() 83 smc_curs_add(conn->rmb_desc->len, &cons, 1); in smc_rx_update_consumer() 84 conn->urg_rx_skip_pend = false; in smc_rx_update_consumer() 87 conn->urg_state = SMC_URG_READ; in smc_rx_update_consumer() 91 smc_curs_copy(&conn->local_tx_ctrl.cons, &cons, conn); in smc_rx_update_consumer() [all …]
|
D | smc_close.c | 57 if (!smc_tx_prepared_sends(&smc->conn)) in smc_close_stream_wait() 61 smc_tx_pending(&smc->conn); in smc_close_stream_wait() 69 !smc_tx_prepared_sends(&smc->conn) || in smc_close_stream_wait() 72 smc->conn.killed, in smc_close_stream_wait() 88 static int smc_close_wr(struct smc_connection *conn) in smc_close_wr() argument 90 conn->local_tx_ctrl.conn_state_flags.peer_done_writing = 1; in smc_close_wr() 92 return smc_cdc_get_slot_and_msg_send(conn); in smc_close_wr() 95 static int smc_close_final(struct smc_connection *conn) in smc_close_final() argument 97 if (atomic_read(&conn->bytes_to_rcv)) in smc_close_final() 98 conn->local_tx_ctrl.conn_state_flags.peer_conn_abort = 1; in smc_close_final() [all …]
|
D | smc_cdc.h | 77 static inline bool smc_cdc_rxed_any_close(struct smc_connection *conn) in smc_cdc_rxed_any_close() argument 79 return conn->local_rx_ctrl.conn_state_flags.peer_conn_abort || in smc_cdc_rxed_any_close() 80 conn->local_rx_ctrl.conn_state_flags.peer_conn_closed; in smc_cdc_rxed_any_close() 84 struct smc_connection *conn) in smc_cdc_rxed_any_close_or_senddone() argument 86 return smc_cdc_rxed_any_close(conn) || in smc_cdc_rxed_any_close_or_senddone() 87 conn->local_rx_ctrl.conn_state_flags.peer_done_writing; in smc_cdc_rxed_any_close_or_senddone() 103 struct smc_connection *conn) in smc_curs_copy() argument 108 spin_lock_irqsave(&conn->acurs_lock, flags); in smc_curs_copy() 110 spin_unlock_irqrestore(&conn->acurs_lock, flags); in smc_curs_copy() 118 struct smc_connection *conn) in smc_curs_copy_net() argument [all …]
|
D | smc_diag.c | 92 else if (smc_conn_lgr_valid(&smc->conn) && smc->conn.lgr->is_smcd) in __smc_diag_dump() 106 smc->conn.alert_token_local) { in __smc_diag_dump() 107 struct smc_connection *conn = &smc->conn; in __smc_diag_dump() local 109 .token = conn->alert_token_local, in __smc_diag_dump() 110 .sndbuf_size = conn->sndbuf_desc ? in __smc_diag_dump() 111 conn->sndbuf_desc->len : 0, in __smc_diag_dump() 112 .rmbe_size = conn->rmb_desc ? conn->rmb_desc->len : 0, in __smc_diag_dump() 113 .peer_rmbe_size = conn->peer_rmbe_size, in __smc_diag_dump() 115 .rx_prod.wrap = conn->local_rx_ctrl.prod.wrap, in __smc_diag_dump() 116 .rx_prod.count = conn->local_rx_ctrl.prod.count, in __smc_diag_dump() [all …]
|
D | smc_core.c | 101 static void smc_lgr_add_alert_token(struct smc_connection *conn) in smc_lgr_add_alert_token() argument 104 u32 token = conn->alert_token_local; in smc_lgr_add_alert_token() 106 link = &conn->lgr->conns_all.rb_node; in smc_lgr_add_alert_token() 118 rb_link_node(&conn->alert_node, parent, link); in smc_lgr_add_alert_token() 119 rb_insert_color(&conn->alert_node, &conn->lgr->conns_all); in smc_lgr_add_alert_token() 123 static int smcr_lgr_conn_assign_link(struct smc_connection *conn, bool first) in smcr_lgr_conn_assign_link() argument 130 conn->lnk = NULL; /* reset conn->lnk first */ in smcr_lgr_conn_assign_link() 132 struct smc_link *lnk = &conn->lgr->lnk[i]; in smcr_lgr_conn_assign_link() 136 if (conn->lgr->role == SMC_CLNT) { in smcr_lgr_conn_assign_link() 137 conn->lnk = lnk; /* temporary, SMC server assigns link*/ in smcr_lgr_conn_assign_link() [all …]
|
/net/bluetooth/ |
D | hci_conn.c | 48 struct hci_conn *conn; member 71 static void hci_connect_le_scan_cleanup(struct hci_conn *conn, u8 status) in hci_connect_le_scan_cleanup() argument 74 struct hci_dev *hdev = conn->hdev; in hci_connect_le_scan_cleanup() 79 bdaddr = &conn->dst; in hci_connect_le_scan_cleanup() 80 bdaddr_type = conn->dst_type; in hci_connect_le_scan_cleanup() 94 if (params->conn) { in hci_connect_le_scan_cleanup() 95 hci_conn_drop(params->conn); in hci_connect_le_scan_cleanup() 96 hci_conn_put(params->conn); in hci_connect_le_scan_cleanup() 97 params->conn = NULL; in hci_connect_le_scan_cleanup() 110 mgmt_connect_failed(hdev, &conn->dst, conn->type, in hci_connect_le_scan_cleanup() [all …]
|
D | hci_event.c | 172 struct hci_conn *conn; in hci_cc_role_discovery() local 181 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(rp->handle)); in hci_cc_role_discovery() 182 if (conn) in hci_cc_role_discovery() 183 conn->role = rp->role; in hci_cc_role_discovery() 194 struct hci_conn *conn; in hci_cc_read_link_policy() local 203 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(rp->handle)); in hci_cc_read_link_policy() 204 if (conn) in hci_cc_read_link_policy() 205 conn->link_policy = __le16_to_cpu(rp->policy); in hci_cc_read_link_policy() 216 struct hci_conn *conn; in hci_cc_write_link_policy() local 230 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(rp->handle)); in hci_cc_write_link_policy() [all …]
|
D | hci_sysfs.c | 15 struct hci_conn *conn = to_hci_conn(dev); in bt_link_release() local 16 kfree(conn); in bt_link_release() 34 void hci_conn_init_sysfs(struct hci_conn *conn) in hci_conn_init_sysfs() argument 36 struct hci_dev *hdev = conn->hdev; in hci_conn_init_sysfs() 38 bt_dev_dbg(hdev, "conn %p", conn); in hci_conn_init_sysfs() 40 conn->dev.type = &bt_link; in hci_conn_init_sysfs() 41 conn->dev.class = &bt_class; in hci_conn_init_sysfs() 42 conn->dev.parent = &hdev->dev; in hci_conn_init_sysfs() 44 device_initialize(&conn->dev); in hci_conn_init_sysfs() 47 void hci_conn_add_sysfs(struct hci_conn *conn) in hci_conn_add_sysfs() argument [all …]
|
D | l2cap_core.c | 53 static struct sk_buff *l2cap_build_cmd(struct l2cap_conn *conn, 55 static void l2cap_send_cmd(struct l2cap_conn *conn, u8 ident, u8 code, u16 len, 90 static struct l2cap_chan *__l2cap_get_chan_by_dcid(struct l2cap_conn *conn, in __l2cap_get_chan_by_dcid() argument 95 list_for_each_entry(c, &conn->chan_l, list) { in __l2cap_get_chan_by_dcid() 102 static struct l2cap_chan *__l2cap_get_chan_by_scid(struct l2cap_conn *conn, in __l2cap_get_chan_by_scid() argument 107 list_for_each_entry(c, &conn->chan_l, list) { in __l2cap_get_chan_by_scid() 117 static struct l2cap_chan *l2cap_get_chan_by_scid(struct l2cap_conn *conn, in l2cap_get_chan_by_scid() argument 122 mutex_lock(&conn->chan_lock); in l2cap_get_chan_by_scid() 123 c = __l2cap_get_chan_by_scid(conn, cid); in l2cap_get_chan_by_scid() 130 mutex_unlock(&conn->chan_lock); in l2cap_get_chan_by_scid() [all …]
|
D | sco.c | 72 struct sco_conn *conn; member 81 struct sco_conn *conn = container_of(work, struct sco_conn, in sco_sock_timeout() local 85 sco_conn_lock(conn); in sco_sock_timeout() 86 if (!conn->hcon) { in sco_sock_timeout() 87 sco_conn_unlock(conn); in sco_sock_timeout() 90 sk = conn->sk; in sco_sock_timeout() 93 sco_conn_unlock(conn); in sco_sock_timeout() 109 if (!sco_pi(sk)->conn) in sco_sock_set_timer() 113 cancel_delayed_work(&sco_pi(sk)->conn->timeout_work); in sco_sock_set_timer() 114 schedule_delayed_work(&sco_pi(sk)->conn->timeout_work, timeout); in sco_sock_set_timer() [all …]
|
D | smp.c | 98 struct l2cap_conn *conn; member 590 static void smp_send_cmd(struct l2cap_conn *conn, u8 code, u16 len, void *data) in smp_send_cmd() argument 592 struct l2cap_chan *chan = conn->smp; in smp_send_cmd() 600 bt_dev_dbg(conn->hcon->hdev, "code 0x%2.2x", code); in smp_send_cmd() 648 static void build_pairing_cmd(struct l2cap_conn *conn, in build_pairing_cmd() argument 652 struct l2cap_chan *chan = conn->smp; in build_pairing_cmd() 654 struct hci_conn *hcon = conn->hcon; in build_pairing_cmd() 703 req->io_capability = conn->hcon->io_capability; in build_pairing_cmd() 714 rsp->io_capability = conn->hcon->io_capability; in build_pairing_cmd() 724 static u8 check_enc_key_size(struct l2cap_conn *conn, __u8 max_key_size) in check_enc_key_size() argument [all …]
|
D | iso.c | 73 struct iso_conn *conn; member 95 struct iso_conn *conn = container_of(work, struct iso_conn, in iso_sock_timeout() local 99 iso_conn_lock(conn); in iso_sock_timeout() 100 sk = conn->sk; in iso_sock_timeout() 103 iso_conn_unlock(conn); in iso_sock_timeout() 119 if (!iso_pi(sk)->conn) in iso_sock_set_timer() 123 cancel_delayed_work(&iso_pi(sk)->conn->timeout_work); in iso_sock_set_timer() 124 schedule_delayed_work(&iso_pi(sk)->conn->timeout_work, timeout); in iso_sock_set_timer() 129 if (!iso_pi(sk)->conn) in iso_sock_clear_timer() 133 cancel_delayed_work(&iso_pi(sk)->conn->timeout_work); in iso_sock_clear_timer() [all …]
|
/net/rxrpc/ |
D | conn_object.c | 26 void rxrpc_poke_conn(struct rxrpc_connection *conn, enum rxrpc_conn_trace why) in rxrpc_poke_conn() argument 28 struct rxrpc_local *local = conn->local; in rxrpc_poke_conn() 35 busy = !list_empty(&conn->attend_link); in rxrpc_poke_conn() 37 rxrpc_get_connection(conn, why); in rxrpc_poke_conn() 38 list_add_tail(&conn->attend_link, &local->conn_attend_q); in rxrpc_poke_conn() 46 struct rxrpc_connection *conn = in rxrpc_connection_timer() local 49 rxrpc_poke_conn(conn, rxrpc_conn_get_poke_timer); in rxrpc_connection_timer() 58 struct rxrpc_connection *conn; in rxrpc_alloc_connection() local 62 conn = kzalloc(sizeof(struct rxrpc_connection), gfp); in rxrpc_alloc_connection() 63 if (conn) { in rxrpc_alloc_connection() [all …]
|
D | conn_event.c | 22 static bool rxrpc_set_conn_aborted(struct rxrpc_connection *conn, struct sk_buff *skb, in rxrpc_set_conn_aborted() argument 28 if (conn->state != RXRPC_CONN_ABORTED) { in rxrpc_set_conn_aborted() 29 spin_lock(&conn->state_lock); in rxrpc_set_conn_aborted() 30 if (conn->state != RXRPC_CONN_ABORTED) { in rxrpc_set_conn_aborted() 31 conn->abort_code = abort_code; in rxrpc_set_conn_aborted() 32 conn->error = err; in rxrpc_set_conn_aborted() 33 conn->completion = compl; in rxrpc_set_conn_aborted() 35 smp_store_release(&conn->state, RXRPC_CONN_ABORTED); in rxrpc_set_conn_aborted() 36 set_bit(RXRPC_CONN_DONT_REUSE, &conn->flags); in rxrpc_set_conn_aborted() 37 set_bit(RXRPC_CONN_EV_ABORT_CALLS, &conn->events); in rxrpc_set_conn_aborted() [all …]
|
D | conn_client.c | 46 struct rxrpc_connection *conn) in rxrpc_put_client_connection_id() argument 48 idr_remove(&local->conn_ids, conn->proto.cid >> RXRPC_CIDSHIFT); in rxrpc_put_client_connection_id() 56 struct rxrpc_connection *conn; in rxrpc_destroy_client_conn_ids() local 60 idr_for_each_entry(&local->conn_ids, conn, id) { in rxrpc_destroy_client_conn_ids() 62 conn, refcount_read(&conn->ref)); in rxrpc_destroy_client_conn_ids() 147 struct rxrpc_connection *conn; in rxrpc_alloc_client_connection() local 154 conn = rxrpc_alloc_connection(rxnet, GFP_ATOMIC | __GFP_NOWARN); in rxrpc_alloc_client_connection() 155 if (!conn) in rxrpc_alloc_client_connection() 158 id = idr_alloc_cyclic(&local->conn_ids, conn, 1, 0x40000000, in rxrpc_alloc_client_connection() 161 kfree(conn); in rxrpc_alloc_client_connection() [all …]
|
D | conn_service.c | 24 struct rxrpc_connection *conn = NULL; in rxrpc_find_service_conn_rcu() local 43 conn = rb_entry(p, struct rxrpc_connection, service_node); in rxrpc_find_service_conn_rcu() 45 if (conn->proto.index_key < k.index_key) in rxrpc_find_service_conn_rcu() 47 else if (conn->proto.index_key > k.index_key) in rxrpc_find_service_conn_rcu() 51 conn = NULL; in rxrpc_find_service_conn_rcu() 56 _leave(" = %d", conn ? conn->debug_id : -1); in rxrpc_find_service_conn_rcu() 57 return conn; in rxrpc_find_service_conn_rcu() 65 struct rxrpc_connection *conn) in rxrpc_publish_service_conn() argument 68 struct rxrpc_conn_proto k = conn->proto; in rxrpc_publish_service_conn() 88 rb_link_node_rcu(&conn->service_node, parent, pp); in rxrpc_publish_service_conn() [all …]
|
D | rxkad.c | 42 static int rxkad_prime_packet_security(struct rxrpc_connection *conn, 100 static int rxkad_init_connection_security(struct rxrpc_connection *conn, in rxkad_init_connection_security() argument 106 _enter("{%d},{%x}", conn->debug_id, key_serial(conn->key)); in rxkad_init_connection_security() 108 conn->security_ix = token->security_index; in rxkad_init_connection_security() 121 switch (conn->security_level) { in rxkad_init_connection_security() 131 ret = rxkad_prime_packet_security(conn, ci); in rxkad_init_connection_security() 135 conn->rxkad.cipher = ci; in rxkad_init_connection_security() 153 switch (call->conn->security_level) { in rxkad_how_much_data() 183 static int rxkad_prime_packet_security(struct rxrpc_connection *conn, in rxkad_prime_packet_security() argument 195 if (!conn->key) in rxkad_prime_packet_security() [all …]
|
D | io_thread.c | 12 static int rxrpc_input_packet_on_conn(struct rxrpc_connection *conn, 166 struct rxrpc_connection *conn; in rxrpc_input_packet() local 273 conn = rxrpc_find_client_connection_rcu(local, &peer_srx, skb); in rxrpc_input_packet() 274 conn = rxrpc_get_connection_maybe(conn, rxrpc_conn_get_call_input); in rxrpc_input_packet() 276 if (!conn) in rxrpc_input_packet() 279 ret = rxrpc_input_packet_on_conn(conn, &peer_srx, skb); in rxrpc_input_packet() 280 rxrpc_put_connection(conn, rxrpc_conn_put_call_input); in rxrpc_input_packet() 296 conn = rxrpc_find_service_conn_rcu(peer, skb); in rxrpc_input_packet() 297 conn = rxrpc_get_connection_maybe(conn, rxrpc_conn_get_call_input); in rxrpc_input_packet() 298 if (conn) { in rxrpc_input_packet() [all …]
|
/net/rds/ |
D | connection.c | 89 struct rds_connection *conn, *ret = NULL; in rds_conn_lookup() local 91 hlist_for_each_entry_rcu(conn, head, c_hash_node) { in rds_conn_lookup() 92 if (ipv6_addr_equal(&conn->c_faddr, faddr) && in rds_conn_lookup() 93 ipv6_addr_equal(&conn->c_laddr, laddr) && in rds_conn_lookup() 94 conn->c_trans == trans && in rds_conn_lookup() 95 conn->c_tos == tos && in rds_conn_lookup() 96 net == rds_conn_net(conn) && in rds_conn_lookup() 97 conn->c_dev_if == dev_if) { in rds_conn_lookup() 98 ret = conn; in rds_conn_lookup() 115 struct rds_connection *conn = cp->cp_conn; in rds_conn_path_reset() local [all …]
|
D | ib_cm.c | 49 static void rds_ib_set_protocol(struct rds_connection *conn, unsigned int version) in rds_ib_set_protocol() argument 51 conn->c_version = version; in rds_ib_set_protocol() 57 static void rds_ib_set_flow_control(struct rds_connection *conn, u32 credits) in rds_ib_set_flow_control() argument 59 struct rds_ib_connection *ic = conn->c_transport_data; in rds_ib_set_flow_control() 64 rds_ib_send_add_credits(conn, credits); in rds_ib_set_flow_control() 74 void rds_ib_cm_connect_complete(struct rds_connection *conn, struct rdma_cm_event *event) in rds_ib_cm_connect_complete() argument 76 struct rds_ib_connection *ic = conn->c_transport_data; in rds_ib_cm_connect_complete() 84 dp = event->param.conn.private_data; in rds_ib_cm_connect_complete() 85 if (conn->c_isv6) { in rds_ib_cm_connect_complete() 86 if (event->param.conn.private_data_len >= in rds_ib_cm_connect_complete() [all …]
|
D | rdma_transport.c | 54 struct rds_connection *conn = cm_id->context; in rds_rdma_cm_event_handler_cmn() local 60 rdsdebug("conn %p id %p handling event %u (%s)\n", conn, cm_id, in rds_rdma_cm_event_handler_cmn() 68 if (conn) { in rds_rdma_cm_event_handler_cmn() 69 mutex_lock(&conn->c_cm_lock); in rds_rdma_cm_event_handler_cmn() 74 if (rds_conn_state(conn) == RDS_CONN_DISCONNECTING) { in rds_rdma_cm_event_handler_cmn() 89 if (conn) { in rds_rdma_cm_event_handler_cmn() 90 rdma_set_service_type(cm_id, conn->c_tos); in rds_rdma_cm_event_handler_cmn() 102 if (conn) { in rds_rdma_cm_event_handler_cmn() 105 ibic = conn->c_transport_data; in rds_rdma_cm_event_handler_cmn() 108 TOS_TO_SL(conn->c_tos); in rds_rdma_cm_event_handler_cmn() [all …]
|
D | loop.c | 53 static bool rds_loop_is_unloading(struct rds_connection *conn) in rds_loop_is_unloading() argument 75 static int rds_loop_xmit(struct rds_connection *conn, struct rds_message *rm, in rds_loop_xmit() argument 85 rds_cong_map_updated(conn->c_fcong, ~(u64) 0); in rds_loop_xmit() 86 ret = min_t(int, ret, sgp->length - conn->c_xmit_data_off); in rds_loop_xmit() 92 rds_inc_init(&rm->m_inc, conn, &conn->c_laddr); in rds_loop_xmit() 96 rds_recv_incoming(conn, &conn->c_laddr, &conn->c_faddr, &rm->m_inc, in rds_loop_xmit() 99 rds_send_drop_acked(conn, be64_to_cpu(rm->m_inc.i_hdr.h_sequence), in rds_loop_xmit() 126 struct rds_connection *conn; member 135 static int rds_loop_conn_alloc(struct rds_connection *conn, gfp_t gfp) in rds_loop_conn_alloc() argument 145 lc->conn = conn; in rds_loop_conn_alloc() [all …]
|
/net/netfilter/ |
D | nf_conncount.c | 71 static inline bool already_closed(const struct nf_conn *conn) in already_closed() argument 73 if (nf_ct_protonum(conn) == IPPROTO_TCP) in already_closed() 74 return conn->proto.tcp.state == TCP_CONNTRACK_TIME_WAIT || in already_closed() 75 conn->proto.tcp.state == TCP_CONNTRACK_CLOSE; in already_closed() 86 struct nf_conncount_tuple *conn) in conn_free() argument 91 list_del(&conn->node); in conn_free() 93 kmem_cache_free(conncount_conn_cachep, conn); in conn_free() 98 struct nf_conncount_tuple *conn) in find_or_evict() argument 105 found = nf_conntrack_find_get(net, &conn->zone, &conn->tuple); in find_or_evict() 108 b = conn->jiffies32; in find_or_evict() [all …]
|