[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251218105819.63906-1-daniel.sedlak@cdn77.com>
Date: Thu, 18 Dec 2025 11:58:19 +0100
From: Daniel Sedlak <daniel.sedlak@...77.com>
To: Eric Dumazet <edumazet@...gle.com>,
Neal Cardwell <ncardwell@...gle.com>,
Kuniyuki Iwashima <kuniyu@...gle.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Simon Horman <horms@...nel.org>,
netdev@...r.kernel.org
Cc: Daniel Sedlak <daniel.sedlak@...77.com>
Subject: [PATCH net-next] tcp: clarify tcp_congestion_ops functions comments
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 <daniel.sedlak@...77.com>
---
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
Powered by blists - more mailing lists