Skip to content

Commit

Permalink
tcp: export TCPI_OPT_ECN_LOW in tcp_info tcpi_options field
Browse files Browse the repository at this point in the history
Analogous to other important ECN information, export TCPI_OPT_ECN_LOW
in tcp_info tcpi_options field.

Signed-off-by: Neal Cardwell <ncardwell@google.com>
Change-Id: I08d8d8c7e8780e6e37df54038ee50301ac5a0320
Signed-off-by: Alexandre Frade <kernel@xanmod.org>
  • Loading branch information
nealcardwell authored and xanmod committed Aug 16, 2023
1 parent 9ea1c2d commit 0be8827
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/uapi/linux/tcp.h
Expand Up @@ -170,6 +170,7 @@ enum tcp_fastopen_client_fail {
#define TCPI_OPT_ECN 8 /* ECN was negociated at TCP session init */
#define TCPI_OPT_ECN_SEEN 16 /* we received at least one packet with ECT */
#define TCPI_OPT_SYN_DATA 32 /* SYN-ACK acked data in SYN sent or rcvd */
#define TCPI_OPT_ECN_LOW 64 /* Low-latency ECN configured at init */

/*
* Sender's congestion state indicating normal or abnormal situations
Expand Down
2 changes: 2 additions & 0 deletions net/ipv4/tcp.c
Expand Up @@ -3885,6 +3885,8 @@ void tcp_get_info(struct sock *sk, struct tcp_info *info)
info->tcpi_options |= TCPI_OPT_ECN;
if (tp->ecn_flags & TCP_ECN_SEEN)
info->tcpi_options |= TCPI_OPT_ECN_SEEN;
if (tp->ecn_flags & TCP_ECN_LOW)
info->tcpi_options |= TCPI_OPT_ECN_LOW;
if (tp->syn_data_acked)
info->tcpi_options |= TCPI_OPT_SYN_DATA;

Expand Down

0 comments on commit 0be8827

Please sign in to comment.