From: Wei Wang <wei...@google.com> Date: Wed, 4 Oct 2017 10:03:44 -0700
> From: Wei Wang <wei...@google.com> > > Currently in the TCP code, the initialization sequence for cached > metrics, congestion control, BPF, etc, after successful connection > is very inconsistent. This introduces inconsistent bevhavior and is > prone to bugs. The current call sequence is as follows: ... > This commit uniforms the above functions to have the following sequence: > tcp_mtup_init(sk); > icsk->icsk_af_ops->rebuild_header(sk); > tcp_init_metrics(sk); > tcp_call_bpf(sk, BPF_SOCK_OPS_ACTIVE/PASSIVE_ESTABLISHED_CB); > tcp_init_congestion_control(sk); > tcp_init_buffer_space(sk); > This sequence is the same as the (1) active case. We pick this sequence > because this order correctly allows BPF to override the settings > including congestion control module and initial cwnd, etc from > the route, and then allows the CC module to see those settings. > > Suggested-by: Neal Cardwell <ncardw...@google.com> > Tested-by: Neal Cardwell <ncardw...@google.com> > Signed-off-by: Wei Wang <wei...@google.com> > Acked-by: Neal Cardwell <ncardw...@google.com> > Acked-by: Yuchung Cheng <ych...@google.com> > Acked-by: Eric Dumazet <eduma...@google.com> Nice change, applied, thanks.