MPTCP Linux Development
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: menglong8.dong@gmail.com, mathew.j.martineau@linux.intel.com,
	 matthieu.baerts@tessares.net
Cc: mptcp@lists.linux.dev, Menglong Dong <imagedong@tencent.com>
Subject: Re: [PATCH mptcp-next v9 4/6] mptcp: init sk->sk_prot in build_msk()
Date: Mon, 19 Dec 2022 09:32:15 +0100	[thread overview]
Message-ID: <2225c7fa3484a262aa143b2e250cdc87beef410b.camel@redhat.com> (raw)
In-Reply-To: <20221219075048.255811-5-imagedong@tencent.com>

On Mon, 2022-12-19 at 15:50 +0800, menglong8.dong@gmail.com wrote:
> From: Menglong Dong <imagedong@tencent.com>
> 
> The 'sk_prot' field in token KUNIT self-tests will be dereferenced in
> mptcp_token_new_connect(). Therefore, init it with tcp_prot.
> 
> Signed-off-by: Menglong Dong <imagedong@tencent.com>
> ---
>  net/mptcp/token_test.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/net/mptcp/token_test.c b/net/mptcp/token_test.c
> index 5d984bec1cd8..0758865ab658 100644
> --- a/net/mptcp/token_test.c
> +++ b/net/mptcp/token_test.c
> @@ -57,6 +57,9 @@ static struct mptcp_sock *build_msk(struct kunit *test)
>  	KUNIT_EXPECT_NOT_ERR_OR_NULL(test, msk);
>  	refcount_set(&((struct sock *)msk)->sk_refcnt, 1);
>  	sock_net_set((struct sock *)msk, &init_net);
> +
> +	/* be sure the token helpers can dereference sk->sk_prot */
> +	((struct sock *)msk)->sk_prot = &tcp_prot;
>  	return msk;
>  }
>  

Since you likelly have to post another revision of this series, I think
it would be better moving this patch before "mptcp: add statistics for
mptcp socket in use" - so that self-tests are always functional.

Otherwise LGTM, thanks!

Paolo


  reply	other threads:[~2022-12-19  8:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-19  7:50 [PATCH mptcp-next v9 0/5] mptcp: add statistics for mptcp socket in use menglong8.dong
2022-12-19  7:50 ` [PATCH mptcp-next v9 1/6] mptcp: introduce 'sk' to replace 'sock->sk' in mptcp_listen() menglong8.dong
2022-12-19  7:50 ` [PATCH mptcp-next v9 2/6] mptcp: rename 'sk' to 'ssk' in mptcp_token_new_connect() menglong8.dong
2022-12-19  7:50 ` [PATCH mptcp-next v9 3/6] mptcp: add statistics for mptcp socket in use menglong8.dong
2022-12-19  7:50 ` [PATCH mptcp-next v9 4/6] mptcp: init sk->sk_prot in build_msk() menglong8.dong
2022-12-19  8:32   ` Paolo Abeni [this message]
2022-12-19  8:42     ` Menglong Dong
2022-12-19  7:50 ` [PATCH mptcp-next v9 5/6] selftest: mptcp: exit from copyfd_io_poll() when receive SIGUSR1 menglong8.dong
2022-12-19  7:50 ` [PATCH mptcp-next v9 6/6] selftest: mptcp: add test for mptcp socket in use menglong8.dong
2022-12-19  8:08   ` selftest: mptcp: add test for mptcp socket in use: Build Failure MPTCP CI
2022-12-19  8:28     ` Paolo Abeni
2022-12-19  8:57   ` selftest: mptcp: add test for mptcp socket in use: Tests Results MPTCP CI

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=2225c7fa3484a262aa143b2e250cdc87beef410b.camel@redhat.com \
    --to=pabeni@redhat.com \
    --cc=imagedong@tencent.com \
    --cc=mathew.j.martineau@linux.intel.com \
    --cc=matthieu.baerts@tessares.net \
    --cc=menglong8.dong@gmail.com \
    --cc=mptcp@lists.linux.dev \
    /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