Skip to content

Commit

Permalink
11553 Want pluggable TCP congestion control algorithms
Browse files Browse the repository at this point in the history
Portions contributed by: Cody Peter Mello <cody.mello@joyent.com>
Reviewed by: Dan McDonald <danmcd@joyent.com>
Reviewed by: Robert Mustacchi <robert.mustacchi@joyent.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
  • Loading branch information
Sebastien Roy authored and rmustacc committed Aug 23, 2019
1 parent 867a2ce commit 45a4b79
Show file tree
Hide file tree
Showing 41 changed files with 2,626 additions and 128 deletions.
4 changes: 4 additions & 0 deletions exception_lists/cstyle
Original file line number Diff line number Diff line change
Expand Up @@ -808,6 +808,10 @@ usr/src/uts/common/gssapi/mechs/krb5/mech/util_validate.c
usr/src/uts/common/gssapi/mechs/krb5/mech/val_cred.c
usr/src/uts/common/gssapi/mechs/krb5/mech/verify.c
usr/src/uts/common/gssapi/mechs/krb5/mech/wrap_size_limit.c
usr/src/uts/common/inet/cc.h
usr/src/uts/common/inet/cc/cc_cubic.c
usr/src/uts/common/inet/cc/cc_module.h
usr/src/uts/common/inet/cc/cc_newreno.c
usr/src/uts/common/io/bnx/570x/*
usr/src/uts/common/io/bnx/include/*
usr/src/uts/common/io/bnxe/577xx/common/bnxe_clc.c
Expand Down
2 changes: 2 additions & 0 deletions exception_lists/hdrchk
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ usr/src/uts/common/gssapi/mechs/krb5/include/krb5.h
usr/src/uts/common/gssapi/mechs/krb5/include/old.h
usr/src/uts/common/gssapi/mechs/krb5/include/raw.h
usr/src/uts/common/gssapi/mechs/krb5/include/rsa-md4.h
usr/src/uts/common/inet/cc.h
usr/src/uts/common/inet/cc/cc_module.h
usr/src/uts/common/io/axf/ax88172reg.h
usr/src/uts/common/io/bnx/570x/*
usr/src/uts/common/io/bnx/include/*
Expand Down
1 change: 1 addition & 0 deletions exception_lists/packaging
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ usr/lib/llib-like.ln
usr/lib/amd64/llib-like.ln i386
usr/lib/sparcv9/llib-like.ln sparc
#
usr/include/inet/cc.h
usr/include/inet/ip_impl.h
usr/include/inet/ip_ndp.h
usr/include/inet/ip2mac_impl.h
Expand Down
5 changes: 4 additions & 1 deletion usr/src/lib/libipadm/common/ipadm_prop.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*/
/*
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013 by Delphix. All rights reserved.
* Copyright (c) 2013, 2017 by Delphix. All rights reserved.
*/

