]> Git Repo - linux.git/commitdiff
tcp: add rcv_wnd and plb_rehash to TCP_INFO
authorMubashir Adnan Qureshi <[email protected]>
Wed, 26 Oct 2022 13:51:15 +0000 (13:51 +0000)
committerDavid S. Miller <[email protected]>
Fri, 28 Oct 2022 09:47:42 +0000 (10:47 +0100)
rcv_wnd can be useful to diagnose TCP performance where receiver window
becomes the bottleneck. rehash reports the PLB and timeout triggered
rehash attempts by the TCP connection.

Signed-off-by: Mubashir Adnan Qureshi <[email protected]>
Signed-off-by: Yuchung Cheng <[email protected]>
Signed-off-by: Neal Cardwell <[email protected]>
Reviewed-by: Eric Dumazet <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
include/uapi/linux/tcp.h
net/ipv4/tcp.c

index c9abe86eda5fda8ed990ed062d8ae93f5d3a2a74..879eeb0a084b4da77a2a73c422cf65c9f8d9f4fb 100644 (file)
@@ -284,6 +284,11 @@ struct tcp_info {
        __u32   tcpi_snd_wnd;        /* peer's advertised receive window after
                                      * scaling (bytes)
                                      */
+       __u32   tcpi_rcv_wnd;        /* local advertised receive window after
+                                     * scaling (bytes)
+                                     */
+
+       __u32   tcpi_rehash;         /* PLB or timeout triggered rehash attempts */
 };
 
 /* netlink attributes types for SCM_TIMESTAMPING_OPT_STATS */
index 1da7c53b6cb532984497a5da59dfc853371d4480..de8f0cd7cb32a867820729e8ba2027743e79d4bb 100644 (file)
@@ -3940,6 +3940,8 @@ void tcp_get_info(struct sock *sk, struct tcp_info *info)
        info->tcpi_reord_seen = tp->reord_seen;
        info->tcpi_rcv_ooopack = tp->rcv_ooopack;
        info->tcpi_snd_wnd = tp->snd_wnd;
+       info->tcpi_rcv_wnd = tp->rcv_wnd;
+       info->tcpi_rehash = tp->plb_rehash + tp->timeout_rehash;
        info->tcpi_fastopen_client_fail = tp->fastopen_client_fail;
        unlock_sock_fast(sk, slow);
 }
This page took 0.0877329999999999 seconds and 4 git commands to generate.