Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
681ab6c
tcp: add sysctls for TCP PLB parameters
mubashirq Oct 26, 2022
3a67d2a
tcp: add PLB functionality for TCP
mubashirq Oct 26, 2022
049b710
tcp: add support for PLB in DCTCP
mubashirq Oct 26, 2022
4da6df0
tcp: add u32 counter in tcp_sock and an SNMP counter for PLB
mubashirq Oct 26, 2022
ea5a6f0
tcp: add rcv_wnd and plb_rehash to TCP_INFO
mubashirq Oct 26, 2022
04544fa
tcp: add accessors to read/set tp->snd_cwnd
edumazet Apr 5, 2022
998b0e9
tcp: tracking packets with CE marks in BW rate sample
yuchungcheng Sep 23, 2021
2ec70cb
net-tcp_bbr: broaden app-limited rate sample detection
nealcardwell Jun 11, 2019
befa1ca
net-tcp_bbr: v2: shrink delivered_mstamp, first_tx_mstamp to u32 to f…
nealcardwell Jun 25, 2018
332b31e
net-tcp_bbr: v2: snapshot packets in flight at transmit time and pass…
nealcardwell Aug 5, 2017
91695b6
net-tcp_bbr: v2: count packets lost over TCP rate sampling interval
nealcardwell Oct 13, 2017
579a358
net-tcp_bbr: v2: export FLAG_ECE in rate_sample.is_ece
nealcardwell Nov 19, 2018
2802477
net-tcp_bbr: v2: introduce ca_ops->skb_marked_lost() CC module callba…
nealcardwell Aug 8, 2018
5009d42
net-tcp_bbr: v2: adjust skb tx.in_flight upon merge in tcp_shifted_skb()
nealcardwell May 2, 2019
708bf2b
net-tcp_bbr: v2: adjust skb tx.in_flight upon split in tcp_fragment()
nealcardwell May 2, 2019
c15f7a3
net-tcp: add new ca opts flag TCP_CONG_WANTS_CE_EVENTS
yousukseung May 24, 2018
578d7d9
net-tcp: re-generalize TSO sizing in TCP CC module API
nealcardwell Sep 27, 2019
b0b91af
net-tcp: add fast_ack_mode=1: skip rwin check in tcp_fast_ack_mode__t…
nealcardwell Nov 16, 2019
f32ed64
net-tcp_bbr: v2: record app-limited status of TLP-repaired flight
jianfenw Jun 19, 2020
fa711b8
net-tcp_bbr: v2: inform CC module of losses repaired by TLP probe
jianfenw Jun 16, 2020
64f3b6f
net-tcp_bbr: v2: introduce is_acking_tlp_retrans_seq into rate_sample
nealcardwell Sep 21, 2020
06f92ed
tcp: introduce per-route feature RTAX_FEATURE_ECN_LOW
Jul 14, 2023
b06822b
net-tcp_bbr: v3: update TCP "bbr" congestion control module to BBRv3
nealcardwell Jun 11, 2019
b6f7f64
net-tcp_bbr: introduce bbr_param_enabled macro for boolean check
arter97 Mar 22, 2024
b2ec79b
net-tcp_bbr: v3: ensure ECN-enabled BBR flows set ECT on retransmits
Jun 11, 2021
fe9179e
tcp: export TCPI_OPT_ECN_LOW in tcp_info tcpi_options field
nealcardwell Jul 24, 2023
b4e9a52
net-tcp_bbr: v3: merge changes from bbr-v3-2024-02-22-01
arter97 Jul 2, 2024
dfb34bb
arm64: rockchip_linux: Use BBR as default TCP congestion control
Rasenkai Jan 13, 2025
13a73d7
af_unix: remove the repeated word "and"
Jun 10, 2021
3de437d
af_unix: take address assignment/hash insertion into a new helper
Jun 19, 2021
c8baa6d
unix_bind(): allocate addr earlier
Jun 19, 2021
82295e9
unix_bind(): separate BSD and abstract cases
Jun 19, 2021
5ed7d81
unix_bind(): take BSD and abstract address cases into new helpers
Jun 19, 2021
0dd82e3
fold unix_mknod() into unix_bind_bsd()
Jun 19, 2021
76f42dc
unix_bind_bsd(): move done_path_create() call after dealing with ->bi…
Jun 19, 2021
1f566c4
unix_bind_bsd(): unlink if we fail after successful mknod
Jun 19, 2021
2128649
__unix_find_socket_byname(): don't pass hash and type separately
Jun 19, 2021
474d0e2
af_unix: Use offsetof() instead of sizeof().
q2ven Nov 24, 2021
b7da428
af_unix: Pass struct sock to unix_autobind().
q2ven Nov 24, 2021
fd252e4
af_unix: Factorise unix_find_other() based on address types.
q2ven Nov 24, 2021
40e2cff
af_unix: Return an error as a pointer in unix_find_other().
q2ven Nov 24, 2021
b3e0d36
af_unix: Cut unix_validate_addr() out of unix_mkname().
q2ven Nov 24, 2021
61a87d5
af_unix: Copy unix_mkname() into unix_find_(bsd|abstract)().
q2ven Nov 24, 2021
4b828a1
af_unix: Remove unix_mkname().
q2ven Nov 24, 2021
9eecb82
af_unix: Allocate unix_address in unix_bind_(bsd|abstract)().
q2ven Nov 24, 2021
69bf151
af_unix: Remove UNIX_ABSTRACT() macro and test sun_path[0] instead.
q2ven Nov 24, 2021
112a5ea
af_unix: Add helpers to calculate hashes.
q2ven Nov 24, 2021
cdc1b05
af_unix: Save hash in sk_hash.
q2ven Nov 24, 2021
d248b50
af_unix: Replace the big lock with small locks.
q2ven Nov 24, 2021
ffc731a
af_unix: Relax race in unix_autobind().
q2ven Nov 24, 2021
7fe8c5e
ipv4/tcp: allow the memory tuning for tcp to go a little bigger than …
fenrus75 Jan 6, 2017
1c251e3
ipv4/tcp: Force applications to use TCP_NODELAY to improve network la…
Panchajanya1999 Sep 29, 2022
789db66
net: ipv4: Reduce TCP performance spikes
Panchajanya1999 Sep 29, 2022
1afa580
netdev: Increase the size of the receive queue
Panchajanya1999 Sep 29, 2022
72f09a2
tcp: Allow TCP Fast Open for both incoming & outgoing connections
Panchajanya1999 Sep 29, 2022
661888a
tcp: Enable Explicit Congestion Control for everything
tytydraco Oct 17, 2022
e81f3b5
ipv4/tcp_output: Disable tcp_slow_start_after_idle
Panchajanya1999 Jan 17, 2022
4896113
tcp: Enable support for TCP fast open when serving
kdrag0n Aug 2, 2019
ef7217f
kernel: do accept() in LIFO order for cache efficiency
fenrus75 Dec 13, 2018
927d6e2
net/bluetooth: Queue delayed work on power efficient wq
mvaisakh Aug 9, 2022
9e96a40
arm64: rockchip_linux: Switch to fq_codel queue discipline
kdrag0n Mar 2, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions Documentation/networking/ip-sysctl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -922,6 +922,81 @@ tcp_rx_skb_cache - BOOLEAN

