Lines Matching full:peer

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()
135 peer->mtu = mtu; in rxrpc_adjust_mtu()
136 peer->maxdata = peer->mtu - peer->hdrsize; in rxrpc_adjust_mtu()
137 spin_unlock_bh(&peer->lock); in rxrpc_adjust_mtu()
139 peer->mtu, peer->maxdata); in rxrpc_adjust_mtu()
151 struct rxrpc_peer *peer; in rxrpc_error_report() local
182 peer = rxrpc_lookup_peer_icmp_rcu(local, skb, &srx); in rxrpc_error_report()
183 if (peer && !rxrpc_get_peer_maybe(peer)) in rxrpc_error_report()
184 peer = NULL; in rxrpc_error_report()
185 if (!peer) { in rxrpc_error_report()
188 _leave(" [no peer]"); in rxrpc_error_report()
192 trace_rxrpc_rx_icmp(peer, &serr->ee, &srx); in rxrpc_error_report()
197 rxrpc_adjust_mtu(peer, serr); in rxrpc_error_report()
200 rxrpc_put_peer(peer); in rxrpc_error_report()
205 rxrpc_store_error(peer, serr); in rxrpc_error_report()
208 rxrpc_put_peer(peer); in rxrpc_error_report()
214 * Map an error report to error codes on the peer record.
216 static void rxrpc_store_error(struct rxrpc_peer *peer, in rxrpc_store_error() argument
282 rxrpc_distribute_error(peer, err, compl); in rxrpc_store_error()
286 * Distribute an error that occurred on a peer.
288 static void rxrpc_distribute_error(struct rxrpc_peer *peer, int error, in rxrpc_distribute_error() argument
293 hlist_for_each_entry_rcu(call, &peer->error_targets, error_link) { in rxrpc_distribute_error()
307 struct rxrpc_peer *peer; in rxrpc_peer_keepalive_dispatch() local
315 peer = list_entry(collector->next, in rxrpc_peer_keepalive_dispatch()
318 list_del_init(&peer->keepalive_link); in rxrpc_peer_keepalive_dispatch()
319 if (!rxrpc_get_peer_maybe(peer)) in rxrpc_peer_keepalive_dispatch()
322 if (__rxrpc_use_local(peer->local)) { in rxrpc_peer_keepalive_dispatch()
325 keepalive_at = peer->last_tx_at + RXRPC_KEEPALIVE_TIME; in rxrpc_peer_keepalive_dispatch()
327 _debug("%02x peer %u t=%d {%pISp}", in rxrpc_peer_keepalive_dispatch()
328 cursor, peer->debug_id, slot, &peer->srx.transport); in rxrpc_peer_keepalive_dispatch()
332 rxrpc_send_keepalive(peer); in rxrpc_peer_keepalive_dispatch()
336 /* A transmission to this peer occurred since last we in rxrpc_peer_keepalive_dispatch()
343 list_add_tail(&peer->keepalive_link, in rxrpc_peer_keepalive_dispatch()
345 rxrpc_unuse_local(peer->local); in rxrpc_peer_keepalive_dispatch()
347 rxrpc_put_peer_locked(peer); in rxrpc_peer_keepalive_dispatch()