summaryrefslogtreecommitdiff
path: root/net/mptcp/protocol.c
diff options
context:
space:
mode:
authorPaolo Abeni <pabeni@redhat.com>2022-05-04 14:54:05 -0700
committerJakub Kicinski <kuba@kernel.org>2022-05-05 19:00:15 -0700
commit92be2f522777b775a2d83b00c3690732c1243dfc (patch)
tree42e97d811bb5549fbe83c5f12da5a43885d95b37 /net/mptcp/protocol.c
parentb713d0067574e15cddd08ee7f25acd535b7437cf (diff)
mptcp: add mib for xmit window sharing
Bump a counter for counter when snd_wnd is shared among subflow, for observability's sake. Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/mptcp/protocol.c')
-rw-r--r--net/mptcp/protocol.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index 0e7f556ea2c7..961c2aba2a11 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -1153,8 +1153,10 @@ static int mptcp_check_allowed_size(const struct mptcp_sock *msk, struct sock *s
mptcp_snd_wnd = window_end - data_seq;
avail_size = min_t(unsigned int, mptcp_snd_wnd, avail_size);
- if (unlikely(tcp_sk(ssk)->snd_wnd < mptcp_snd_wnd))
+ if (unlikely(tcp_sk(ssk)->snd_wnd < mptcp_snd_wnd)) {
tcp_sk(ssk)->snd_wnd = min_t(u64, U32_MAX, mptcp_snd_wnd);
+ MPTCP_INC_STATS(sock_net(ssk), MPTCP_MIB_SNDWNDSHARED);
+ }
return avail_size;
}