Home
last modified time | relevance | path

Searched full:peer (Results 1 – 25 of 1256) sorted by relevance

12345678910>>...51

/openbmc/linux/drivers/net/wireguard/
H A Dtimers.c8 #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, (int)MAX_TIMER_HANDSHAKES + 2); in wg_expired_retransmit_handshake()
51 del_timer(&peer->timer_send_keepalive); in wg_expired_retransmit_handshake()
[all …]
H A Dpeer.c6 #include "peer.h"
25 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()
[all …]
H A Dsend.c9 #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 …]
H A Dnetlink.c8 #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 …]
H A Dreceive.c8 #include "peer.h"
20 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()
151 net_dbg_ratelimited("%s: Receiving handshake initiation from peer %llu (%pISpfsc)\n", in wg_receive_handshake_packet()
152 wg->dev->name, peer->internal_id, in wg_receive_handshake_packet()
[all …]
H A Dcookie.c7 #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 …]
/openbmc/linux/net/rxrpc/
H A Dpeer_object.c26 * 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 …]
H A 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 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 …]
H A Dpeer_event.c2 /* Peer event handling, typically ICMP messages.
26 * Find the peer associated with a local error.
103 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()
[all …]
/openbmc/linux/drivers/net/wireless/ath/ath12k/
H A Dpeer.c8 #include "peer.h"
14 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()
[all …]
/openbmc/linux/drivers/net/wireless/ath/ath11k/
H A Dpeer.c8 #include "peer.h"
14 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()
[all …]
/openbmc/linux/net/tipc/
H A Dmonitor.c49 * @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
166 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()
[all …]
/openbmc/qemu/contrib/ivshmem-client/
H A Divshmem-client.c74 /* free a peer when the server advertises a disconnection or when the
77 ivshmem_client_free_peer(IvshmemClient *client, IvshmemClientPeer *peer) in ivshmem_client_free_peer() argument
81 QTAILQ_REMOVE(&client->peer_list, peer, next); in ivshmem_client_free_peer()
82 for (vector = 0; vector < peer->vectors_count; vector++) { in ivshmem_client_free_peer()
83 close(peer->vectors[vector]); in ivshmem_client_free_peer()
86 g_free(peer); in ivshmem_client_free_peer()
89 /* handle message coming from server (new peer, new vectors) */
93 IvshmemClientPeer *peer; in ivshmem_client_handle_server_msg() local
102 /* can return a peer or the local client */ in ivshmem_client_handle_server_msg()
103 peer = ivshmem_client_search_peer(client, peer_id); in ivshmem_client_handle_server_msg()
[all …]
/openbmc/qemu/contrib/ivshmem-server/
H A Divshmem-server.c71 /* free a peer when the server advertises a disconnection or when the
74 ivshmem_server_free_peer(IvshmemServer *server, IvshmemServerPeer *peer) in ivshmem_server_free_peer() argument
79 IVSHMEM_SERVER_DEBUG(server, "free peer %" PRId64 "\n", peer->id); in ivshmem_server_free_peer()
80 close(peer->sock_fd); in ivshmem_server_free_peer()
81 QTAILQ_REMOVE(&server->peer_list, peer, next); in ivshmem_server_free_peer()
85 ivshmem_server_send_one_msg(other_peer->sock_fd, peer->id, -1); in ivshmem_server_free_peer()
88 for (vector = 0; vector < peer->vectors_count; vector++) { in ivshmem_server_free_peer()
89 event_notifier_cleanup(&peer->vectors[vector]); in ivshmem_server_free_peer()
92 g_free(peer); in ivshmem_server_free_peer()
95 /* send the peer id and the shm_fd just after a new client connection */
[all …]
/openbmc/linux/drivers/net/can/
H A 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 …]
/openbmc/linux/drivers/ntb/test/
H A Dntb_perf.c64 * 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 …]
H A 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()
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 …]
/openbmc/linux/net/sctp/
H A Dassociola.c171 asoc->peer.rwnd = SCTP_DEFAULT_MAXWINDOW; in sctp_association_init()
207 INIT_LIST_HEAD(&asoc->peer.transport_addr_list); in sctp_association_init()
220 asoc->peer.sack_needed = 1; in sctp_association_init()
221 asoc->peer.sack_generation = 1; in sctp_association_init()
239 /* Assume that peer would support both address types unless we are in sctp_association_init()
242 asoc->peer.ipv4_address = 1; in sctp_association_init()
244 asoc->peer.ipv6_address = 1; in sctp_association_init()
348 sctp_tsnmap_free(&asoc->peer.tsn_map); in sctp_association_free()
369 /* Free peer's cached cookie. */ in sctp_association_free()
370 kfree(asoc->peer.cookie); in sctp_association_free()
[all …]
/openbmc/linux/drivers/net/wireless/ath/ath10k/
H A 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 …]
/openbmc/linux/Documentation/driver-api/
H A Dntb.rst14 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 …]
/openbmc/linux/net/smc/
H A 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()
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 …]
/openbmc/linux/net/bluetooth/
H A D6lowpan.c60 /* 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_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()
[all …]
/openbmc/linux/drivers/net/
H A Dveth.c73 struct net_device __rcu *peer; member
199 struct net_device *peer = rtnl_dereference(priv->peer); in veth_get_ethtool_stats() local
202 data[0] = peer ? peer->ifindex : 0; in veth_get_ethtool_stats()
221 if (!peer) in veth_get_ethtool_stats()
224 rcv_priv = netdev_priv(peer); in veth_get_ethtool_stats()
225 for (i = 0; i < peer->real_num_rx_queues; i++) { in veth_get_ethtool_stats()
354 rcv = rcu_dereference(priv->peer); in veth_xmit()
425 struct net_device *peer; in veth_get_stats64() local
438 peer = rcu_dereference(priv->peer); in veth_get_stats64()
439 if (peer) { in veth_get_stats64()
[all …]
/openbmc/linux/drivers/ntb/
H A Dmsi.c24 * the peer memory windows.
89 * inbound memory windows for each peer (where N is the number of peers).
99 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 …]
/openbmc/qemu/net/
H A Dclients.h30 NetClientState *peer, Error **errp);
34 NetClientState *peer, Error **errp);
38 NetClientState *peer, Error **errp);
41 NetClientState *peer, Error **errp);
44 NetClientState *peer, Error **errp);
47 NetClientState *peer, Error **errp);
50 NetClientState *peer, Error **errp);
53 NetClientState *peer, Error **errp);
56 NetClientState *peer, Error **errp);
59 NetClientState *peer, Error **errp);
[all …]

12345678910>>...51