Home
last modified time | relevance | path

Searched refs:peer (Results 1 – 25 of 543) sorted by relevance

12345678910>>...22

/linux-6.12.1/drivers/net/wireguard/
Dtimers.c30 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()
48 peer->device->dev->name, peer->internal_id, in wg_expired_retransmit_handshake()
49 &peer->endpoint.addr, (int)MAX_TIMER_HANDSHAKES + 2); in wg_expired_retransmit_handshake()
51 del_timer(&peer->timer_send_keepalive); in wg_expired_retransmit_handshake()
55 wg_packet_purge_staged_packets(peer); in wg_expired_retransmit_handshake()
60 if (!timer_pending(&peer->timer_zero_key_material)) in wg_expired_retransmit_handshake()
[all …]
Dpeer.c25 struct wg_peer *peer; in wg_peer_create() local
33 peer = kmem_cache_zalloc(peer_cache, GFP_KERNEL); in wg_peer_create()
34 if (unlikely(!peer)) in wg_peer_create()
36 if (unlikely(dst_cache_init(&peer->endpoint_cache, GFP_KERNEL))) in wg_peer_create()
39 peer->device = wg; in wg_peer_create()
40 wg_noise_handshake_init(&peer->handshake, &wg->static_identity, in wg_peer_create()
41 public_key, preshared_key, peer); in wg_peer_create()
42 peer->internal_id = atomic64_inc_return(&peer_counter); in wg_peer_create()
43 peer->serial_work_cpu = nr_cpumask_bits; in wg_peer_create()
44 wg_cookie_init(&peer->latest_cookie); in wg_peer_create()
[all …]
Dsend.c21 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()
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()
37 wg_timers_any_authenticated_packet_sent(peer); in wg_packet_send_handshake_initiation()
38 atomic64_set(&peer->last_sent_handshake, in wg_packet_send_handshake_initiation()
[all …]
Dnetlink.c106 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()
140 peer->persistent_keepalive_interval) || in get_peer()
[all …]
Dreceive.c20 static void update_rx_stats(struct wg_peer *peer, size_t len) in update_rx_stats() argument
22 dev_sw_netstats_rx_add(peer->device->dev, len); in update_rx_stats()
23 peer->rx_bytes += len; in update_rx_stats()
96 struct wg_peer *peer = NULL; in wg_receive_handshake_packet() local
144 peer = wg_noise_handshake_consume_initiation(message, wg); in wg_receive_handshake_packet()
145 if (unlikely(!peer)) { in wg_receive_handshake_packet()
150 wg_socket_set_peer_endpoint_from_skb(peer, skb); in wg_receive_handshake_packet()
152 wg->dev->name, peer->internal_id, in wg_receive_handshake_packet()
153 &peer->endpoint.addr); in wg_receive_handshake_packet()
154 wg_packet_send_handshake_response(peer); in wg_receive_handshake_packet()
[all …]
Dcookie.c61 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()
165 memcpy(peer->latest_cookie.last_mac1_sent, macs->mac1, COOKIE_LEN); in wg_cookie_add_mac_to_packet()
166 peer->latest_cookie.have_sent_mac1 = true; in wg_cookie_add_mac_to_packet()
[all …]
Dtimers.h13 void wg_timers_init(struct wg_peer *peer);
14 void wg_timers_stop(struct wg_peer *peer);
15 void wg_timers_data_sent(struct wg_peer *peer);
16 void wg_timers_data_received(struct wg_peer *peer);
17 void wg_timers_any_authenticated_packet_sent(struct wg_peer *peer);
18 void wg_timers_any_authenticated_packet_received(struct wg_peer *peer);
19 void wg_timers_handshake_initiated(struct wg_peer *peer);
20 void wg_timers_handshake_complete(struct wg_peer *peer);
21 void wg_timers_session_derived(struct wg_peer *peer);
22 void wg_timers_any_authenticated_packet_traversal(struct wg_peer *peer);
Ddevice.c36 struct wg_peer *peer; in wg_open() local
54 list_for_each_entry(peer, &wg->peer_list, peer_list) { in wg_open()
55 wg_packet_send_staged_packets(peer); in wg_open()
56 if (peer->persistent_keepalive_interval) in wg_open()
57 wg_packet_send_keepalive(peer); in wg_open()
67 struct wg_peer *peer; in wg_pm_notification() local
83 list_for_each_entry(peer, &wg->peer_list, peer_list) { in wg_pm_notification()
84 del_timer(&peer->timer_zero_key_material); in wg_pm_notification()
85 wg_noise_handshake_clear(&peer->handshake); in wg_pm_notification()
86 wg_noise_keypairs_clear(&peer->keypairs); in wg_pm_notification()
[all …]
/linux-6.12.1/net/rxrpc/
Dpeer_object.c78 static long rxrpc_peer_cmp_key(const struct rxrpc_peer *peer, in rxrpc_peer_cmp_key() argument
85 diff = ((peer->hash_key - hash_key) ?: in rxrpc_peer_cmp_key()
86 ((unsigned long)peer->local - (unsigned long)local) ?: in rxrpc_peer_cmp_key()
87 (peer->srx.transport_type - srx->transport_type) ?: in rxrpc_peer_cmp_key()
88 (peer->srx.transport_len - srx->transport_len) ?: in rxrpc_peer_cmp_key()
89 (peer->srx.transport.family - srx->transport.family)); in rxrpc_peer_cmp_key()
95 return ((u16 __force)peer->srx.transport.sin.sin_port - in rxrpc_peer_cmp_key()
97 memcmp(&peer->srx.transport.sin.sin_addr, in rxrpc_peer_cmp_key()
102 return ((u16 __force)peer->srx.transport.sin6.sin6_port - in rxrpc_peer_cmp_key()
104 memcmp(&peer->srx.transport.sin6.sin6_addr, in rxrpc_peer_cmp_key()
[all …]
Drtt.c18 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 (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 …]
Dpeer_event.c103 static void rxrpc_adjust_mtu(struct rxrpc_peer *peer, unsigned int mtu) in rxrpc_adjust_mtu() argument
106 if (mtu > 0 && peer->if_mtu == 65535 && mtu < peer->if_mtu) in rxrpc_adjust_mtu()
107 peer->if_mtu = mtu; in rxrpc_adjust_mtu()
111 mtu = peer->if_mtu; in rxrpc_adjust_mtu()
118 if (mtu < peer->hdrsize) in rxrpc_adjust_mtu()
119 mtu = peer->hdrsize + 4; in rxrpc_adjust_mtu()
123 if (mtu < peer->mtu) { in rxrpc_adjust_mtu()
124 spin_lock(&peer->lock); in rxrpc_adjust_mtu()
125 peer->mtu = mtu; in rxrpc_adjust_mtu()
126 peer->maxdata = peer->mtu - peer->hdrsize; in rxrpc_adjust_mtu()
[all …]
Dconn_service.c21 struct rxrpc_connection *rxrpc_find_service_conn_rcu(struct rxrpc_peer *peer, in rxrpc_find_service_conn_rcu() argument
39 read_seqbegin_or_lock(&peer->service_conn_lock, &seq); in rxrpc_find_service_conn_rcu()
41 p = rcu_dereference_raw(peer->service_conns.rb_node); in rxrpc_find_service_conn_rcu()
53 } while (need_seqretry(&peer->service_conn_lock, seq)); in rxrpc_find_service_conn_rcu()
55 done_seqretry(&peer->service_conn_lock, seq); in rxrpc_find_service_conn_rcu()
64 static void rxrpc_publish_service_conn(struct rxrpc_peer *peer, in rxrpc_publish_service_conn() argument
71 write_seqlock(&peer->service_conn_lock); in rxrpc_publish_service_conn()
73 pp = &peer->service_conns.rb_node; in rxrpc_publish_service_conn()
89 rb_insert_color(&conn->service_node, &peer->service_conns); in rxrpc_publish_service_conn()
92 write_sequnlock(&peer->service_conn_lock); in rxrpc_publish_service_conn()
[all …]
/linux-6.12.1/drivers/net/wireless/ath/ath12k/
Dpeer.c14 struct ath12k_peer *peer; in ath12k_peer_find() local
18 list_for_each_entry(peer, &ab->peers, list) { in ath12k_peer_find()
19 if (peer->vdev_id != vdev_id) in ath12k_peer_find()
21 if (!ether_addr_equal(peer->addr, addr)) in ath12k_peer_find()
24 return peer; in ath12k_peer_find()
33 struct ath12k_peer *peer; in ath12k_peer_find_by_pdev_idx() local
37 list_for_each_entry(peer, &ab->peers, list) { in ath12k_peer_find_by_pdev_idx()
38 if (peer->pdev_idx != pdev_idx) in ath12k_peer_find_by_pdev_idx()
40 if (!ether_addr_equal(peer->addr, addr)) in ath12k_peer_find_by_pdev_idx()
43 return peer; in ath12k_peer_find_by_pdev_idx()
[all …]
/linux-6.12.1/drivers/net/can/
Dvxcan.c34 struct net_device __rcu *peer; member
40 struct net_device *peer; in vxcan_xmit() local
49 peer = rcu_dereference(priv->peer); in vxcan_xmit()
50 if (unlikely(!peer)) { in vxcan_xmit()
69 skb->dev = peer; in vxcan_xmit()
76 peerstats = &peer->stats; in vxcan_xmit()
90 struct net_device *peer = rtnl_dereference(priv->peer); in vxcan_open() local
92 if (!peer) in vxcan_open()
95 if (peer->flags & IFF_UP) { in vxcan_open()
97 netif_carrier_on(peer); in vxcan_open()
[all …]
/linux-6.12.1/drivers/ntb/test/
Dntb_perf.c204 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()
287 ntb_peer_spad_write(perf->ntb, peer->pidx, in perf_spad_cmd_send()
[all …]
Dntb_msi_test.c131 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()
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()
160 if (!(peer_mask & BIT(peer))) in ntb_msit_db_event()
[all …]
/linux-6.12.1/drivers/net/wireless/ath/ath11k/
Dpeer.c14 struct ath11k_peer *peer; in ath11k_peer_find_list_by_id() local
18 list_for_each_entry(peer, &ab->peers, list) { in ath11k_peer_find_list_by_id()
19 if (peer->peer_id != peer_id) in ath11k_peer_find_list_by_id()
22 return peer; in ath11k_peer_find_list_by_id()
31 struct ath11k_peer *peer; in ath11k_peer_find() local
35 list_for_each_entry(peer, &ab->peers, list) { in ath11k_peer_find()
36 if (peer->vdev_id != vdev_id) in ath11k_peer_find()
38 if (!ether_addr_equal(peer->addr, addr)) in ath11k_peer_find()
41 return peer; in ath11k_peer_find()
50 struct ath11k_peer *peer; in ath11k_peer_find_by_addr() local
[all …]
/linux-6.12.1/net/tipc/
Dmonitor.c166 static struct tipc_peer *peer_prev(struct tipc_peer *peer) in peer_prev() argument
168 return list_last_entry(&peer->list, struct tipc_peer, list); in peer_prev()
171 static struct tipc_peer *peer_nxt(struct tipc_peer *peer) in peer_nxt() argument
173 return list_first_entry(&peer->list, struct tipc_peer, list); in peer_nxt()
176 static struct tipc_peer *peer_head(struct tipc_peer *peer) in peer_head() argument
178 while (!peer->is_head) in peer_head()
179 peer = peer_prev(peer); in peer_head()
180 return peer; in peer_head()
185 struct tipc_peer *peer; in get_peer() local
188 hlist_for_each_entry(peer, &mon->peers[thash], hash) { in get_peer()
[all …]
/linux-6.12.1/net/sctp/
Dassociola.c170 asoc->peer.rwnd = SCTP_DEFAULT_MAXWINDOW; in sctp_association_init()
206 INIT_LIST_HEAD(&asoc->peer.transport_addr_list); in sctp_association_init()
219 asoc->peer.sack_needed = 1; in sctp_association_init()
220 asoc->peer.sack_generation = 1; in sctp_association_init()
241 asoc->peer.ipv4_address = 1; in sctp_association_init()
243 asoc->peer.ipv6_address = 1; in sctp_association_init()
347 sctp_tsnmap_free(&asoc->peer.tsn_map); in sctp_association_free()
369 kfree(asoc->peer.cookie); in sctp_association_free()
370 kfree(asoc->peer.peer_random); in sctp_association_free()
371 kfree(asoc->peer.peer_chunks); in sctp_association_free()
[all …]
/linux-6.12.1/drivers/net/wireless/ath/ath10k/
Dtxrx.c153 struct ath10k_peer *peer; in ath10k_peer_find() local
157 list_for_each_entry(peer, &ar->peers, list) { in ath10k_peer_find()
158 if (peer->vdev_id != vdev_id) in ath10k_peer_find()
160 if (!ether_addr_equal(peer->addr, addr)) in ath10k_peer_find()
163 return peer; in ath10k_peer_find()
171 struct ath10k_peer *peer; in ath10k_peer_find_by_id() local
173 if (peer_id >= BITS_PER_TYPE(peer->peer_ids)) in ath10k_peer_find_by_id()
178 list_for_each_entry(peer, &ar->peers, list) in ath10k_peer_find_by_id()
179 if (test_bit(peer_id, peer->peer_ids)) in ath10k_peer_find_by_id()
180 return peer; in ath10k_peer_find_by_id()
[all …]
/linux-6.12.1/net/smc/
Dsmc_cdc.h195 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()
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()
217 smc_host_cursor_to_cdc(&peer->cons, &local->cons, save, conn); in smc_host_msg_to_cdc()
[all …]
/linux-6.12.1/net/bluetooth/
D6lowpan.c84 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()
109 struct lowpan_peer *peer; in __peer_lookup_chan() local
111 list_for_each_entry_rcu(peer, &dev->peers, list) { in __peer_lookup_chan()
112 if (peer->chan == chan) in __peer_lookup_chan()
113 return peer; in __peer_lookup_chan()
122 struct lowpan_peer *peer; in __peer_lookup_conn() local
[all …]
/linux-6.12.1/drivers/net/
Dnetkit.c20 struct net_device __rcu *peer; member
73 struct net_device *peer; in netkit_xmit() local
78 peer = rcu_dereference(nk->peer); in netkit_xmit()
79 if (unlikely(!peer || !(peer->flags & IFF_UP) || in netkit_xmit()
83 netkit_prep_forward(skb, !net_eq(dev_net(dev), dev_net(peer))); in netkit_xmit()
84 eth_skb_pkt_type(skb, peer); in netkit_xmit()
85 skb->dev = peer; in netkit_xmit()
96 dev_sw_netstats_rx_add(peer, len); in netkit_xmit()
122 struct net_device *peer = rtnl_dereference(nk->peer); in netkit_open() local
124 if (!peer) in netkit_open()
[all …]
Dveth.c74 struct net_device __rcu *peer; member
200 struct net_device *peer = rtnl_dereference(priv->peer); in veth_get_ethtool_stats() local
203 data[0] = peer ? peer->ifindex : 0; in veth_get_ethtool_stats()
222 if (!peer) in veth_get_ethtool_stats()
225 rcv_priv = netdev_priv(peer); in veth_get_ethtool_stats()
226 for (i = 0; i < peer->real_num_rx_queues; i++) { in veth_get_ethtool_stats()
355 rcv = rcu_dereference(priv->peer); in veth_xmit()
426 struct net_device *peer; in veth_get_stats64() local
439 peer = rcu_dereference(priv->peer); in veth_get_stats64()
440 if (peer) { in veth_get_stats64()
[all …]
/linux-6.12.1/tools/net/sunrpc/xdrgen/subcmds/
Dsource.py30 def emit_source_decoder(node: _XdrAst, language: str, peer: str) -> None:
33 gen = XdrEnumGenerator(language, peer)
35 gen = XdrPointerGenerator(language, peer)
37 gen = XdrTypedefGenerator(language, peer)
39 gen = XdrStructGenerator(language, peer)
41 gen = XdrUnionGenerator(language, peer)
43 gen = XdrProgramGenerator(language, peer)
49 def emit_source_encoder(node: _XdrAst, language: str, peer: str) -> None:
52 gen = XdrEnumGenerator(language, peer)
54 gen = XdrPointerGenerator(language, peer)
[all …]

12345678910>>...22