/*
Expand Down Expand Up @@ -153,6 +153,9 @@ static const char *ecn_sack_vals[] = {"never", "passive", "active", NULL};

/* Supported TCP protocol properties */
static ipadm_prop_desc_t ipadm_tcp_prop_table[] = {
{ "congestion_control", NULL, IPADMPROP_CLASS_MODULE, MOD_PROTO_TCP, 0,
i_ipadm_set_prop, i_ipadm_get_prop, i_ipadm_get_prop },

{ "ecn", NULL, IPADMPROP_CLASS_MODULE, MOD_PROTO_TCP, 0,
i_ipadm_set_ecnsack, i_ipadm_get_ecnsack, i_ipadm_get_ecnsack },

Expand Down
5 changes: 4 additions & 1 deletion usr/src/man/man1m/ipadm.1m
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
.\"
.\"
.\" Copyright (c) 2012, Joyent, Inc. All Rights Reserved
.\" Copyright (c) 2013 by Delphix. All rights reserved.
.\" Copyright (c) 2013, 2017 by Delphix. All rights reserved.
.\" Copyright 2018 Nexenta Systems, Inc.
.\" Copyright (c) 2016-2017, Chris Fraire <cfraire@me.com>.
.\" Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
Expand Down Expand Up @@ -777,6 +777,9 @@ syntax can be used to add/remove values from the current list of values on the
property.
The property name can be one of the following:
.Bl -tag -compact -width "smallest_nonpriv_port"
.It Cm congestion_control
The default congestion-control algorithm to be used for new connections
.Pq TCP .
.It Cm ecn
Explicit congestion control
.Pq Cm never Ns / Ns Cm passive Ns / Ns Cm active
Expand Down
7 changes: 7 additions & 0 deletions usr/src/pkg/manifests/system-kernel.mf
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

#
# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2014, 2017 by Delphix. All rights reserved.
# Copyright 2013 Saso Kiselkov. All rights reserved.
# Copyright 2015 Nexenta Systems, Inc. All rights reserved.
# Copyright 2016 Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
Expand Down Expand Up @@ -66,6 +67,8 @@ dir path=etc/crypto group=sys
dir path=etc/sock2path.d group=sys
dir path=kernel group=sys
$(i386_ONLY)dir path=kernel/$(ARCH64) group=sys
dir path=kernel/cc group=sys
dir path=kernel/cc/$(ARCH64) group=sys
dir path=kernel/crypto group=sys
dir path=kernel/crypto/$(ARCH64) group=sys
dir path=kernel/dacf group=sys
Expand Down Expand Up @@ -311,6 +314,9 @@ file path=etc/name_to_sysnum group=sys \
file path=etc/sock2path.d/system%2Fkernel group=sys
file path=etc/system group=sys original_name=SUNWckr:etc/system preserve=true
$(i386_ONLY)file path=kernel/$(ARCH64)/genunix group=sys mode=0755
file path=kernel/cc/$(ARCH64)/cc_cubic group=sys mode=0755
file path=kernel/cc/$(ARCH64)/cc_newreno group=sys mode=0755
file path=kernel/cc/$(ARCH64)/cc_sunreno group=sys mode=0755
file path=kernel/crypto/$(ARCH64)/aes group=sys mode=0755
file path=kernel/crypto/$(ARCH64)/arcfour group=sys mode=0755
file path=kernel/crypto/$(ARCH64)/blowfish group=sys mode=0755
Expand Down Expand Up @@ -533,6 +539,7 @@ file path=kernel/misc/$(ARCH64)/bignum group=sys mode=0755
$(i386_ONLY)file path=kernel/misc/$(ARCH64)/bootdev group=sys mode=0755
file path=kernel/misc/$(ARCH64)/busra group=sys mode=0755
file path=kernel/misc/$(ARCH64)/cardbus group=sys mode=0755
file path=kernel/misc/$(ARCH64)/cc group=sys mode=0755
file path=kernel/misc/$(ARCH64)/cmlb group=sys mode=0755
file path=kernel/misc/$(ARCH64)/consconfig group=sys mode=0755
file path=kernel/misc/$(ARCH64)/ctf group=sys mode=0755
Expand Down
4 changes: 4 additions & 0 deletions usr/src/uts/Makefile.targ
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
# Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
# Copyright 2014 Garrett D'Amore <garrett@damore.org>
# Copyright 2016 Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
# Copyright (c) 2017 by Delphix. All rights reserved.
#
# This Makefiles contains the common targets and definitions for
# all kernels. It is to be included in the Makefiles for specific
Expand Down Expand Up @@ -177,6 +178,9 @@ $(ROOT_DACF_DIR)/%: $(OBJS_DIR)/% $(ROOT_DACF_DIR) FRC
$(ROOT_BRAND_DIR)/%: $(OBJS_DIR)/% $(ROOT_BRAND_DIR) FRC
$(INS.file)

$(ROOT_CC_DIR)/%: $(OBJS_DIR)/% $(ROOT_MOD_DIR) $(ROOT_CC_DIR) FRC
$(INS.file)

$(ROOT_CRYPTO_DIR)/%: $(OBJS_DIR)/% $(ROOT_CRYPTO_DIR) FRC
$(INS.file)

Expand Down
10 changes: 7 additions & 3 deletions usr/src/uts/Makefile.uts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#
# Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011 Bayard G. Bell. All rights reserved.
# Copyright (c) 2011 by Delphix. All rights reserved.
# Copyright (c) 2011,2017 by Delphix. All rights reserved.
# Copyright (c) 2013 Andrew Stormont. All rights reserved.
# Copyright 2016 Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
# Copyright (c) 2019, Joyent, Inc.
Expand Down Expand Up @@ -430,6 +430,7 @@ ROOT_FONT_DIR_32 = $(ROOT_MOD_DIR)/fonts
ROOT_DACF_DIR_32 = $(ROOT_MOD_DIR)/dacf
ROOT_CRYPTO_DIR_32 = $(ROOT_MOD_DIR)/crypto
ROOT_MAC_DIR_32 = $(ROOT_MOD_DIR)/mac
ROOT_CC_DIR_32 = $(ROOT_MOD_DIR)/cc
ROOT_KICONV_DIR_32 = $(ROOT_MOD_DIR)/kiconv

ROOT_KERN_DIR_64 = $(ROOT_MOD_DIR)/$(SUBDIR64)
Expand Down Expand Up @@ -457,6 +458,7 @@ ROOT_FONT_DIR_64 = $(ROOT_MOD_DIR)/fonts/$(SUBDIR64)
ROOT_DACF_DIR_64 = $(ROOT_MOD_DIR)/dacf/$(SUBDIR64)
ROOT_CRYPTO_DIR_64 = $(ROOT_MOD_DIR)/crypto/$(SUBDIR64)
ROOT_MAC_DIR_64 = $(ROOT_MOD_DIR)/mac/$(SUBDIR64)
ROOT_CC_DIR_64 = $(ROOT_MOD_DIR)/cc/$(SUBDIR64)
ROOT_KICONV_DIR_64 = $(ROOT_MOD_DIR)/kiconv/$(SUBDIR64)

ROOT_KERN_DIR = $(ROOT_KERN_DIR_$(CLASS))
Expand Down Expand Up @@ -484,6 +486,7 @@ ROOT_FONT_DIR = $(ROOT_FONT_DIR_$(CLASS))
ROOT_DACF_DIR = $(ROOT_DACF_DIR_$(CLASS))
ROOT_CRYPTO_DIR = $(ROOT_CRYPTO_DIR_$(CLASS))
ROOT_MAC_DIR = $(ROOT_MAC_DIR_$(CLASS))
ROOT_CC_DIR = $(ROOT_CC_DIR_$(CLASS))
ROOT_KICONV_DIR = $(ROOT_KICONV_DIR_$(CLASS))
ROOT_FIRMWARE_DIR = $(ROOT_MOD_DIR)/firmware

Expand All @@ -502,6 +505,7 @@ ROOT_MOD_DIRS_32 += $(ROOT_EMLXS_FW_DIR_32)
ROOT_MOD_DIRS_32 += $(ROOT_CPU_DIR_32) $(ROOT_FONT_DIR_32)
ROOT_MOD_DIRS_32 += $(ROOT_TOD_DIR_32) $(ROOT_DACF_DIR_32)
ROOT_MOD_DIRS_32 += $(ROOT_CRYPTO_DIR_32) $(ROOT_MAC_DIR_32)
ROOT_MOD_DIRS_32 += $(ROOT_CC_DIR_32)
ROOT_MOD_DIRS_32 += $(ROOT_KICONV_DIR_32)
ROOT_MOD_DIRS_32 += $(ROOT_FIRMWARE_DIR)

Expand Down Expand Up @@ -595,7 +599,7 @@ PARALLEL_KMODS = $(DRV_KMODS) $(EXEC_KMODS) $(FS_KMODS) $(SCHED_KMODS) \
$(MMU_KMODS) $(DACF_KMODS) $(EXPORT_KMODS) $(IPP_KMODS) \
$(CRYPTO_KMODS) $(PCBE_KMODS) \
$(DRV_KMODS_$(CLASS)) $(MISC_KMODS_$(CLASS)) $(MAC_KMODS) \
$(BRAND_KMODS) $(KICONV_KMODS) \
$(BRAND_KMODS) $(KICONV_KMODS) $(CC_KMODS) \
$(SOCKET_KMODS)

KMODS = $(GENUNIX_KMODS) $(PARALLEL_KMODS)
Expand All @@ -607,7 +611,7 @@ LINT_KMODS = $(DRV_KMODS) $(EXEC_KMODS) $(FS_KMODS) $(SCHED_KMODS) \
$(MACH_KMODS) $(GSS_KMODS) $(DACF_KMODS) $(IPP_KMODS) \
$(CRYPTO_KMODS) $(PCBE_KMODS) \
$(DRV_KMODS_$(CLASS)) $(MISC_KMODS_$(CLASS)) $(MAC_KMODS) \
$(BRAND_KMODS) $(KICONV_KMODS) $(SOCKET_KMODS)
$(BRAND_KMODS) $(KICONV_KMODS) $(CC_KMODS) $(SOCKET_KMODS)

#
# Files to be compiled with -xa, to generate basic block execution
Expand Down
8 changes: 8 additions & 0 deletions usr/src/uts/common/Makefile.files
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,14 @@ BLKDEV_OBJS += blkdev.o

CARDBUS_OBJS += cardbus.o cardbus_hp.o cardbus_cfg.o

CC_OBJS += cc.o

CC_CUBIC_OBJS += cc_cubic.o

CC_NEWRENO_OBJS += cc_newreno.o

CC_SUNRENO_OBJS += cc_sunreno.o

CONSKBD_OBJS += conskbd.o

CONSMS_OBJS += consms.o
Expand Down
9 changes: 8 additions & 1 deletion usr/src/uts/common/Makefile.rules
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# Copyright 2013 Saso Kiselkov. All rights reserved.
# Copyright 2019 Joyent, Inc.
# Copyright 2018 Nexenta Systems, Inc.
# Copyright (c) 2016 by Delphix. All rights reserved.
# Copyright (c) 2017 by Delphix. All rights reserved.
#

#
Expand Down Expand Up @@ -527,6 +527,10 @@ $(OBJS_DIR)/%.o: $(UTSBASE)/common/inet/dlpistub/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)

