Commit 2bab48c
Alexei Starovoitov
Merge branch 'improve-bpf-tcp-cc-init'
Neal Cardwell says:
====================
This patch series reorganizes TCP congestion control initialization so that if
EBPF code called by tcp_init_transfer() sets the congestion control algorithm
by calling setsockopt(TCP_CONGESTION) then the TCP stack initializes the
congestion control module immediately, instead of having tcp_init_transfer()
later initialize the congestion control module.
This increases flexibility for the EBPF code that runs at connection
establishment time, and simplifies the code.
This has the following benefits:
(1) This allows CC module customizations made by the EBPF called in
tcp_init_transfer() to persist, and not be wiped out by a later
call to tcp_init_congestion_control() in tcp_init_transfer().
(2) Does not flip the order of EBPF and CC init, to avoid causing bugs
for existing code upstream that depends on the current order.
(3) Does not cause 2 initializations for for CC in the case where the
EBPF called in tcp_init_transfer() wants to set the CC to a new CC
algorithm.
(4) Allows follow-on simplifications to the code in net/core/filter.c
and net/ipv4/tcp_cong.c, which currently both have some complexity
to special-case CC initialization to avoid double CC
initialization if EBPF sets the CC.
changes in v2:
o rebase onto bpf-next
o add another follow-on simplification suggested by Martin KaFai Lau:
"tcp: simplify tcp_set_congestion_control() load=false case"
changes in v3:
o no change in commits
o resent patch series from @gmail.com, since mail from ncardwell@google.com
stopped being accepted at netdev@vger.kernel.org mid-way through processing
the v2 patch series (between patches 2 and 3), confusing patchwork about
which patches belonged to the v2 patch series
====================
Acked-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>File tree
6 files changed
+19
-38
lines changed- include/net
- net
- core
- ipv4
6 files changed
+19
-38
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
| 100 | + | |
100 | 101 | | |
101 | 102 | | |
102 | 103 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1104 | 1104 | | |
1105 | 1105 | | |
1106 | 1106 | | |
1107 | | - | |
| 1107 | + | |
1108 | 1108 | | |
1109 | 1109 | | |
1110 | 1110 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4313 | 4313 | | |
4314 | 4314 | | |
4315 | 4315 | | |
4316 | | - | |
4317 | | - | |
4318 | 4316 | | |
4319 | | - | |
| 4317 | + | |
4320 | 4318 | | |
4321 | 4319 | | |
4322 | 4320 | | |
| |||
4449 | 4447 | | |
4450 | 4448 | | |
4451 | 4449 | | |
4452 | | - | |
4453 | 4450 | | |
4454 | 4451 | | |
4455 | 4452 | | |
4456 | 4453 | | |
4457 | | - | |
4458 | | - | |
| 4454 | + | |
4459 | 4455 | | |
4460 | 4456 | | |
4461 | 4457 | | |
| |||
4615 | 4611 | | |
4616 | 4612 | | |
4617 | 4613 | | |
4618 | | - | |
4619 | | - | |
4620 | | - | |
| 4614 | + | |
4621 | 4615 | | |
4622 | 4616 | | |
4623 | 4617 | | |
| |||
4651 | 4645 | | |
4652 | 4646 | | |
4653 | 4647 | | |
4654 | | - | |
4655 | | - | |
4656 | | - | |
4657 | | - | |
4658 | | - | |
| 4648 | + | |
4659 | 4649 | | |
4660 | 4650 | | |
4661 | 4651 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2698 | 2698 | | |
2699 | 2699 | | |
2700 | 2700 | | |
| 2701 | + | |
2701 | 2702 | | |
2702 | 2703 | | |
2703 | 2704 | | |
| |||
3049 | 3050 | | |
3050 | 3051 | | |
3051 | 3052 | | |
3052 | | - | |
| 3053 | + | |
3053 | 3054 | | |
3054 | 3055 | | |
3055 | 3056 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
179 | | - | |
| 179 | + | |
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
| 188 | + | |
188 | 189 | | |
189 | 190 | | |
190 | 191 | | |
| |||
340 | 341 | | |
341 | 342 | | |
342 | 343 | | |
343 | | - | |
| 344 | + | |
344 | 345 | | |
345 | 346 | | |
346 | 347 | | |
| |||
361 | 362 | | |
362 | 363 | | |
363 | 364 | | |
364 | | - | |
| 365 | + | |
365 | 366 | | |
366 | | - | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
376 | | - | |
377 | | - | |
378 | | - | |
379 | | - | |
| 367 | + | |
380 | 368 | | |
381 | | - | |
| 369 | + | |
382 | 370 | | |
383 | | - | |
| 371 | + | |
384 | 372 | | |
385 | | - | |
386 | 373 | | |
387 | 374 | | |
388 | 375 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5894 | 5894 | | |
5895 | 5895 | | |
5896 | 5896 | | |
| 5897 | + | |
5897 | 5898 | | |
5898 | | - | |
| 5899 | + | |
| 5900 | + | |
5899 | 5901 | | |
5900 | 5902 | | |
5901 | 5903 | | |
| |||
0 commit comments