Default: 0 (disabled)

tcp_plb_enabled - BOOLEAN
If set and the underlying congestion control (e.g. DCTCP) supports
and enables PLB feature, TCP PLB (Protective Load Balancing) is
enabled. PLB is described in the following paper:
https://doi.org/10.1145/3544216.3544226. Based on PLB parameters,
upon sensing sustained congestion, TCP triggers a change in
flow label field for outgoing IPv6 packets. A change in flow label
field potentially changes the path of outgoing packets for switches
that use ECMP/WCMP for routing.

PLB changes socket txhash which results in a change in IPv6 Flow Label
field, and currently no-op for IPv4 headers. It is possible
to apply PLB for IPv4 with other network header fields (e.g. TCP
or IPv4 options) or using encapsulation where outer header is used
by switches to determine next hop. In either case, further host
and switch side changes will be needed.

When set, PLB assumes that congestion signal (e.g. ECN) is made
available and used by congestion control module to estimate a
congestion measure (e.g. ce_ratio). PLB needs a congestion measure to
make repathing decisions.

Default: FALSE

tcp_plb_idle_rehash_rounds - INTEGER
Number of consecutive congested rounds (RTT) seen after which
a rehash can be performed, given there are no packets in flight.
This is referred to as M in PLB paper:
https://doi.org/10.1145/3544216.3544226.

Possible Values: 0 - 31

Default: 3

tcp_plb_rehash_rounds - INTEGER
Number of consecutive congested rounds (RTT) seen after which
a forced rehash can be performed. Be careful when setting this
parameter, as a small value increases the risk of retransmissions.
This is referred to as N in PLB paper:
https://doi.org/10.1145/3544216.3544226.

Possible Values: 0 - 31

Default: 12

tcp_plb_suspend_rto_sec - INTEGER
Time, in seconds, to suspend PLB in event of an RTO. In order to avoid
having PLB repath onto a connectivity "black hole", after an RTO a TCP
connection suspends PLB repathing for a random duration between 1x and
2x of this parameter. Randomness is added to avoid concurrent rehashing
of multiple TCP connections. This should be set corresponding to the
amount of time it takes to repair a failed link.

Possible Values: 0 - 255

Default: 60

tcp_plb_cong_thresh - INTEGER
Fraction of packets marked with congestion over a round (RTT) to
tag that round as congested. This is referred to as K in the PLB paper:
https://doi.org/10.1145/3544216.3544226.

The 0-1 fraction range is mapped to 0-256 range to avoid floating
point operations. For example, 128 means that if at least 50% of
the packets in a round were marked as congested then the round
will be tagged as congested.