$(OBJS_DIR)/%.o: $(UTSBASE)/common/inet/cc/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)

$(OBJS_DIR)/%.o: $(UTSBASE)/common/io/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
Expand Down Expand Up @@ -1962,6 +1966,9 @@ $(LINTS_DIR)/%.ln: $(UTSBASE)/common/inet/nca/%.c
$(LINTS_DIR)/%.ln: $(UTSBASE)/common/inet/dlpistub/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))

$(LINTS_DIR)/%.ln: $(UTSBASE)/common/inet/cc/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))

$(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))

Expand Down
6 changes: 4 additions & 2 deletions usr/src/uts/common/inet/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
Expand All @@ -23,12 +23,14 @@
# Copyright 2010 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# Copyright (c) 2014, 2017 by Delphix. All rights reserved.
#
# uts/common/inet/Makefile
#
# include global definitions
include ../../../Makefile.master

HDRS= arp.h common.h ipclassifier.h ip.h ip6.h ipdrop.h ipnet.h \
HDRS= arp.h cc.h common.h ipclassifier.h ip.h ip6.h ipdrop.h ipnet.h \
ipsecah.h ipsecesp.h ipsec_info.h iptun.h ip6_asp.h ip_if.h ip_ire.h \
ip_multi.h ip_netinfo.h ip_ndp.h ip_rts.h ipsec_impl.h keysock.h \
led.h mi.h mib2.h nd.h optcom.h sadb.h sctp_itf.h snmpcom.h tcp.h \
Expand Down
Loading

0 comments on commit 45a4b79

Please sign in to comment.