net/rxrpc/input.c
Source file repositories/reference/linux-study-clean/net/rxrpc/input.c
File Facts
- System
- Linux kernel
- Corpus path
net/rxrpc/input.c- Extension
.c- Size
- 38027 bytes
- Lines
- 1308
- Domain
- Networking Core
- Bucket
- Sockets, Protocols, Packet Path, And Network Policy
- Inferred role
- Networking Core: implementation source
- Status
- source implementation candidate
Why This File Exists
Networking stack implementation surface: socket APIs, protocol dispatch, packet flow, routing, filtering, and network namespaces.
- Networking stack implementation surface: socket APIs, protocol dispatch, packet flow, routing, filtering, and network namespaces.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
ar-internal.h
Detected Declarations
function rxrpc_proto_abortfunction rxrpc_congestion_managementfunction rxrpc_congestion_degradefunction rxrpc_add_data_rtt_samplefunction rxrpc_rotate_tx_windowfunction rxrpc_end_tx_phasefunction rxrpc_receiving_replyfunction rxrpc_end_rx_phasefunction rxrpc_input_update_ack_windowfunction rxrpc_input_queue_datafunction rxrpc_input_data_onefunction skb_queue_walkfunction rxrpc_input_split_jumbofunction rxrpc_input_datafunction rxrpc_complete_rtt_probefunction rxrpc_input_ack_trailerfunction rxrpc_input_soft_rttfunction rxrpc_input_soft_ack_tqfunction rxrpc_input_soft_acksfunction rxrpc_is_ack_validfunction rxrpc_input_ackfunction rxrpc_is_client_callfunction rxrpc_is_client_callfunction rxrpc_input_ackallfunction rxrpc_input_abortfunction rxrpc_input_call_packetfunction rxrpc_implicit_end_call
Annotated Snippet
if (call->cong_cwnd >= call->cong_ssthresh) {
call->cong_ca_state = RXRPC_CA_CONGEST_AVOIDANCE;
call->cong_tstamp = call->acks_latest_ts;
}
goto out;
case RXRPC_CA_CONGEST_AVOIDANCE:
if (call->acks_nr_snacks > 0)
goto packet_loss_detected;
/* We analyse the number of packets that get ACK'd per RTT
* period and increase the window if we managed to fill it.
*/
if (call->rtt_count == 0)
goto out;
if (ktime_before(call->acks_latest_ts,
ktime_add_us(call->cong_tstamp,
call->srtt_us >> 3)))
goto out_no_clear_ca;
summary->change = rxrpc_cong_rtt_window_end;
call->cong_tstamp = call->acks_latest_ts;
if (call->cong_cumul_acks >= call->cong_cwnd)
call->cong_cwnd++;
goto out;
case RXRPC_CA_PACKET_LOSS:
if (call->acks_nr_snacks == 0)
goto resume_normality;
if (summary->new_low_snack) {
summary->change = rxrpc_cong_new_low_nack;
call->cong_dup_acks = 1;
if (call->cong_extra > 1)
call->cong_extra = 1;
goto send_extra_data;
}
call->cong_dup_acks++;
if (call->cong_dup_acks < 3)
goto send_extra_data;
summary->change = rxrpc_cong_begin_retransmission;
call->cong_ca_state = RXRPC_CA_FAST_RETRANSMIT;
call->cong_ssthresh = umax(summary->in_flight / 2, 2);
call->cong_cwnd = call->cong_ssthresh + 3;
call->cong_extra = 0;
call->cong_dup_acks = 0;
summary->need_retransmit = true;
summary->in_fast_or_rto_recovery = true;
goto out;
case RXRPC_CA_FAST_RETRANSMIT:
rxrpc_tlp_init(call);
summary->in_fast_or_rto_recovery = true;
if (!summary->new_low_snack) {
if (summary->nr_new_sacks == 0)
call->cong_cwnd += 1;
call->cong_dup_acks++;
if (call->cong_dup_acks == 2) {
summary->change = rxrpc_cong_retransmit_again;
call->cong_dup_acks = 0;
summary->need_retransmit = true;
}
} else {
summary->change = rxrpc_cong_progress;
call->cong_cwnd = call->cong_ssthresh;
if (call->acks_nr_snacks == 0) {
summary->exiting_fast_or_rto_recovery = true;
goto resume_normality;
}
}
goto out;
default:
BUG();
goto out;
}
resume_normality:
summary->change = rxrpc_cong_cleared_nacks;
call->cong_dup_acks = 0;
call->cong_extra = 0;
call->cong_tstamp = call->acks_latest_ts;
if (call->cong_cwnd < call->cong_ssthresh)
call->cong_ca_state = RXRPC_CA_SLOW_START;
else
call->cong_ca_state = RXRPC_CA_CONGEST_AVOIDANCE;
out:
call->cong_cumul_acks = 0;
out_no_clear_ca:
Annotation
- Immediate include surface: `ar-internal.h`.
- Detected declarations: `function rxrpc_proto_abort`, `function rxrpc_congestion_management`, `function rxrpc_congestion_degrade`, `function rxrpc_add_data_rtt_sample`, `function rxrpc_rotate_tx_window`, `function rxrpc_end_tx_phase`, `function rxrpc_receiving_reply`, `function rxrpc_end_rx_phase`, `function rxrpc_input_update_ack_window`, `function rxrpc_input_queue_data`.
- Atlas domain: Networking Core / Sockets, Protocols, Packet Path, And Network Policy.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.