/net/netfilter/ipvs/ |
D | ip_vs_conn.c | 143 static unsigned int ip_vs_conn_hashkey_conn(const struct ip_vs_conn *cp) in ip_vs_conn_hashkey_conn() argument 147 ip_vs_conn_fill_param(cp->ipvs, cp->af, cp->protocol, in ip_vs_conn_hashkey_conn() 148 &cp->caddr, cp->cport, NULL, 0, &p); in ip_vs_conn_hashkey_conn() 150 if (cp->pe) { in ip_vs_conn_hashkey_conn() 151 p.pe = cp->pe; in ip_vs_conn_hashkey_conn() 152 p.pe_data = cp->pe_data; in ip_vs_conn_hashkey_conn() 153 p.pe_data_len = cp->pe_data_len; in ip_vs_conn_hashkey_conn() 163 static inline int ip_vs_conn_hash(struct ip_vs_conn *cp) in ip_vs_conn_hash() argument 168 if (cp->flags & IP_VS_CONN_F_ONE_PACKET) in ip_vs_conn_hash() 172 hash = ip_vs_conn_hashkey_conn(cp); in ip_vs_conn_hash() [all …]
|
D | ip_vs_proto_tcp.c | 148 struct ip_vs_conn *cp, struct ip_vs_iphdr *iph) in tcp_snat_handler() argument 156 if (cp->af == AF_INET6 && iph->fragoffs) in tcp_snat_handler() 165 if (unlikely(cp->app != NULL)) { in tcp_snat_handler() 169 if (!tcp_csum_check(cp->af, skb, pp)) in tcp_snat_handler() 173 if (!(ret = ip_vs_app_pkt_out(cp, skb, iph))) in tcp_snat_handler() 183 tcph->source = cp->vport; in tcp_snat_handler() 187 tcp_partial_csum_update(cp->af, tcph, &cp->daddr, &cp->vaddr, in tcp_snat_handler() 192 tcp_fast_csum_update(cp->af, tcph, &cp->daddr, &cp->vaddr, in tcp_snat_handler() 193 cp->dport, cp->vport); in tcp_snat_handler() 195 skb->ip_summed = cp->app ? in tcp_snat_handler() [all …]
|
D | ip_vs_proto_udp.c | 137 struct ip_vs_conn *cp, struct ip_vs_iphdr *iph) in udp_snat_handler() argument 145 if (cp->af == AF_INET6 && iph->fragoffs) in udp_snat_handler() 154 if (unlikely(cp->app != NULL)) { in udp_snat_handler() 158 if (!udp_csum_check(cp->af, skb, pp)) in udp_snat_handler() 164 if (!(ret = ip_vs_app_pkt_out(cp, skb, iph))) in udp_snat_handler() 174 udph->source = cp->vport; in udp_snat_handler() 180 udp_partial_csum_update(cp->af, udph, &cp->daddr, &cp->vaddr, in udp_snat_handler() 185 udp_fast_csum_update(cp->af, udph, &cp->daddr, &cp->vaddr, in udp_snat_handler() 186 cp->dport, cp->vport); in udp_snat_handler() 188 skb->ip_summed = cp->app ? in udp_snat_handler() [all …]
|
D | ip_vs_ftp.c | 77 ip_vs_ftp_init_conn(struct ip_vs_app *app, struct ip_vs_conn *cp) in ip_vs_ftp_init_conn() argument 80 cp->flags |= IP_VS_CONN_F_NFCT; in ip_vs_ftp_init_conn() 86 ip_vs_ftp_done_conn(struct ip_vs_app *app, struct ip_vs_conn *cp) in ip_vs_ftp_done_conn() argument 248 static int ip_vs_ftp_out(struct ip_vs_app *app, struct ip_vs_conn *cp, in ip_vs_ftp_out() argument 266 if (cp->state != IP_VS_TCP_S_ESTABLISHED) in ip_vs_ftp_out() 273 if (cp->app_data == (void *) IP_VS_FTP_PASV) { in ip_vs_ftp_out() 284 &from, &port, cp->af, in ip_vs_ftp_out() 289 &from.ip, ntohs(port), &cp->caddr.ip, 0); in ip_vs_ftp_out() 290 } else if (cp->app_data == (void *) IP_VS_FTP_EPSV) { in ip_vs_ftp_out() 300 from = cp->daddr; in ip_vs_ftp_out() [all …]
|
D | ip_vs_nfct.c | 71 ip_vs_update_conntrack(struct sk_buff *skb, struct ip_vs_conn *cp, int outin) in ip_vs_update_conntrack() argument 82 if (IP_VS_FWD_METHOD(cp) != IP_VS_CONN_F_MASQ) in ip_vs_update_conntrack() 86 if (cp->flags & IP_VS_CONN_F_ONE_PACKET) in ip_vs_update_conntrack() 94 if (cp->app && nf_ct_protonum(ct) == IPPROTO_TCP && in ip_vs_update_conntrack() 109 new_tuple.src.u3 = cp->daddr; in ip_vs_update_conntrack() 112 new_tuple.src.u.tcp.port = cp->dport; in ip_vs_update_conntrack() 114 new_tuple.dst.u3 = cp->vaddr; in ip_vs_update_conntrack() 117 new_tuple.dst.u.tcp.port = cp->vport; in ip_vs_update_conntrack() 129 __func__, ct, ARG_CONN(cp)); in ip_vs_update_conntrack() 144 struct ip_vs_conn *cp; in ip_vs_nfct_expect_callback() local [all …]
|
D | ip_vs_core.c | 74 struct ip_vs_conn *cp, struct ip_vs_iphdr *iph)); 80 struct ip_vs_conn *cp, struct ip_vs_iphdr *iph)); 134 ip_vs_in_stats(struct ip_vs_conn *cp, struct sk_buff *skb) in ip_vs_in_stats() argument 136 struct ip_vs_dest *dest = cp->dest; in ip_vs_in_stats() 137 struct netns_ipvs *ipvs = cp->ipvs; in ip_vs_in_stats() 170 ip_vs_out_stats(struct ip_vs_conn *cp, struct sk_buff *skb) in ip_vs_out_stats() argument 172 struct ip_vs_dest *dest = cp->dest; in ip_vs_out_stats() 173 struct netns_ipvs *ipvs = cp->ipvs; in ip_vs_out_stats() 206 ip_vs_conn_stats(struct ip_vs_conn *cp, struct ip_vs_service *svc) in ip_vs_conn_stats() argument 213 s = this_cpu_ptr(cp->dest->stats.cpustats); in ip_vs_conn_stats() [all …]
|
D | ip_vs_xmit.c | 608 struct ip_vs_conn *cp) in ip_vs_tunnel_xmit_prepare() argument 613 if (unlikely(cp->flags & IP_VS_CONN_F_NFCT)) in ip_vs_tunnel_xmit_prepare() 641 struct ip_vs_conn *cp, int local) in ip_vs_nat_send_or_cont() argument 646 if (likely(!(cp->flags & IP_VS_CONN_F_NFCT))) in ip_vs_nat_send_or_cont() 649 ip_vs_update_conntrack(skb, cp, 1); in ip_vs_nat_send_or_cont() 654 if (!local || cp->vport != cp->dport || in ip_vs_nat_send_or_cont() 655 !ip_vs_addr_equal(cp->af, &cp->vaddr, &cp->daddr)) in ip_vs_nat_send_or_cont() 662 NF_HOOK(pf, NF_INET_LOCAL_OUT, cp->ipvs->net, NULL, skb, in ip_vs_nat_send_or_cont() 672 struct ip_vs_conn *cp, int local) in ip_vs_send_or_cont() argument 677 if (likely(!(cp->flags & IP_VS_CONN_F_NFCT))) in ip_vs_send_or_cont() [all …]
|
D | ip_vs_sync.c | 410 select_master_thread_id(struct netns_ipvs *ipvs, struct ip_vs_conn *cp) in select_master_thread_id() argument 412 return ((long) cp >> (1 + ilog2(sizeof(*cp)))) & ipvs->threads_mask; in select_master_thread_id() 445 static inline bool in_persistence(struct ip_vs_conn *cp) in in_persistence() argument 447 for (cp = cp->control; cp; cp = cp->control) { in in_persistence() 448 if (cp->flags & IP_VS_CONN_F_TEMPLATE) in in_persistence() 464 struct ip_vs_conn *cp, int pkts) in ip_vs_sync_conn_needed() argument 466 unsigned long orig = READ_ONCE(cp->sync_endtime); in ip_vs_sync_conn_needed() 468 unsigned long n = (now + cp->timeout) & ~3UL; in ip_vs_sync_conn_needed() 474 if (unlikely(cp->flags & IP_VS_CONN_F_TEMPLATE)) in ip_vs_sync_conn_needed() 476 else if (unlikely(sysctl_sync_persist_mode(ipvs) && in_persistence(cp))) in ip_vs_sync_conn_needed() [all …]
|
D | ip_vs_proto_sctp.c | 92 struct ip_vs_conn *cp, struct ip_vs_iphdr *iph) in sctp_snat_handler() argument 99 if (cp->af == AF_INET6 && iph->fragoffs) in sctp_snat_handler() 107 if (unlikely(cp->app != NULL)) { in sctp_snat_handler() 111 if (!sctp_csum_check(cp->af, skb, pp)) in sctp_snat_handler() 115 ret = ip_vs_app_pkt_out(cp, skb, iph); in sctp_snat_handler() 126 if (sctph->source != cp->vport || payload_csum || in sctp_snat_handler() 128 sctph->source = cp->vport; in sctp_snat_handler() 139 struct ip_vs_conn *cp, struct ip_vs_iphdr *iph) in sctp_dnat_handler() argument 146 if (cp->af == AF_INET6 && iph->fragoffs) in sctp_dnat_handler() 154 if (unlikely(cp->app != NULL)) { in sctp_dnat_handler() [all …]
|
D | ip_vs_app.c | 259 int ip_vs_bind_app(struct ip_vs_conn *cp, in ip_vs_bind_app() argument 262 return pp->app_conn_bind(cp); in ip_vs_bind_app() 269 void ip_vs_unbind_app(struct ip_vs_conn *cp) in ip_vs_unbind_app() argument 271 struct ip_vs_app *inc = cp->app; in ip_vs_unbind_app() 277 inc->unbind_conn(inc, cp); in ip_vs_unbind_app() 279 inc->done_conn(inc, cp); in ip_vs_unbind_app() 281 cp->app = NULL; in ip_vs_unbind_app() 346 static inline void vs_seq_update(struct ip_vs_conn *cp, struct ip_vs_seq *vseq, in vs_seq_update() argument 350 spin_lock_bh(&cp->lock); in vs_seq_update() 351 if (!(cp->flags & flag) || after(seq, vseq->init_seq)) { in vs_seq_update() [all …]
|
/net/rds/ |
D | threads.c | 74 void rds_connect_path_complete(struct rds_conn_path *cp, int curr) in rds_connect_path_complete() argument 76 if (!rds_conn_path_transition(cp, curr, RDS_CONN_UP)) { in rds_connect_path_complete() 80 atomic_read(&cp->cp_state)); in rds_connect_path_complete() 81 rds_conn_path_drop(cp, false); in rds_connect_path_complete() 86 cp->cp_conn, &cp->cp_conn->c_laddr, &cp->cp_conn->c_faddr); in rds_connect_path_complete() 88 cp->cp_reconnect_jiffies = 0; in rds_connect_path_complete() 89 set_bit(0, &cp->cp_conn->c_map_queued); in rds_connect_path_complete() 91 if (!rds_destroy_pending(cp->cp_conn)) { in rds_connect_path_complete() 92 queue_delayed_work(rds_wq, &cp->cp_send_w, 0); in rds_connect_path_complete() 93 queue_delayed_work(rds_wq, &cp->cp_recv_w, 0); in rds_connect_path_complete() [all …]
|
D | connection.c | 113 static void rds_conn_path_reset(struct rds_conn_path *cp) in rds_conn_path_reset() argument 115 struct rds_connection *conn = cp->cp_conn; in rds_conn_path_reset() 121 rds_send_path_reset(cp); in rds_conn_path_reset() 122 cp->cp_flags = 0; in rds_conn_path_reset() 131 struct rds_conn_path *cp, bool is_outgoing) in __rds_conn_path_init() argument 133 spin_lock_init(&cp->cp_lock); in __rds_conn_path_init() 134 cp->cp_next_tx_seq = 1; in __rds_conn_path_init() 135 init_waitqueue_head(&cp->cp_waitq); in __rds_conn_path_init() 136 INIT_LIST_HEAD(&cp->cp_send_queue); in __rds_conn_path_init() 137 INIT_LIST_HEAD(&cp->cp_retrans); in __rds_conn_path_init() [all …]
|
D | send.c | 65 void rds_send_path_reset(struct rds_conn_path *cp) in rds_send_path_reset() argument 70 if (cp->cp_xmit_rm) { in rds_send_path_reset() 71 rm = cp->cp_xmit_rm; in rds_send_path_reset() 72 cp->cp_xmit_rm = NULL; in rds_send_path_reset() 81 cp->cp_xmit_sg = 0; in rds_send_path_reset() 82 cp->cp_xmit_hdr_off = 0; in rds_send_path_reset() 83 cp->cp_xmit_data_off = 0; in rds_send_path_reset() 84 cp->cp_xmit_atomic_sent = 0; in rds_send_path_reset() 85 cp->cp_xmit_rdma_sent = 0; in rds_send_path_reset() 86 cp->cp_xmit_data_sent = 0; in rds_send_path_reset() [all …]
|
D | tcp_connect.c | 43 struct rds_conn_path *cp; in rds_tcp_state_change() local 47 cp = sk->sk_user_data; in rds_tcp_state_change() 48 if (!cp) { in rds_tcp_state_change() 52 tc = cp->cp_transport_data; in rds_tcp_state_change() 69 if (rds_addr_cmp(&cp->cp_conn->c_laddr, in rds_tcp_state_change() 70 &cp->cp_conn->c_faddr) >= 0 && in rds_tcp_state_change() 71 rds_conn_path_transition(cp, RDS_CONN_CONNECTING, in rds_tcp_state_change() 73 rds_conn_path_drop(cp, false); in rds_tcp_state_change() 75 rds_connect_path_complete(cp, RDS_CONN_CONNECTING); in rds_tcp_state_change() 80 rds_conn_path_drop(cp, false); in rds_tcp_state_change() [all …]
|
D | tcp_send.c | 46 void rds_tcp_xmit_path_prepare(struct rds_conn_path *cp) in rds_tcp_xmit_path_prepare() argument 48 struct rds_tcp_connection *tc = cp->cp_transport_data; in rds_tcp_xmit_path_prepare() 53 void rds_tcp_xmit_path_complete(struct rds_conn_path *cp) in rds_tcp_xmit_path_complete() argument 55 struct rds_tcp_connection *tc = cp->cp_transport_data; in rds_tcp_xmit_path_complete() 78 struct rds_conn_path *cp = rm->m_inc.i_conn_path; in rds_tcp_xmit() local 79 struct rds_tcp_connection *tc = cp->cp_transport_data; in rds_tcp_xmit() 155 if (rds_conn_path_up(cp)) { in rds_tcp_xmit() 159 &conn->c_faddr, cp->cp_index, ret); in rds_tcp_xmit() 160 rds_conn_path_drop(cp, false); in rds_tcp_xmit() 186 struct rds_conn_path *cp; in rds_tcp_write_space() local [all …]
|
D | tcp_recv.c | 158 struct rds_conn_path *cp = arg->conn_path; in rds_tcp_data_recv() local 159 struct rds_tcp_connection *tc = cp->cp_transport_data; in rds_tcp_data_recv() 181 rds_inc_path_init(&tinc->ti_inc, cp, in rds_tcp_data_recv() 182 &cp->cp_conn->c_faddr); in rds_tcp_data_recv() 237 struct rds_connection *conn = cp->cp_conn; in rds_tcp_data_recv() 262 static int rds_tcp_read_sock(struct rds_conn_path *cp, gfp_t gfp) in rds_tcp_read_sock() argument 264 struct rds_tcp_connection *tc = cp->cp_transport_data; in rds_tcp_read_sock() 270 arg.conn_path = cp; in rds_tcp_read_sock() 290 int rds_tcp_recv_path(struct rds_conn_path *cp) in rds_tcp_recv_path() argument 292 struct rds_tcp_connection *tc = cp->cp_transport_data; in rds_tcp_recv_path() [all …]
|
D | tcp_listen.c | 102 struct rds_conn_path *cp = &conn->c_path[i]; in rds_tcp_accept_one_path() local 104 if (rds_conn_path_transition(cp, RDS_CONN_DOWN, in rds_tcp_accept_one_path() 106 rds_conn_path_transition(cp, RDS_CONN_ERROR, in rds_tcp_accept_one_path() 108 return cp->cp_transport_data; in rds_tcp_accept_one_path() 133 struct rds_conn_path *cp; in rds_tcp_accept_one() local 224 cp = rs_tcp->t_cpath; in rds_tcp_accept_one() 225 conn_state = rds_conn_path_state(cp); in rds_tcp_accept_one() 231 rds_tcp_reset_callbacks(new_sock, cp); in rds_tcp_accept_one() 233 rds_connect_path_complete(cp, RDS_CONN_RESETTING); in rds_tcp_accept_one() 235 rds_tcp_set_callbacks(new_sock, cp); in rds_tcp_accept_one() [all …]
|
/net/bluetooth/ |
D | amp.c | 255 struct hci_cp_read_local_amp_assoc cp; in amp_read_loc_assoc_frag() local 262 cp.phy_handle = phy_handle; in amp_read_loc_assoc_frag() 263 cp.max_len = cpu_to_le16(hdev->amp_assoc_size); in amp_read_loc_assoc_frag() 264 cp.len_so_far = cpu_to_le16(loc_assoc->offset); in amp_read_loc_assoc_frag() 267 hci_req_add(&req, HCI_OP_READ_LOCAL_AMP_ASSOC, sizeof(cp), &cp); in amp_read_loc_assoc_frag() 275 struct hci_cp_read_local_amp_assoc cp; in amp_read_loc_assoc() local 280 memset(&cp, 0, sizeof(cp)); in amp_read_loc_assoc() 282 cp.max_len = cpu_to_le16(hdev->amp_assoc_size); in amp_read_loc_assoc() 286 hci_req_add(&req, HCI_OP_READ_LOCAL_AMP_ASSOC, sizeof(cp), &cp); in amp_read_loc_assoc() 295 struct hci_cp_read_local_amp_assoc cp; in amp_read_loc_assoc_final_data() local [all …]
|
D | hci_conn.c | 190 struct hci_cp_create_conn cp; in hci_acl_create_connection() local 202 memset(&cp, 0, sizeof(cp)); in hci_acl_create_connection() 203 bacpy(&cp.bdaddr, &conn->dst); in hci_acl_create_connection() 204 cp.pscan_rep_mode = 0x02; in hci_acl_create_connection() 209 cp.pscan_rep_mode = ie->data.pscan_rep_mode; in hci_acl_create_connection() 210 cp.pscan_mode = ie->data.pscan_mode; in hci_acl_create_connection() 211 cp.clock_offset = ie->data.clock_offset | in hci_acl_create_connection() 220 cp.pkt_type = cpu_to_le16(conn->pkt_type); in hci_acl_create_connection() 222 cp.role_switch = 0x01; in hci_acl_create_connection() 224 cp.role_switch = 0x00; in hci_acl_create_connection() [all …]
|
D | hci_request.c | 463 struct hci_cp_write_local_name cp; in __hci_req_update_name() local 465 memcpy(cp.name, hdev->dev_name, sizeof(cp.name)); in __hci_req_update_name() 467 hci_req_add(req, HCI_OP_WRITE_LOCAL_NAME, sizeof(cp), &cp); in __hci_req_update_name() 631 struct hci_cp_write_eir cp; in __hci_req_update_eir() local 645 memset(&cp, 0, sizeof(cp)); in __hci_req_update_eir() 647 create_eir(hdev, cp.data); in __hci_req_update_eir() 649 if (memcmp(cp.data, hdev->eir, sizeof(cp.data)) == 0) in __hci_req_update_eir() 652 memcpy(hdev->eir, cp.data, sizeof(cp.data)); in __hci_req_update_eir() 654 hci_req_add(req, HCI_OP_WRITE_EIR, sizeof(cp), &cp); in __hci_req_update_eir() 662 struct hci_cp_le_set_ext_scan_enable cp; in hci_req_add_le_scan_disable() local [all …]
|
D | mgmt.c | 876 struct mgmt_mode *cp = cmd->param; in mgmt_get_adv_discov_flags() local 877 if (cp->val == 0x01) in mgmt_get_adv_discov_flags() 879 else if (cp->val == 0x02) in mgmt_get_adv_discov_flags() 900 struct mgmt_mode *cp = cmd->param; in mgmt_get_connectable() local 902 return cp->val; in mgmt_get_connectable() 1162 struct mgmt_mode *cp = data; in set_powered() local 1168 if (cp->val != 0x00 && cp->val != 0x01) in set_powered() 1180 if (!!cp->val == hdev_is_powered(hdev)) { in set_powered() 1191 if (cp->val) { in set_powered() 1341 struct mgmt_cp_set_discoverable *cp = data; in set_discoverable() local [all …]
|
D | hci_event.c | 854 struct hci_cp_read_clock *cp; in hci_cc_read_clock() local 867 cp = hci_sent_cmd_data(hdev, HCI_OP_READ_CLOCK); in hci_cc_read_clock() 868 if (!cp) in hci_cc_read_clock() 871 if (cp->which == 0x00) { in hci_cc_read_clock() 924 struct hci_cp_pin_code_reply *cp; in hci_cc_pin_code_reply() local 937 cp = hci_sent_cmd_data(hdev, HCI_OP_PIN_CODE_REPLY); in hci_cc_pin_code_reply() 938 if (!cp) in hci_cc_pin_code_reply() 941 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &cp->bdaddr); in hci_cc_pin_code_reply() 943 conn->pin_length = cp->pin_len; in hci_cc_pin_code_reply() 1110 struct hci_cp_le_set_default_phy *cp; in hci_cc_le_set_default_phy() local [all …]
|
/net/sched/ |
D | act_ctinfo.c | 31 struct tcf_ctinfo_params *cp, in tcf_ctinfo_dscp_set() argument 36 newdscp = (((ct->mark & cp->dscpmask) >> cp->dscpmaskshift) << 2) & in tcf_ctinfo_dscp_set() 72 struct tcf_ctinfo_params *cp, in tcf_ctinfo_cpmark_set() argument 76 skb->mark = ct->mark & cp->cpmarkmask; in tcf_ctinfo_cpmark_set() 87 struct tcf_ctinfo_params *cp; in tcf_ctinfo_act() local 92 cp = rcu_dereference_bh(ca->params); in tcf_ctinfo_act() 121 proto, cp->net, &tuple)) in tcf_ctinfo_act() 123 zone.id = cp->zone; in tcf_ctinfo_act() 126 thash = nf_conntrack_find_get(cp->net, &zone, &tuple); in tcf_ctinfo_act() 133 if (cp->mode & CTINFO_MODE_DSCP) in tcf_ctinfo_act() [all …]
|
/net/can/ |
D | af_can.c | 98 const struct can_proto *cp; in can_get_proto() local 101 cp = rcu_dereference(proto_tab[protocol]); in can_get_proto() 102 if (cp && !try_module_get(cp->prot->owner)) in can_get_proto() 103 cp = NULL; in can_get_proto() 106 return cp; in can_get_proto() 109 static inline void can_put_proto(const struct can_proto *cp) in can_put_proto() argument 111 module_put(cp->prot->owner); in can_put_proto() 118 const struct can_proto *cp; in can_create() local 126 cp = can_get_proto(protocol); in can_create() 129 if (!cp) { in can_create() [all …]
|
/net/dns_resolver/ |
D | dns_query.c | 83 char *desc, *cp; in dns_query() local 110 cp = desc; in dns_query() 112 memcpy(cp, type, typelen); in dns_query() 113 cp += typelen; in dns_query() 114 *cp++ = ':'; in dns_query() 116 memcpy(cp, name, namelen); in dns_query() 117 cp += namelen; in dns_query() 118 *cp = '\0'; in dns_query()
|