Hello,
On Thu, Sep 22, 2022 at 8:04 AM Mat Martineau
<mathew.j.martineau@linux.intel.com> wrote:
>
> On Wed, 21 Sep 2022, menglong8.dong@gmail.com wrote:
>
> > From: Menglong Dong <imagedong@tencent.com>
> >
> > In the 1th patch, we do some code cleanup with replease 'sock->sk'
> > with 'sk'. In the 2th patch, we add statistics for mptcp socket in
> > use.
> >
> > Changes since v1:
> > - split the code cleanup into the 1th patch.
> > - decrease the statistics for listening mptcp socket inuse with
> > mptcp_listen_inuse_dec()
> > - add MPTCP_DESTROIED flags to store if mptcp_destroy_common() was
> > called on the msk. For fallback case, we need to decrease the
> > statistics only once, and mptcp_destroy_common() can be called
> > more than once.
> >
>
> Hi Menglong -
>
> Thanks for the v2. Other than Matthieu's request about MPTCP_DESTROYED,
> could you also add a selftest patch to confirm the counter is updated
> correctly?
>
> This test script:
>
> tools/testing/selftests/net/mptcp/diag.sh
>
> already creates a large number of simultaneous sockets, so it might work
> well to modify the wait_msk_nr() function to also confirm the protocol
> inuse counter, and then check that the counter returns to zero after the
> sockets are closed.
Thanks for the explanation, I think it can work. In case of that
there are mptcp sockets existing out of the testing, we can also
record the statistics before creating mptcp socket, and compare
the statistics after the closing of mptcp socket.
I'll add the test in the next version.
Thanks!
Menglong Dong
>
> > Menglong Dong (2):
> > mptcp: introduce 'sk' to replace 'sock->sk' in mptcp_listen()
> > mptcp: add statistics for mptcp socket in use
> >
> > net/mptcp/protocol.c | 34 +++++++++++++++++++++++++++-------
> > net/mptcp/protocol.h | 1 +
> > net/mptcp/subflow.c | 3 +++
> > 3 files changed, 31 insertions(+), 7 deletions(-)
> >
> > --
> > 2.37.2
> >
> >
>
> --
> Mat Martineau
> Intel