netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mubashir Adnan Qureshi <mubashirmaq@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, kuba@kernel.org,
	Mubashir Adnan Qureshi <mubashirq@google.com>,
	Yuchung Cheng <ycheng@google.com>,
	Neal Cardwell <ncardwell@google.com>,
	Eric Dumazet <edumazet@google.com>
Subject: [PATCH net-next v2 5/5] tcp: add rcv_wnd and plb_rehash to TCP_INFO
Date: Fri, 30 Sep 2022 04:53:20 +0000	[thread overview]
Message-ID: <20220930045320.5252-6-mubashirmaq@gmail.com> (raw)
In-Reply-To: <20220930045320.5252-1-mubashirmaq@gmail.com>

From: Mubashir Adnan Qureshi <mubashirq@google.com>

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 <mubashirq@google.com>
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
---
 include/uapi/linux/tcp.h | 5 +++++
 net/ipv4/tcp.c           | 2 ++
 2 files changed, 7 insertions(+)

diff --git a/include/uapi/linux/tcp.h b/include/uapi/linux/tcp.h
index c9abe86eda5f..879eeb0a084b 100644
--- a/include/uapi/linux/tcp.h
+++ b/include/uapi/linux/tcp.h
@@ -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 */
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 685c06c6d33f..a0b518f63c3a 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -3936,6 +3936,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);
 }
-- 
2.38.0.rc1.362.ged0d419d3c-goog


  parent reply	other threads:[~2022-09-30  4:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-29 14:24 [PATCH net-next 0/5] Add PLB functionality to TCP Mubashir Adnan Qureshi
2022-09-29 14:24 ` [PATCH net-next 1/5] tcp: add sysctls for TCP PLB parameters Mubashir Adnan Qureshi
2022-09-30  2:37   ` Jakub Kicinski
2022-09-29 14:24 ` [PATCH net-next 2/5] tcp: add PLB functionality for TCP Mubashir Adnan Qureshi
2022-09-29 14:24 ` [PATCH net-next 3/5] tcp: add support for PLB in DCTCP Mubashir Adnan Qureshi
2022-09-29 14:24 ` [PATCH net-next 4/5] tcp: add u32 counter in tcp_sock and an SNMP counter for PLB Mubashir Adnan Qureshi
2022-09-29 14:24 ` [PATCH net-next 5/5] tcp: add rcv_wnd and plb_rehash to TCP_INFO Mubashir Adnan Qureshi
2022-09-30  4:53 ` [PATCH net-next v2 0/5] Add PLB functionality to TCP Mubashir Adnan Qureshi
2022-09-30  4:53   ` [PATCH net-next v2 1/5] tcp: add sysctls for TCP PLB parameters Mubashir Adnan Qureshi
2022-09-30  4:53   ` [PATCH net-next v2 2/5] tcp: add PLB functionality for TCP Mubashir Adnan Qureshi
2022-09-30  4:53   ` [PATCH net-next v2 3/5] tcp: add support for PLB in DCTCP Mubashir Adnan Qureshi
2022-09-30  4:53   ` [PATCH net-next v2 4/5] tcp: add u32 counter in tcp_sock and an SNMP counter for PLB Mubashir Adnan Qureshi
2022-09-30  4:53   ` Mubashir Adnan Qureshi [this message]
2022-10-03 23:42   ` [PATCH net-next v2 0/5] Add PLB functionality to TCP Jakub Kicinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220930045320.5252-6-mubashirmaq@gmail.com \
    --to=mubashirmaq@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=mubashirq@google.com \
    --cc=ncardwell@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=ycheng@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).