]> git.baikalelectronics.ru Git - kernel.git/commitdiff
mptcp: add more offered MIBs counter
authorPaolo Abeni <pabeni@redhat.com>
Wed, 4 May 2022 21:54:08 +0000 (14:54 -0700)
committerJakub Kicinski <kuba@kernel.org>
Fri, 6 May 2022 02:00:16 +0000 (19:00 -0700)
Track the exceptional handling of MPTCP-level offered window
with a few more counters for observability.

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>
net/mptcp/mib.c
net/mptcp/mib.h
net/mptcp/options.c

index 6a6f8151375a6fdc479b4ccdac98f05ddbf36adf..0dac2863c6e1eb8b69614a88f912b6944ba82eb1 100644 (file)
@@ -57,6 +57,9 @@ static const struct snmp_mib mptcp_snmp_list[] = {
        SNMP_MIB_ITEM("SubflowStale", MPTCP_MIB_SUBFLOWSTALE),
        SNMP_MIB_ITEM("SubflowRecover", MPTCP_MIB_SUBFLOWRECOVER),
        SNMP_MIB_ITEM("SndWndShared", MPTCP_MIB_SNDWNDSHARED),
+       SNMP_MIB_ITEM("RcvWndShared", MPTCP_MIB_RCVWNDSHARED),
+       SNMP_MIB_ITEM("RcvWndConflictUpdate", MPTCP_MIB_RCVWNDCONFLICTUPDATE),
+       SNMP_MIB_ITEM("RcvWndConflict", MPTCP_MIB_RCVWNDCONFLICT),
        SNMP_MIB_SENTINEL
 };
 
index 2411510bef66abf80621b6fac0deebf1a109b87a..2be3596374f4e565385e2eb9ebc099a1209e3b88 100644 (file)
@@ -50,6 +50,11 @@ enum linux_mptcp_mib_field {
        MPTCP_MIB_SUBFLOWSTALE,         /* Subflows entered 'stale' status */
        MPTCP_MIB_SUBFLOWRECOVER,       /* Subflows returned to active status after being stale */
        MPTCP_MIB_SNDWNDSHARED,         /* Subflow snd wnd is overridden by msk's one */
+       MPTCP_MIB_RCVWNDSHARED,         /* Subflow rcv wnd is overridden by msk's one */
+       MPTCP_MIB_RCVWNDCONFLICTUPDATE, /* subflow rcv wnd is overridden by msk's one due to
+                                        * conflict with another subflow while updating msk rcv wnd
+                                        */
+       MPTCP_MIB_RCVWNDCONFLICT,       /* Conflict with while updating msk rcv wnd */
        __MPTCP_MIB_MAX
 };
 
index 3e3156cfe813dfac4f6549ef9e36301ff428229f..ac3b7b8a02f6ec99efd872301b0ca49bd071f578 100644 (file)
@@ -1248,8 +1248,11 @@ static void mptcp_set_rwin(struct tcp_sock *tp, struct tcphdr *th)
 
                        if (rcv_wnd == rcv_wnd_old)
                                break;
-                       if (before64(rcv_wnd_new, rcv_wnd))
+                       if (before64(rcv_wnd_new, rcv_wnd)) {
+                               MPTCP_INC_STATS(sock_net(ssk), MPTCP_MIB_RCVWNDCONFLICTUPDATE);
                                goto raise_win;
+                       }
+                       MPTCP_INC_STATS(sock_net(ssk), MPTCP_MIB_RCVWNDCONFLICT);
                        rcv_wnd_old = rcv_wnd;
                }
                return;
@@ -1275,6 +1278,7 @@ raise_win:
                /* RFC1323 scaling applied */
                new_win >>= tp->rx_opt.rcv_wscale;
                th->window = htons(new_win);
+               MPTCP_INC_STATS(sock_net(ssk), MPTCP_MIB_RCVWNDSHARED);
        }
 }