mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-22 23:04:43 +00:00
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>
This commit is contained in:
parent
ec20a63aa8
commit
d805397c38
4 changed files with 11 additions and 1 deletions
|
@ -120,6 +120,12 @@ void sctp_packet_config(struct sctp_packet *packet, __u32 vtag,
|
|||
sctp_assoc_sync_pmtu(asoc);
|
||||
}
|
||||
|
||||
if (asoc->pmtu_pending) {
|
||||
if (asoc->param_flags & SPP_PMTUD_ENABLE)
|
||||
sctp_assoc_sync_pmtu(asoc);
|
||||
asoc->pmtu_pending = 0;
|
||||
}
|
||||
|
||||
/* If there a is a prepend chunk stick it on the list before
|
||||
* any other chunks get appended.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue