Skip to content

Commit 92be2f5

Browse files
Paolo Abenikuba-moo
authored andcommitted
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>
1 parent b713d00 commit 92be2f5

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

net/mptcp/mib.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ static const struct snmp_mib mptcp_snmp_list[] = {
5656
SNMP_MIB_ITEM("RcvPruned", MPTCP_MIB_RCVPRUNED),
5757
SNMP_MIB_ITEM("SubflowStale", MPTCP_MIB_SUBFLOWSTALE),
5858
SNMP_MIB_ITEM("SubflowRecover", MPTCP_MIB_SUBFLOWRECOVER),
59+
SNMP_MIB_ITEM("SndWndShared", MPTCP_MIB_SNDWNDSHARED),
5960
SNMP_MIB_SENTINEL
6061
};
6162

net/mptcp/mib.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ enum linux_mptcp_mib_field {
4949
MPTCP_MIB_RCVPRUNED, /* Incoming packet dropped due to memory limit */
5050
MPTCP_MIB_SUBFLOWSTALE, /* Subflows entered 'stale' status */
5151
MPTCP_MIB_SUBFLOWRECOVER, /* Subflows returned to active status after being stale */
52+
MPTCP_MIB_SNDWNDSHARED, /* Subflow snd wnd is overridden by msk's one */
5253
__MPTCP_MIB_MAX
5354
};
5455

net/mptcp/protocol.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1153,8 +1153,10 @@ static int mptcp_check_allowed_size(const struct mptcp_sock *msk, struct sock *s
11531153
mptcp_snd_wnd = window_end - data_seq;
11541154
avail_size = min_t(unsigned int, mptcp_snd_wnd, avail_size);
11551155

1156-
if (unlikely(tcp_sk(ssk)->snd_wnd < mptcp_snd_wnd))
1156+
if (unlikely(tcp_sk(ssk)->snd_wnd < mptcp_snd_wnd)) {
11571157
tcp_sk(ssk)->snd_wnd = min_t(u64, U32_MAX, mptcp_snd_wnd);
1158+
MPTCP_INC_STATS(sock_net(ssk), MPTCP_MIB_SNDWNDSHARED);
1159+
}
11581160

11591161
return avail_size;
11601162
}

0 commit comments

Comments
 (0)