The optional/required hints in the tcp_congestion_ops are information for the user of this interface to signalize its importance when implementing these functions. However, cong_avoid comment incorrectly tells that it is required. For example the BBR does not implement this function, thus mark it as an optional. In addition, min_tso_segs has not had any comment optional/required hints. So mark it as optional since it is used only in BBR. Signed-off-by: Daniel Sedlak --- include/net/tcp.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/net/tcp.h b/include/net/tcp.h index 0deb5e9dd911..a94722e4de8c 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -1246,7 +1246,7 @@ struct tcp_congestion_ops { /* return slow start threshold (required) */ u32 (*ssthresh)(struct sock *sk); - /* do new cwnd calculation (required) */ + /* do new cwnd calculation (optional) */ void (*cong_avoid)(struct sock *sk, u32 ack, u32 acked); /* call before changing ca_state (optional) */ @@ -1261,7 +1261,7 @@ struct tcp_congestion_ops { /* hook for packet ack accounting (optional) */ void (*pkts_acked)(struct sock *sk, const struct ack_sample *sample); - /* override sysctl_tcp_min_tso_segs */ + /* override sysctl_tcp_min_tso_segs (optional) */ u32 (*min_tso_segs)(struct sock *sk); /* call when packets are delivered to update cwnd and pacing rate, base-commit: 8f7aa3d3c7323f4ca2768a9e74ebbe359c4f8f88 -- 2.52.0