linux-sctp.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jacek Szafraniec <jacek.szafraniec@nokia.com>
To: Xin Lucien <lucien.xin@gmail.com>
Cc: Jacek Szafraniec <jacek.szafraniec@nokia.com>,
	"linux-sctp" <linux-sctp@vger.kernel.org>,
	Vlad Yasevich <vyasevich@gmail.com>,
	Neil Horman <nhorman@tuxdriver.com>,
	Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Alexander Sverdlin <alexander.sverdlin@nokia.com>,
	Maciej Kwiecien <maciej.kwiecien@nokia.com>
Subject: [PATCH v2 1/1] sctp: do not update t->pathmtu when PMTUD is disabled
Date: Mon, 19 Jul 2021 12:14:48 +0200	[thread overview]
Message-ID: <20210719101448.30139-1-jacek.szafraniec@nokia.com> (raw)
In-Reply-To: <CADvbK_erBY5MmDVJwBi6RSHV4g_ZtirKpN12QJrN1eNvntRuCg@mail.gmail.com>

>> Transport pathmtu can not be updated, when PMTUD is disabled
>> and pathmtu is condigured as fixed. Unconditional update t->pathmtu
>> will result in overwriting parameter configured by user
>> and lack of GSO usage.
>Seems right, the update of dst's mtu from elsewhere shouldn't
>affect SCTP either if SPP_PMTUD_DISABLE flag is set.
I agree.

>Can you please try to fix it with this?
>
>diff --git a/net/sctp/output.c b/net/sctp/output.c
>index a6aa17d..9f53323 100644
>--- a/net/sctp/output.c
>+++ b/net/sctp/output.c
>@@ -103,8 +103,8 @@ void sctp_packet_config(struct sctp_packet
>*packet, __u32 vtag,
>                sctp_transport_route(tp, NULL, sp);
>                if (asoc->param_flags & SPP_PMTUD_ENABLE)
>                        sctp_assoc_sync_pmtu(asoc);
>-       } else if (!sctp_transport_pmtu_check(tp)) {
>-               if (asoc->param_flags & SPP_PMTUD_ENABLE)
>+       } else if (asoc->param_flags & SPP_PMTUD_ENABLE) {
>+               if (!sctp_transport_pmtu_check(tp))
>                        sctp_assoc_sync_pmtu(asoc);
>        }
This proposal is better.
I've tested above. Result is OK.

Tested-by: Jacek Szafraniec <jacek.szafraniec@nokia.com>

Thanks!

      reply	other threads:[~2021-07-19 10:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-16  7:15 [PATCH 0/1] sctp: do not update t->pathmtu when PMTUD is disabled Jacek Szafraniec
2021-07-16  7:16 ` [PATCH 1/1] " Jacek Szafraniec
2021-07-16 17:13   ` Xin Long
2021-07-19 10:14     ` Jacek Szafraniec [this message]

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=20210719101448.30139-1-jacek.szafraniec@nokia.com \
    --to=jacek.szafraniec@nokia.com \
    --cc=alexander.sverdlin@nokia.com \
    --cc=davem@davemloft.net \
    --cc=linux-sctp@vger.kernel.org \
    --cc=lucien.xin@gmail.com \
    --cc=maciej.kwiecien@nokia.com \
    --cc=marcelo.leitner@gmail.com \
    --cc=nhorman@tuxdriver.com \
    --cc=vyasevich@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).