Merge v5.14-rc3 into usb-next
[linux-2.6-microblaze.git] / net / sctp / transport.c
index f27b856..397a624 100644 (file)
@@ -213,15 +213,10 @@ void sctp_transport_reset_reconf_timer(struct sctp_transport *transport)
 
 void sctp_transport_reset_probe_timer(struct sctp_transport *transport)
 {
-       int scale = 1;
-
        if (timer_pending(&transport->probe_timer))
                return;
-       if (transport->pl.state == SCTP_PL_COMPLETE &&
-           transport->pl.probe_count == 1)
-               scale = 30; /* works as PMTU_RAISE_TIMER */
        if (!mod_timer(&transport->probe_timer,
-                      jiffies + transport->probe_interval * scale))
+                      jiffies + transport->probe_interval))
                sctp_transport_hold(transport);
 }
 
@@ -333,6 +328,7 @@ void sctp_transport_pl_recv(struct sctp_transport *t)
                t->pl.probe_size += SCTP_PL_MIN_STEP;
                if (t->pl.probe_size >= t->pl.probe_high) {
                        t->pl.probe_high = 0;
+                       t->pl.raise_count = 0;
                        t->pl.state = SCTP_PL_COMPLETE; /* Search -> Search Complete */
 
                        t->pl.probe_size = t->pl.pmtu;
@@ -340,8 +336,12 @@ void sctp_transport_pl_recv(struct sctp_transport *t)
                        sctp_assoc_sync_pmtu(t->asoc);
                }
        } else if (t->pl.state == SCTP_PL_COMPLETE) {
-               t->pl.state = SCTP_PL_SEARCH; /* Search Complete -> Search */
-               t->pl.probe_size += SCTP_PL_MIN_STEP;
+               t->pl.raise_count++;
+               if (t->pl.raise_count == 30) {
+                       /* Raise probe_size again after 30 * interval in Search Complete */
+                       t->pl.state = SCTP_PL_SEARCH; /* Search Complete -> Search */
+                       t->pl.probe_size += SCTP_PL_MIN_STEP;
+               }
        }
 }