/Linux-v5.10/drivers/net/wireguard/ |
D | timers.c | 8 #include "peer.h" 30 static inline void mod_peer_timer(struct wg_peer *peer, in mod_peer_timer() argument 35 if (likely(netif_running(peer->device->dev) && in mod_peer_timer() 36 !READ_ONCE(peer->is_dead))) in mod_peer_timer() 43 struct wg_peer *peer = from_timer(peer, timer, in wg_expired_retransmit_handshake() local 46 if (peer->timer_handshake_attempts > MAX_TIMER_HANDSHAKES) { in wg_expired_retransmit_handshake() 47 pr_debug("%s: Handshake for peer %llu (%pISpfsc) did not complete after %d attempts, giving up\n", in wg_expired_retransmit_handshake() 48 peer->device->dev->name, peer->internal_id, in wg_expired_retransmit_handshake() 49 &peer->endpoint.addr, MAX_TIMER_HANDSHAKES + 2); in wg_expired_retransmit_handshake() 51 del_timer(&peer->timer_send_keepalive); in wg_expired_retransmit_handshake() [all …]
|
D | peer.c | 6 #include "peer.h" 24 struct wg_peer *peer; in wg_peer_create() local 32 peer = kzalloc(sizeof(*peer), GFP_KERNEL); in wg_peer_create() 33 if (unlikely(!peer)) in wg_peer_create() 35 peer->device = wg; in wg_peer_create() 37 wg_noise_handshake_init(&peer->handshake, &wg->static_identity, in wg_peer_create() 38 public_key, preshared_key, peer); in wg_peer_create() 39 if (dst_cache_init(&peer->endpoint_cache, GFP_KERNEL)) in wg_peer_create() 41 if (wg_packet_queue_init(&peer->tx_queue, wg_packet_tx_worker, false, in wg_peer_create() 44 if (wg_packet_queue_init(&peer->rx_queue, NULL, false, in wg_peer_create() [all …]
|
D | send.c | 9 #include "peer.h" 21 static void wg_packet_send_handshake_initiation(struct wg_peer *peer) in wg_packet_send_handshake_initiation() argument 25 if (!wg_birthdate_has_expired(atomic64_read(&peer->last_sent_handshake), in wg_packet_send_handshake_initiation() 29 atomic64_set(&peer->last_sent_handshake, ktime_get_coarse_boottime_ns()); in wg_packet_send_handshake_initiation() 30 net_dbg_ratelimited("%s: Sending handshake initiation to peer %llu (%pISpfsc)\n", in wg_packet_send_handshake_initiation() 31 peer->device->dev->name, peer->internal_id, in wg_packet_send_handshake_initiation() 32 &peer->endpoint.addr); in wg_packet_send_handshake_initiation() 34 if (wg_noise_handshake_create_initiation(&packet, &peer->handshake)) { in wg_packet_send_handshake_initiation() 35 wg_cookie_add_mac_to_packet(&packet, sizeof(packet), peer); in wg_packet_send_handshake_initiation() 36 wg_timers_any_authenticated_packet_traversal(peer); in wg_packet_send_handshake_initiation() [all …]
|
D | netlink.c | 8 #include "peer.h" 106 get_peer(struct wg_peer *peer, struct sk_buff *skb, struct dump_ctx *ctx) in get_peer() argument 116 down_read(&peer->handshake.lock); in get_peer() 118 peer->handshake.remote_static); in get_peer() 119 up_read(&peer->handshake.lock); in get_peer() 125 .tv_sec = peer->walltime_last_handshake.tv_sec, in get_peer() 126 .tv_nsec = peer->walltime_last_handshake.tv_nsec in get_peer() 129 down_read(&peer->handshake.lock); in get_peer() 132 peer->handshake.preshared_key); in get_peer() 133 up_read(&peer->handshake.lock); in get_peer() [all …]
|
D | receive.c | 8 #include "peer.h" 20 static void update_rx_stats(struct wg_peer *peer, size_t len) in update_rx_stats() argument 23 get_cpu_ptr(peer->device->dev->tstats); in update_rx_stats() 28 peer->rx_bytes += len; in update_rx_stats() 103 struct wg_peer *peer = NULL; in wg_receive_handshake_packet() local 151 peer = wg_noise_handshake_consume_initiation(message, wg); in wg_receive_handshake_packet() 152 if (unlikely(!peer)) { in wg_receive_handshake_packet() 157 wg_socket_set_peer_endpoint_from_skb(peer, skb); in wg_receive_handshake_packet() 158 net_dbg_ratelimited("%s: Receiving handshake initiation from peer %llu (%pISpfsc)\n", in wg_receive_handshake_packet() 159 wg->dev->name, peer->internal_id, in wg_receive_handshake_packet() [all …]
|
D | cookie.c | 7 #include "peer.h" 44 /* Must hold peer->handshake.static_identity->lock */ 61 void wg_cookie_checker_precompute_peer_keys(struct wg_peer *peer) in wg_cookie_checker_precompute_peer_keys() argument 63 precompute_key(peer->latest_cookie.cookie_decryption_key, in wg_cookie_checker_precompute_peer_keys() 64 peer->handshake.remote_static, cookie_key_label); in wg_cookie_checker_precompute_peer_keys() 65 precompute_key(peer->latest_cookie.message_mac1_key, in wg_cookie_checker_precompute_peer_keys() 66 peer->handshake.remote_static, mac1_key_label); in wg_cookie_checker_precompute_peer_keys() 157 struct wg_peer *peer) in wg_cookie_add_mac_to_packet() argument 162 down_write(&peer->latest_cookie.lock); in wg_cookie_add_mac_to_packet() 164 peer->latest_cookie.message_mac1_key); in wg_cookie_add_mac_to_packet() [all …]
|
D | device.c | 11 #include "peer.h" 34 struct wg_peer *peer; in wg_open() local 52 list_for_each_entry(peer, &wg->peer_list, peer_list) { in wg_open() 53 wg_packet_send_staged_packets(peer); in wg_open() 54 if (peer->persistent_keepalive_interval) in wg_open() 55 wg_packet_send_keepalive(peer); in wg_open() 67 struct wg_peer *peer; in wg_pm_notification() local 82 list_for_each_entry(peer, &wg->peer_list, peer_list) { in wg_pm_notification() 83 del_timer(&peer->timer_zero_key_material); in wg_pm_notification() 84 wg_noise_handshake_clear(&peer->handshake); in wg_pm_notification() [all …]
|
/Linux-v5.10/net/rxrpc/ |
D | peer_object.c | 26 * Hash a peer key. 60 /* Step through the peer address in 16-bit portions for speed */ in rxrpc_peer_hash_key() 69 * Compare a peer to a key. Return -ve, 0 or +ve to indicate less than, same 76 static long rxrpc_peer_cmp_key(const struct rxrpc_peer *peer, in rxrpc_peer_cmp_key() argument 83 diff = ((peer->hash_key - hash_key) ?: in rxrpc_peer_cmp_key() 84 ((unsigned long)peer->local - (unsigned long)local) ?: in rxrpc_peer_cmp_key() 85 (peer->srx.transport_type - srx->transport_type) ?: in rxrpc_peer_cmp_key() 86 (peer->srx.transport_len - srx->transport_len) ?: in rxrpc_peer_cmp_key() 87 (peer->srx.transport.family - srx->transport.family)); in rxrpc_peer_cmp_key() 93 return ((u16 __force)peer->srx.transport.sin.sin_port - in rxrpc_peer_cmp_key() [all …]
|
D | rtt.c | 18 static u32 rxrpc_rto_min_us(struct rxrpc_peer *peer) in rxrpc_rto_min_us() argument 23 static u32 __rxrpc_set_rto(const struct rxrpc_peer *peer) in __rxrpc_set_rto() argument 25 return _usecs_to_jiffies((peer->srtt_us >> 3) + peer->rttvar_us); in __rxrpc_set_rto() 43 static void rxrpc_rtt_estimator(struct rxrpc_peer *peer, long sample_rtt_us) in rxrpc_rtt_estimator() argument 46 u32 srtt = peer->srtt_us; in rxrpc_rtt_estimator() 69 m -= (peer->mdev_us >> 2); /* similar update on mdev */ in rxrpc_rtt_estimator() 81 m -= (peer->mdev_us >> 2); /* similar update on mdev */ in rxrpc_rtt_estimator() 84 peer->mdev_us += m; /* mdev = 3/4 mdev + 1/4 new */ in rxrpc_rtt_estimator() 85 if (peer->mdev_us > peer->mdev_max_us) { in rxrpc_rtt_estimator() 86 peer->mdev_max_us = peer->mdev_us; in rxrpc_rtt_estimator() [all …]
|
D | peer_event.c | 2 /* Peer event handling, typically ICMP messages. 26 * Find the peer associated with an ICMP packet. 107 static void rxrpc_adjust_mtu(struct rxrpc_peer *peer, struct sock_exterr_skb *serr) in rxrpc_adjust_mtu() argument 114 if (mtu > 0 && peer->if_mtu == 65535 && mtu < peer->if_mtu) { in rxrpc_adjust_mtu() 115 peer->if_mtu = mtu; in rxrpc_adjust_mtu() 121 mtu = peer->if_mtu; in rxrpc_adjust_mtu() 128 if (mtu < peer->hdrsize) in rxrpc_adjust_mtu() 129 mtu = peer->hdrsize + 4; in rxrpc_adjust_mtu() 133 if (mtu < peer->mtu) { in rxrpc_adjust_mtu() 134 spin_lock_bh(&peer->lock); in rxrpc_adjust_mtu() [all …]
|
/Linux-v5.10/drivers/net/wireless/ath/ath11k/ |
D | peer.c | 7 #include "peer.h" 13 struct ath11k_peer *peer; in ath11k_peer_find() local 17 list_for_each_entry(peer, &ab->peers, list) { in ath11k_peer_find() 18 if (peer->vdev_id != vdev_id) in ath11k_peer_find() 20 if (!ether_addr_equal(peer->addr, addr)) in ath11k_peer_find() 23 return peer; in ath11k_peer_find() 32 struct ath11k_peer *peer; in ath11k_peer_find_by_pdev_idx() local 36 list_for_each_entry(peer, &ab->peers, list) { in ath11k_peer_find_by_pdev_idx() 37 if (peer->pdev_idx != pdev_idx) in ath11k_peer_find_by_pdev_idx() 39 if (!ether_addr_equal(peer->addr, addr)) in ath11k_peer_find_by_pdev_idx() [all …]
|
/Linux-v5.10/net/tipc/ |
D | monitor.c | 49 * @ack_gen: most recent generation of self's domain acked by peer 63 /* struct tipc_peer: state of a peer node and its domain 64 * @addr: tipc node identity of peer 65 * @head_map: shows which other nodes currently consider peer 'up' 66 * @domain: most recent domain record from peer 70 * @is_up: peer is up as seen from this node 71 * @is_head: peer is assigned domain head as seen from this node 72 * @is_local: peer is in local domain and should be continuously monitored 136 static struct tipc_peer *peer_prev(struct tipc_peer *peer) in peer_prev() argument 138 return list_last_entry(&peer->list, struct tipc_peer, list); in peer_prev() [all …]
|
/Linux-v5.10/drivers/net/can/ |
D | vxcan.c | 33 struct net_device __rcu *peer; member 39 struct net_device *peer; in vxcan_xmit() local 47 peer = rcu_dereference(priv->peer); in vxcan_xmit() 48 if (unlikely(!peer)) { in vxcan_xmit() 61 skb->dev = peer; in vxcan_xmit() 67 peerstats = &peer->stats; in vxcan_xmit() 81 struct net_device *peer = rtnl_dereference(priv->peer); in vxcan_open() local 83 if (!peer) in vxcan_open() 86 if (peer->flags & IFF_UP) { in vxcan_open() 88 netif_carrier_on(peer); in vxcan_open() [all …]
|
/Linux-v5.10/drivers/staging/fwserial/ |
D | fwserial.c | 33 static bool auto_connect = true; /* try to VIRT_CABLE to every peer */ 227 static int fwtty_send_data_async(struct fwtty_peer *peer, int tcode, in fwtty_send_data_async() argument 242 generation = peer->generation; in fwtty_send_data_async() 244 fw_send_request(peer->serial->card, &txn->fw_txn, tcode, in fwtty_send_data_async() 245 peer->node_id, generation, peer->speed, addr, payload, in fwtty_send_data_async() 250 static void fwtty_send_txn_async(struct fwtty_peer *peer, in fwtty_send_txn_async() argument 261 generation = peer->generation; in fwtty_send_txn_async() 263 fw_send_request(peer->serial->card, &txn->fw_txn, tcode, in fwtty_send_txn_async() 264 peer->node_id, generation, peer->speed, addr, payload, in fwtty_send_txn_async() 383 * of TIOCM_* bits suitable for sending to a peer's status_addr. [all …]
|
/Linux-v5.10/drivers/ntb/test/ |
D | ntb_perf.c | 64 * Eg: start performance test with peer (index 0) and get the test metrics 204 int (*cmd_send)(struct perf_peer *peer, enum perf_cmd cmd, u64 data); 249 static inline bool perf_link_is_up(struct perf_peer *peer) in perf_link_is_up() argument 253 link = ntb_link_is_up(peer->perf->ntb, NULL, NULL); in perf_link_is_up() 254 return !!(link & BIT_ULL_MASK(peer->pidx)); in perf_link_is_up() 257 static int perf_spad_cmd_send(struct perf_peer *peer, enum perf_cmd cmd, in perf_spad_cmd_send() argument 260 struct perf_ctx *perf = peer->perf; in perf_spad_cmd_send() 274 if (!perf_link_is_up(peer)) in perf_spad_cmd_send() 277 sts = ntb_peer_spad_read(perf->ntb, peer->pidx, in perf_spad_cmd_send() 284 ntb_peer_spad_write(perf->ntb, peer->pidx, in perf_spad_cmd_send() [all …]
|
D | ntb_msi_test.c | 131 static void ntb_msit_copy_peer_desc(struct ntb_msit_ctx *nm, int peer) in ntb_msit_copy_peer_desc() argument 134 struct ntb_msi_desc *desc = nm->peers[peer].msi_desc; in ntb_msit_copy_peer_desc() 135 int irq_count = nm->peers[peer].num_irqs; in ntb_msit_copy_peer_desc() 138 desc[i].addr_offset = ntb_peer_spad_read(nm->ntb, peer, in ntb_msit_copy_peer_desc() 140 desc[i].data = ntb_peer_spad_read(nm->ntb, peer, 2 * i + 2); in ntb_msit_copy_peer_desc() 143 dev_info(&nm->ntb->dev, "Found %d interrupts on peer %d\n", in ntb_msit_copy_peer_desc() 144 irq_count, peer); in ntb_msit_copy_peer_desc() 146 complete_all(&nm->peers[peer].init_comp); in ntb_msit_copy_peer_desc() 155 int peer; in ntb_msit_db_event() local 159 for (peer = 0; peer < sizeof(peer_mask) * 8; peer++) { in ntb_msit_db_event() [all …]
|
/Linux-v5.10/drivers/net/wireless/ath/ath10k/ |
D | txrx.c | 142 struct ath10k_peer *peer; in ath10k_peer_find() local 146 list_for_each_entry(peer, &ar->peers, list) { in ath10k_peer_find() 147 if (peer->vdev_id != vdev_id) in ath10k_peer_find() 149 if (!ether_addr_equal(peer->addr, addr)) in ath10k_peer_find() 152 return peer; in ath10k_peer_find() 160 struct ath10k_peer *peer; in ath10k_peer_find_by_id() local 162 if (peer_id >= BITS_PER_TYPE(peer->peer_ids)) in ath10k_peer_find_by_id() 167 list_for_each_entry(peer, &ar->peers, list) in ath10k_peer_find_by_id() 168 if (test_bit(peer_id, peer->peer_ids)) in ath10k_peer_find_by_id() 169 return peer; in ath10k_peer_find_by_id() [all …]
|
/Linux-v5.10/net/sctp/ |
D | associola.c | 167 asoc->peer.rwnd = SCTP_DEFAULT_MAXWINDOW; in sctp_association_init() 203 INIT_LIST_HEAD(&asoc->peer.transport_addr_list); in sctp_association_init() 216 asoc->peer.sack_needed = 1; in sctp_association_init() 217 asoc->peer.sack_generation = 1; in sctp_association_init() 237 /* Assume that peer would support both address types unless we are in sctp_association_init() 240 asoc->peer.ipv4_address = 1; in sctp_association_init() 242 asoc->peer.ipv6_address = 1; in sctp_association_init() 347 sctp_tsnmap_free(&asoc->peer.tsn_map); in sctp_association_free() 368 /* Free peer's cached cookie. */ in sctp_association_free() 369 kfree(asoc->peer.cookie); in sctp_association_free() [all …]
|
/Linux-v5.10/drivers/usb/core/ |
D | port.c | 198 struct usb_port *peer = port_dev->peer; in usb_port_runtime_resume() local 210 * Power on our usb3 peer before this usb2 port to prevent a usb3 in usb_port_runtime_resume() 213 if (!port_dev->is_superspeed && peer) in usb_port_runtime_resume() 214 pm_runtime_get_sync(&peer->dev); in usb_port_runtime_resume() 256 struct usb_port *peer = port_dev->peer; in usb_port_runtime_suspend() local 283 * Our peer usb3 port may now be able to suspend, so in usb_port_runtime_suspend() 287 if (!port_dev->is_superspeed && peer) in usb_port_runtime_suspend() 288 pm_runtime_put(&peer->dev); in usb_port_runtime_suspend() 326 if (left->peer == right && right->peer == left) in link_peers() 329 if (left->peer || right->peer) { in link_peers() [all …]
|
/Linux-v5.10/Documentation/driver-api/ |
D | ntb.rst | 14 peer. Doorbell registers provide a way for peers to send interrupt events. 15 Memory windows allow translated read and write access to the peer memory. 43 configured by the peer, on the peer ntb port. The first type is 48 Memory: Local NTB Port: Peer NTB Port: Peer MMIO: 57 3) somehow notify a peer device of performed initialization, 4) peer device 62 initialized by a peer device, is depicted on the figure:: 66 Memory: Local NTB Port: Peer NTB Port: Peer MMIO: 74 1) allocate a memory region, 2) somehow deliver a translated address to a peer 75 device, 3) peer puts the translated address to NTB config, 4) peer device maps 85 3) Send the translated address and memory window index to a peer device [all …]
|
/Linux-v5.10/net/bluetooth/ |
D | 6lowpan.c | 60 /* peer addresses in various formats */ 84 struct lowpan_peer *peer) in peer_add() argument 86 list_add_rcu(&peer->list, &dev->peers); in peer_add() 91 struct lowpan_peer *peer) in peer_del() argument 93 list_del_rcu(&peer->list); in peer_del() 94 kfree_rcu(peer, rcu); in peer_del() 99 BT_DBG("last peer"); in peer_del() 109 struct lowpan_peer *peer; in peer_lookup_ba() local 116 list_for_each_entry_rcu(peer, &dev->peers, list) { in peer_lookup_ba() 118 &peer->chan->dst, peer->chan->dst_type); in peer_lookup_ba() [all …]
|
/Linux-v5.10/net/smc/ |
D | smc_cdc.h | 195 static inline void smc_host_cursor_to_cdc(union smc_cdc_cursor *peer, in smc_host_cursor_to_cdc() argument 201 peer->count = htonl(save->count); in smc_host_cursor_to_cdc() 202 peer->wrap = htons(save->wrap); in smc_host_cursor_to_cdc() 203 /* peer->reserved = htons(0); must be ensured by caller */ in smc_host_cursor_to_cdc() 206 static inline void smc_host_msg_to_cdc(struct smc_cdc_msg *peer, in smc_host_msg_to_cdc() argument 212 peer->common.type = local->common.type; in smc_host_msg_to_cdc() 213 peer->len = local->len; in smc_host_msg_to_cdc() 214 peer->seqno = htons(local->seqno); in smc_host_msg_to_cdc() 215 peer->token = htonl(local->token); in smc_host_msg_to_cdc() 216 smc_host_cursor_to_cdc(&peer->prod, &local->prod, save, conn); in smc_host_msg_to_cdc() [all …]
|
/Linux-v5.10/drivers/ntb/ |
D | msi.c | 24 * the peer memory windows. 91 * inbound memory windows for each peer (where N is the number of peers). 101 int peer, peer_widx; in ntb_msi_setup_mws() local 114 for (peer = 0; peer < ntb_peer_port_count(ntb); peer++) { in ntb_msi_setup_mws() 115 peer_widx = ntb_peer_highest_mw_idx(ntb, peer); in ntb_msi_setup_mws() 119 ret = ntb_mw_get_align(ntb, peer, peer_widx, &addr_align, in ntb_msi_setup_mws() 127 for (peer = 0; peer < ntb_peer_port_count(ntb); peer++) { in ntb_msi_setup_mws() 128 peer_widx = ntb_peer_highest_mw_idx(ntb, peer); in ntb_msi_setup_mws() 134 ret = ntb_mw_get_align(ntb, peer, peer_widx, NULL, in ntb_msi_setup_mws() 144 ret = ntb_mw_set_trans(ntb, peer, peer_widx, in ntb_msi_setup_mws() [all …]
|
/Linux-v5.10/drivers/net/ |
D | veth.c | 69 struct net_device __rcu *peer; member 178 struct net_device *peer = rtnl_dereference(priv->peer); in veth_get_ethtool_stats() local 181 data[0] = peer ? peer->ifindex : 0; in veth_get_ethtool_stats() 199 if (!peer) in veth_get_ethtool_stats() 202 rcv_priv = netdev_priv(peer); in veth_get_ethtool_stats() 203 for (i = 0; i < peer->real_num_rx_queues; i++) { in veth_get_ethtool_stats() 293 rcv = rcu_dereference(priv->peer); in veth_xmit() 368 struct net_device *peer; in veth_get_stats64() local 383 peer = rcu_dereference(priv->peer); in veth_get_stats64() 384 if (peer) { in veth_get_stats64() [all …]
|
/Linux-v5.10/drivers/net/wireless/marvell/mwifiex/ |
D | tdls.c | 199 "TDLS peer station not found in list\n"); in mwifiex_tdls_add_ht_oper() 205 "TDLS peer doesn't support ht capabilities\n"); in mwifiex_tdls_add_ht_oper() 253 "TDLS peer station not found in list\n"); in mwifiex_tdls_add_vht_oper() 259 "TDLS peer doesn't support vht capabilities\n"); in mwifiex_tdls_add_vht_oper() 267 "TDLS peer doesn't support wider bandwidth\n"); in mwifiex_tdls_add_vht_oper() 465 const u8 *peer, u8 action_code, in mwifiex_prep_tdls_encap_data() argument 478 memcpy(tf->da, peer, ETH_ALEN); in mwifiex_prep_tdls_encap_data() 572 ret = mwifiex_tdls_add_vht_oper(priv, peer, skb); in mwifiex_prep_tdls_encap_data() 577 ret = mwifiex_tdls_add_ht_oper(priv, peer, 1, skb); in mwifiex_prep_tdls_encap_data() 583 ret = mwifiex_tdls_add_ht_oper(priv, peer, 0, skb); in mwifiex_prep_tdls_encap_data() [all …]
|