diff options
author | Xin Long <lucien.xin@gmail.com> | 2018-10-15 19:58:29 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-10-15 22:54:20 -0700 |
commit | d805397c3822d57ca3884d4bea37b2291fc40992 (patch) | |
tree | 26a590ccde4580779a2428d6071b87bdc967bfae /include/net/sctp | |
parent | ec20a63aa8b8ec3223fb25cdb2a49f9f9dfda88c (diff) | |
download | linux-d805397c3822d57ca3884d4bea37b2291fc40992.tar.gz linux-d805397c3822d57ca3884d4bea37b2291fc40992.tar.bz2 linux-d805397c3822d57ca3884d4bea37b2291fc40992.zip |
sctp: use the pmtu from the icmp packet to update transport pathmtu
Other than asoc pmtu sync from all transports, sctp_assoc_sync_pmtu
is also processing transport pmtu_pending by icmp packets. But it's
meaningless to use sctp_dst_mtu(t->dst) as new pmtu for a transport.
The right pmtu value should come from the icmp packet, and it would
be saved into transport->mtu_info in this patch and used later when
the pmtu sync happens in sctp_sendmsg_to_asoc or sctp_packet_config.
Besides, without this patch, as pmtu can only be updated correctly
when receiving a icmp packet and no place is holding sock lock, it
will take long time if the sock is busy with sending packets.
Note that it doesn't process transport->mtu_info in .release_cb(),
as there is no enough information for pmtu update, like for which
asoc or transport. It is not worth traversing all asocs to check
pmtu_pending. So unlike tcp, sctp does this in tx path, for which
mtu_info needs to be atomic_t.
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/sctp')
-rw-r--r-- | include/net/sctp/structs.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index 28a7c8e44636..a11f93790476 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h @@ -876,6 +876,8 @@ struct sctp_transport { unsigned long sackdelay; __u32 sackfreq; + atomic_t mtu_info; + /* When was the last time that we heard from this transport? We use * this to pick new active and retran paths. */ |