Setting threshold to 0 means that PLB repaths every RTT regardless
of congestion. This is not intended behavior for PLB and should be
used only for experimentation purpose.

Possible Values: 0 - 256

Default: 128

UDP variables
=============

Expand Down
14 changes: 14 additions & 0 deletions arch/arm64/configs/rockchip_linux_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -891,3 +891,17 @@ CONFIG_RCU_CPU_STALL_TIMEOUT=60
CONFIG_FUNCTION_TRACER=y
CONFIG_BLK_DEV_IO_TRACE=y
CONFIG_LKDTM=y
CONFIG_TCP_CONG_ADVANCED=y
CONFIG_TCP_CONG_BBR=y
# CONFIG_DEFAULT_CUBIC is not set
CONFIG_DEFAULT_BBR=y
CONFIG_DEFAULT_TCP_CONG="bbr"
# CONFIG_NET_SCH_MULTIQ is not set
# CONFIG_NET_SCH_SFQ is not set
# CONFIG_NET_SCH_TBF is not set
# CONFIG_NET_SCH_NETEM is not set
# CONFIG_NET_SCH_CODEL is not set
CONFIG_NET_SCH_DEFAULT=y
CONFIG_DEFAULT_FQ_CODEL=y
CONFIG_DEFAULT_NET_SCH="fq_codel"
# CONFIG_NET_SCH_FQ is not set
5 changes: 4 additions & 1 deletion include/linux/tcp.h
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,9 @@ struct tcp_sock {
u8 compressed_ack;
u8 dup_ack_counter:2,
tlp_retrans:1, /* TLP is a retransmission */
unused:5;
fast_ack_mode:2, /* which fast ack mode ? */
tlp_orig_data_app_limited:1, /* app-limited before TLP rtx? */
unused:2;
u32 chrono_start; /* Start time in jiffies of a TCP chrono */
u32 chrono_stat[3]; /* Time in jiffies for chrono_stat stats */
u8 chrono_type:2, /* current chronograph type */
Expand Down Expand Up @@ -395,6 +397,7 @@ struct tcp_sock {
u32 probe_seq_start;
u32 probe_seq_end;
} mtu_probe;
u32 plb_rehash; /* PLB-triggered rehash attempts */
u32 mtu_info; /* We received an ICMP_FRAG_NEEDED / ICMPV6_PKT_TOOBIG
* while socket was owned by user.
*/
Expand Down
2 changes: 2 additions & 0 deletions include/linux/wait.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ static inline bool wq_has_sleeper(struct wait_queue_head *wq_head)

extern void add_wait_queue(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry);
extern void add_wait_queue_exclusive(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry);
extern void add_wait_queue_exclusive_lifo(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry);
extern void remove_wait_queue(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry);

static inline void __add_wait_queue(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry)
Expand Down Expand Up @@ -1155,6 +1156,7 @@ do { \
*/
void prepare_to_wait(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry, int state);
bool prepare_to_wait_exclusive(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry, int state);
void prepare_to_wait_exclusive_lifo(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry, int state);
long prepare_to_wait_event(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry, int state);
void finish_wait(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry);
long wait_woken(struct wait_queue_entry *wq_entry, unsigned mode, long timeout);
Expand Down
3 changes: 1 addition & 2 deletions include/net/af_unix.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,12 @@ struct sock *unix_peer_get(struct sock *sk);
#define UNIX_HASH_BITS 8

extern unsigned int unix_tot_inflight;
extern spinlock_t unix_table_lock;
extern spinlock_t unix_table_locks[2 * UNIX_HASH_SIZE];
extern struct hlist_head unix_socket_table[2 * UNIX_HASH_SIZE];

struct unix_address {
refcount_t refcnt;
int len;
unsigned int hash;
struct sockaddr_un name[];
};

Expand Down
4 changes: 2 additions & 2 deletions include/net/inet_connection_sock.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ struct inet_connection_sock {

ANDROID_KABI_RESERVE(1);

u64 icsk_ca_priv[104 / sizeof(u64)];
#define ICSK_CA_PRIV_SIZE (13 * sizeof(u64))
#define ICSK_CA_PRIV_SIZE (144)
u64 icsk_ca_priv[ICSK_CA_PRIV_SIZE / sizeof(u64)];
};

#define ICSK_TIME_RETRANS 1 /* Retransmit timer */
Expand Down
5 changes: 5 additions & 0 deletions include/net/netns/ipv4.h
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,11 @@ struct netns_ipv4 {
atomic_t tfo_active_disable_times;
unsigned long tfo_active_disable_stamp;
int sysctl_tcp_reflect_tos;
u8 sysctl_tcp_plb_enabled;
u8 sysctl_tcp_plb_idle_rehash_rounds;
u8 sysctl_tcp_plb_rehash_rounds;
u8 sysctl_tcp_plb_suspend_rto_sec;
int sysctl_tcp_plb_cong_thresh;

int sysctl_udp_wmem_min;
int sysctl_udp_rmem_min;
Expand Down
Loading