summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/inet/tcp/tcp_output.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/uts/common/inet/tcp/tcp_output.c')
-rw-r--r--usr/src/uts/common/inet/tcp/tcp_output.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/usr/src/uts/common/inet/tcp/tcp_output.c b/usr/src/uts/common/inet/tcp/tcp_output.c
index f54ab3fb33..ae9efe863d 100644
--- a/usr/src/uts/common/inet/tcp/tcp_output.c
+++ b/usr/src/uts/common/inet/tcp/tcp_output.c
@@ -21,7 +21,7 @@
/*
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2014, 2016 by Delphix. All rights reserved.
+ * Copyright (c) 2014, 2017 by Delphix. All rights reserved.
* Copyright 2019 Joyent, Inc.
*/
@@ -81,6 +81,18 @@ static void tcp_wput_proto(void *, mblk_t *, void *, ip_recv_attr_t *);
*/
static int tcp_tx_pull_len = 16;
+static void
+cc_after_idle(tcp_t *tcp)
+{
+ uint32_t old_cwnd = tcp->tcp_cwnd;
+
+ if (CC_ALGO(tcp)->after_idle != NULL)
+ CC_ALGO(tcp)->after_idle(&tcp->tcp_ccv);
+
+ DTRACE_PROBE3(cwnd__cc__after__idle, tcp_t *, tcp, uint32_t, old_cwnd,
+ uint32_t, tcp->tcp_cwnd);
+}
+
int
tcp_wput(queue_t *q, mblk_t *mp)
{
@@ -219,7 +231,6 @@ tcp_wput_data(tcp_t *tcp, mblk_t *mp, boolean_t urgent)
int32_t total_hdr_len;
int32_t tcp_hdr_len;
int rc;
- tcp_stack_t *tcps = tcp->tcp_tcps;
conn_t *connp = tcp->tcp_connp;
clock_t now = LBOLT_FASTPATH;
@@ -374,7 +385,7 @@ data_null:
if ((tcp->tcp_suna == snxt) && !tcp->tcp_localnet &&
(TICK_TO_MSEC(now - tcp->tcp_last_recv_time) >= tcp->tcp_rto)) {
- TCP_SET_INIT_CWND(tcp, mss, tcps->tcps_slow_start_after_idle);
+ cc_after_idle(tcp);
}
if (tcpstate == TCPS_SYN_RCVD) {
/*
@@ -1195,7 +1206,7 @@ tcp_output(void *arg, mblk_t *mp, void *arg2, ip_recv_attr_t *dummy)
now = LBOLT_FASTPATH;
if ((tcp->tcp_suna == snxt) && !tcp->tcp_localnet &&
(TICK_TO_MSEC(now - tcp->tcp_last_recv_time) >= tcp->tcp_rto)) {
- TCP_SET_INIT_CWND(tcp, mss, tcps->tcps_slow_start_after_idle);
+ cc_after_idle(tcp);
}
usable = tcp->tcp_swnd; /* tcp window size */