diff options
author | Nils Nieuwejaar <nils@oxidecomputer.com> | 2021-08-15 11:30:44 -0400 |
---|---|---|
committer | Dan McDonald <danmcd@joyent.com> | 2022-01-10 10:24:25 -0500 |
commit | 861fa1490335b8e3cc91a1efafd8b9e481813931 (patch) | |
tree | 8a15d2f665e428215b771d43fca4de9925ab44f0 /usr/src/uts/common/inet/tcp | |
parent | 5608cf052f6eabe370f15f49b6fa5d0d8be732af (diff) | |
download | illumos-gate-861fa1490335b8e3cc91a1efafd8b9e481813931.tar.gz |
14017 Add support for TCP_QUICKACK
Reviewed by: Joshua M. Clulow <josh@sysmgr.org>
Reviewed by: Andy Fiddaman <andy@omnios.org>
Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src/uts/common/inet/tcp')
-rw-r--r-- | usr/src/uts/common/inet/tcp/tcp.c | 2 | ||||
-rw-r--r-- | usr/src/uts/common/inet/tcp/tcp_input.c | 4 | ||||
-rw-r--r-- | usr/src/uts/common/inet/tcp/tcp_opt_data.c | 11 |
3 files changed, 17 insertions, 0 deletions
diff --git a/usr/src/uts/common/inet/tcp/tcp.c b/usr/src/uts/common/inet/tcp/tcp.c index 6cae350878..9348ea3d0f 100644 --- a/usr/src/uts/common/inet/tcp/tcp.c +++ b/usr/src/uts/common/inet/tcp/tcp.c @@ -25,6 +25,7 @@ * Copyright (c) 2013, 2017 by Delphix. All rights reserved. * Copyright 2014, OmniTI Computer Consulting, Inc. All rights reserved. * Copyright 2020 Joyent, Inc. + * Copyright 2022 Oxide Computer Company */ /* Copyright (c) 1990 Mentat Inc. */ @@ -2406,6 +2407,7 @@ tcp_init_values(tcp_t *tcp, tcp_t *parent) tcp->tcp_fin_wait_2_flush_interval = parent->tcp_fin_wait_2_flush_interval; + tcp->tcp_quickack = parent->tcp_quickack; tcp->tcp_ka_interval = parent->tcp_ka_interval; tcp->tcp_ka_abort_thres = parent->tcp_ka_abort_thres; diff --git a/usr/src/uts/common/inet/tcp/tcp_input.c b/usr/src/uts/common/inet/tcp/tcp_input.c index b3e4a07303..dd264528fc 100644 --- a/usr/src/uts/common/inet/tcp/tcp_input.c +++ b/usr/src/uts/common/inet/tcp/tcp_input.c @@ -25,6 +25,7 @@ * Copyright 2019 Joyent, Inc. * Copyright (c) 2014, 2016 by Delphix. All rights reserved. * Copyright 2020 OmniOS Community Edition (OmniOSce) Association. + * Copyright 2022 Oxide Computer Company */ /* This file contains all TCP input processing functions. */ @@ -4754,6 +4755,9 @@ update_ack: tcp->tcp_rack_cur_max = tcp->tcp_rack_abs_max; else tcp->tcp_rack_cur_max = cur_max; + } else if (tcp->tcp_quickack) { + /* The executable asked that we ack each packet */ + flags |= TH_ACK_NEEDED; } else if (TCP_IS_DETACHED(tcp)) { /* We don't have an ACK timer for detached TCP. */ flags |= TH_ACK_NEEDED; diff --git a/usr/src/uts/common/inet/tcp/tcp_opt_data.c b/usr/src/uts/common/inet/tcp/tcp_opt_data.c index fa7c8b2f48..8687b52d53 100644 --- a/usr/src/uts/common/inet/tcp/tcp_opt_data.c +++ b/usr/src/uts/common/inet/tcp/tcp_opt_data.c @@ -24,6 +24,7 @@ * Copyright 2019 Joyent, Inc. * Copyright (c) 2016 by Delphix. All rights reserved. * Copyright 2020 OmniOS Community Edition (OmniOSce) Association. + * Copyright 2022 Oxide Computer Company */ #include <sys/types.h> @@ -135,6 +136,8 @@ opdes_t tcp_opt_arr[] = { { TCP_CORK, IPPROTO_TCP, OA_RW, OA_RW, OP_NP, 0, sizeof (int), 0 }, +{ TCP_QUICKACK, IPPROTO_TCP, OA_RW, OA_RW, OP_NP, 0, sizeof (int), 0 }, + { TCP_RTO_INITIAL, IPPROTO_TCP, OA_RW, OA_RW, OP_NP, 0, sizeof (uint32_t), 0 }, { TCP_RTO_MIN, IPPROTO_TCP, OA_RW, OA_RW, OP_NP, 0, sizeof (uint32_t), 0 }, @@ -449,6 +452,9 @@ tcp_opt_get(conn_t *connp, int level, int name, uchar_t *ptr) case TCP_CORK: *i1 = tcp->tcp_cork; return (sizeof (int)); + case TCP_QUICKACK: + *i1 = tcp->tcp_quickack; + return (sizeof (int)); case TCP_RTO_INITIAL: *i1 = tcp->tcp_rto_initial; return (sizeof (uint32_t)); @@ -919,6 +925,11 @@ tcp_opt_set(conn_t *connp, uint_t optset_context, int level, int name, tcp->tcp_cork = onoff; } break; + case TCP_QUICKACK: + if (!checkonly) { + tcp->tcp_quickack = onoff; + } + break; case TCP_RTO_INITIAL: if (checkonly || val == 0) break; |