All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geliang Tang <geliangtang@gmail.com>
To: Paolo Abeni <pabeni@redhat.com>
Cc: mptcp@lists.linux.dev
Subject: Re: [PATCH v3 mptcp-next 1/3] Squash-to: "mptcp: move drop_other_suboptions check under pm lock"
Date: Tue, 27 Jul 2021 12:27:41 +0800	[thread overview]
Message-ID: <CA+WQbwsdwum4B+FpSyfeR_nan5rPD1VRZm0WOoqAHHseQOz4AQ@mail.gmail.com> (raw)
In-Reply-To: <d945af43d09672ea8bd98d06439db11985a3504a.1627296764.git.pabeni@redhat.com>

Hi Paolo,

Thanks for this patch, it looks good to me.

Paolo Abeni <pabeni@redhat.com> 于2021年7月26日周一 下午6:55写道:
>
> Commit message to be updated appending:
>
> """
> Additionally, always drop the other suboption for TCP pure ack:
> that makes both the code simpler and the MPTCP behaviour more
> consistent.
> """
>
>
> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
> ---
>  net/mptcp/pm.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/net/mptcp/pm.c b/net/mptcp/pm.c
> index 4d1828fd2482..cd2323e5ccdc 100644
> --- a/net/mptcp/pm.c
> +++ b/net/mptcp/pm.c
> @@ -266,10 +266,11 @@ bool mptcp_pm_add_addr_signal(struct mptcp_sock *msk, struct sk_buff *skb,
>         if (!mptcp_pm_should_add_signal(msk))
>                 goto out_unlock;
>
> -       if (((msk->pm.addr_signal & BIT(MPTCP_ADD_ADDR_ECHO)) ||
> -            ((msk->pm.addr_signal & BIT(MPTCP_ADD_ADDR_SIGNAL)) &&
> -             (msk->pm.local.family == AF_INET6 || msk->pm.local.port))) &&
> -           skb && skb_is_tcp_pure_ack(skb)) {
> +       /* always drop every other options for pure ack ADD_ADDR; this is a
> +        * plain dup-ack from TCP perspective. The other MPTCP-relevant info,
> +        * if any, will be carried by the 'original' TCP ack
> +        */
> +       if (skb && skb_is_tcp_pure_ack(skb)) {
>                 remaining += opt_size;
>                 *drop_other_suboptions = true;
>         }

If this patch is to be squashed to "mptcp: move drop_other_suboptions check
under pm lock", should it be like this:

@@ -264,10 +264,11 @@ bool mptcp_pm_add_addr_signal(struct mptcp_sock
*msk, struct sk_buff *skb,
     if (!mptcp_pm_should_add_signal(msk))
         goto out_unlock;

-    if ((mptcp_pm_should_add_signal_ipv6(msk) ||
-         mptcp_pm_should_add_signal_port(msk) ||
-         mptcp_pm_should_add_signal_echo(msk)) &&
-        skb && skb_is_tcp_pure_ack(skb)) {
+    /* always drop every other options for pure ack ADD_ADDR; this is a
+     * plain dup-ack from TCP perspective. The other MPTCP-relevant info,
+     * if any, will be carried by the 'original' TCP ack
+     */
+    if (skb && skb_is_tcp_pure_ack(skb)) {
         remaining += opt_size;
         *drop_other_suboptions = true;
     }

Thanks,
-Geliang

> --
> 2.26.3
>

  reply	other threads:[~2021-07-27  4:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-26 10:55 [PATCH v3 mptcp-next 0/3] mptcp: minor out optimization Paolo Abeni
2021-07-26 10:55 ` [PATCH v3 mptcp-next 1/3] Squash-to: "mptcp: move drop_other_suboptions check under pm lock" Paolo Abeni
2021-07-27  4:27   ` Geliang Tang [this message]
2021-07-26 10:55 ` [PATCH v3 mptcp-next 2/3] mptcp: optimize out option generation Paolo Abeni
2021-07-27  4:33   ` Geliang Tang
2021-07-26 10:55 ` [PATCH v3 mptcp-next 3/3] mptcp: shrink mptcp_out_options struct Paolo Abeni
2021-07-28  0:40 ` [PATCH v3 mptcp-next 0/3] mptcp: minor out optimization Mat Martineau
2021-07-28  8:09 ` Matthieu Baerts
2021-07-28 10:46   ` Paolo Abeni

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=CA+WQbwsdwum4B+FpSyfeR_nan5rPD1VRZm0WOoqAHHseQOz4AQ@mail.gmail.com \
    --to=geliangtang@gmail.com \
    --cc=mptcp@lists.linux.dev \
    --cc=pabeni@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.