mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 04:18:39 +08:00
b9f64820fb
This patch generates data delivery rate (throughput) samples on a per-ACK basis. These rate samples can be used by congestion control modules, and specifically will be used by TCP BBR in later patches in this series. Key state: tp->delivered: Tracks the total number of data packets (original or not) delivered so far. This is an already-existing field. tp->delivered_mstamp: the last time tp->delivered was updated. Algorithm: A rate sample is calculated as (d1 - d0)/(t1 - t0) on a per-ACK basis: d1: the current tp->delivered after processing the ACK t1: the current time after processing the ACK d0: the prior tp->delivered when the acked skb was transmitted t0: the prior tp->delivered_mstamp when the acked skb was transmitted When an skb is transmitted, we snapshot d0 and t0 in its control block in tcp_rate_skb_sent(). When an ACK arrives, it may SACK and ACK some skbs. For each SACKed or ACKed skb, tcp_rate_skb_delivered() updates the rate_sample struct to reflect the latest (d0, t0). Finally, tcp_rate_gen() generates a rate sample by storing (d1 - d0) in rs->delivered and (t1 - t0) in rs->interval_us. One caveat: if an skb was sent with no packets in flight, then tp->delivered_mstamp may be either invalid (if the connection is starting) or outdated (if the connection was idle). In that case, we'll re-stamp tp->delivered_mstamp. At first glance it seems t0 should always be the time when an skb was transmitted, but actually this could over-estimate the rate due to phase mismatch between transmit and ACK events. To track the delivery rate, we ensure that if packets are in flight then t0 and and t1 are times at which packets were marked delivered. If the initial and final RTTs are different then one may be corrupted by some sort of noise. The noise we see most often is sending gaps caused by delayed, compressed, or stretched acks. This either affects both RTTs equally or artificially reduces the final RTT. We approach this by recording the info we need to compute the initial RTT (duration of the "send phase" of the window) when we recorded the associated inflight. Then, for a filter to avoid bandwidth overestimates, we generalize the per-sample bandwidth computation from: bw = delivered / ack_phase_rtt to the following: bw = delivered / max(send_phase_rtt, ack_phase_rtt) In large-scale experiments, this filtering approach incorporating send_phase_rtt is effective at avoiding bandwidth overestimates due to ACK compression or stretched ACKs. Signed-off-by: Van Jacobson <vanj@google.com> Signed-off-by: Neal Cardwell <ncardwell@google.com> Signed-off-by: Yuchung Cheng <ycheng@google.com> Signed-off-by: Nandita Dukkipati <nanditad@google.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Soheil Hassas Yeganeh <soheil@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
63 lines
2.5 KiB
Makefile
63 lines
2.5 KiB
Makefile
#
|
|
# Makefile for the Linux TCP/IP (INET) layer.
|
|
#
|
|
|
|
obj-y := route.o inetpeer.o protocol.o \
|
|
ip_input.o ip_fragment.o ip_forward.o ip_options.o \
|
|
ip_output.o ip_sockglue.o inet_hashtables.o \
|
|
inet_timewait_sock.o inet_connection_sock.o \
|
|
tcp.o tcp_input.o tcp_output.o tcp_timer.o tcp_ipv4.o \
|
|
tcp_minisocks.o tcp_cong.o tcp_metrics.o tcp_fastopen.o \
|
|
tcp_rate.o tcp_recovery.o \
|
|
tcp_offload.o datagram.o raw.o udp.o udplite.o \
|
|
udp_offload.o arp.o icmp.o devinet.o af_inet.o igmp.o \
|
|
fib_frontend.o fib_semantics.o fib_trie.o \
|
|
inet_fragment.o ping.o ip_tunnel_core.o gre_offload.o
|
|
|
|
obj-$(CONFIG_NET_IP_TUNNEL) += ip_tunnel.o
|
|
obj-$(CONFIG_SYSCTL) += sysctl_net_ipv4.o
|
|
obj-$(CONFIG_PROC_FS) += proc.o
|
|
obj-$(CONFIG_IP_MULTIPLE_TABLES) += fib_rules.o
|
|
obj-$(CONFIG_IP_MROUTE) += ipmr.o
|
|
obj-$(CONFIG_NET_IPIP) += ipip.o
|
|
gre-y := gre_demux.o
|
|
obj-$(CONFIG_NET_FOU) += fou.o
|
|
obj-$(CONFIG_NET_IPGRE_DEMUX) += gre.o
|
|
obj-$(CONFIG_NET_IPGRE) += ip_gre.o
|
|
obj-$(CONFIG_NET_UDP_TUNNEL) += udp_tunnel.o
|
|
obj-$(CONFIG_NET_IPVTI) += ip_vti.o
|
|
obj-$(CONFIG_SYN_COOKIES) += syncookies.o
|
|
obj-$(CONFIG_INET_AH) += ah4.o
|
|
obj-$(CONFIG_INET_ESP) += esp4.o
|
|
obj-$(CONFIG_INET_IPCOMP) += ipcomp.o
|
|
obj-$(CONFIG_INET_XFRM_TUNNEL) += xfrm4_tunnel.o
|
|
obj-$(CONFIG_INET_XFRM_MODE_BEET) += xfrm4_mode_beet.o
|
|
obj-$(CONFIG_INET_TUNNEL) += tunnel4.o
|
|
obj-$(CONFIG_INET_XFRM_MODE_TRANSPORT) += xfrm4_mode_transport.o
|
|
obj-$(CONFIG_INET_XFRM_MODE_TUNNEL) += xfrm4_mode_tunnel.o
|
|
obj-$(CONFIG_IP_PNP) += ipconfig.o
|
|
obj-$(CONFIG_NETFILTER) += netfilter.o netfilter/
|
|
obj-$(CONFIG_INET_DIAG) += inet_diag.o
|
|
obj-$(CONFIG_INET_TCP_DIAG) += tcp_diag.o
|
|
obj-$(CONFIG_INET_UDP_DIAG) += udp_diag.o
|
|
obj-$(CONFIG_NET_TCPPROBE) += tcp_probe.o
|
|
obj-$(CONFIG_TCP_CONG_BIC) += tcp_bic.o
|
|
obj-$(CONFIG_TCP_CONG_CDG) += tcp_cdg.o
|
|
obj-$(CONFIG_TCP_CONG_CUBIC) += tcp_cubic.o
|
|
obj-$(CONFIG_TCP_CONG_DCTCP) += tcp_dctcp.o
|
|
obj-$(CONFIG_TCP_CONG_WESTWOOD) += tcp_westwood.o
|
|
obj-$(CONFIG_TCP_CONG_HSTCP) += tcp_highspeed.o
|
|
obj-$(CONFIG_TCP_CONG_HYBLA) += tcp_hybla.o
|
|
obj-$(CONFIG_TCP_CONG_HTCP) += tcp_htcp.o
|
|
obj-$(CONFIG_TCP_CONG_VEGAS) += tcp_vegas.o
|
|
obj-$(CONFIG_TCP_CONG_NV) += tcp_nv.o
|
|
obj-$(CONFIG_TCP_CONG_VENO) += tcp_veno.o
|
|
obj-$(CONFIG_TCP_CONG_SCALABLE) += tcp_scalable.o
|
|
obj-$(CONFIG_TCP_CONG_LP) += tcp_lp.o
|
|
obj-$(CONFIG_TCP_CONG_YEAH) += tcp_yeah.o
|
|
obj-$(CONFIG_TCP_CONG_ILLINOIS) += tcp_illinois.o
|
|
obj-$(CONFIG_NETLABEL) += cipso_ipv4.o
|
|
|
|
obj-$(CONFIG_XFRM) += xfrm4_policy.o xfrm4_state.o xfrm4_input.o \
|
|
xfrm4_output.o xfrm4_protocol.o
|