From nobody Sun Nov 14 15:03:06 2021
X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
	by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id CEE1118679AE
	for <dev-commits-src-main@mlmmj.nyi.freebsd.org>; Sun, 14 Nov 2021 15:03:17 +0000 (UTC)
	(envelope-from rrs@netflix.com)
Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b])
	(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
	 client-signature RSA-PSS (2048 bits) client-digest SHA256)
	(Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK))
	by mx1.freebsd.org (Postfix) with ESMTPS id 4HsbDN5SMcz3vN4
	for <dev-commits-src-main@freebsd.org>; Sun, 14 Nov 2021 15:03:16 +0000 (UTC)
	(envelope-from rrs@netflix.com)
Received: by mail-pl1-x62b.google.com with SMTP id p18so12261069plf.13
        for <dev-commits-src-main@freebsd.org>; Sun, 14 Nov 2021 07:03:16 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=netflix.com; s=google;
        h=from:message-id:mime-version:subject:date:in-reply-to:cc:to
         :references;
        bh=6O56mZmNSqBQGE1weEwbgPKdA74GXYoQVkuDwulKaA4=;
        b=j2BrmaJCMnl2wZnDHaIzF8VUtqfEWKE9GE2z+gM9h5hv3y9PfClQu9w+GbXQISeClM
         CuxeWjB6u1bM/lfzo3FJ3PVhBgubHM9JNOmZgpPB9B0gyOrhmJ99hIKE+wBigqqbuy/i
         WFhuZGu5TLTL/V6CGVsYQsQ/Evoh9GQf/UvGg=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20210112;
        h=x-gm-message-state:from:message-id:mime-version:subject:date
         :in-reply-to:cc:to:references;
        bh=6O56mZmNSqBQGE1weEwbgPKdA74GXYoQVkuDwulKaA4=;
        b=UspniFGykCbwJJ9v499J+ZVOxYTbodkFV9o3KPFlo+D+784FGDXSbmwx/Un5F1rZAM
         Zi+KEtAk9a6vQWrHtwefuw5HlHBxSGUwMXnuwxwSyYy79zirLWkOl1sTlO2ekz9poCU7
         ve1C5ynpCmfUFnDed6Ik5aAYHJyl4pSgyxwz595XyIaxy5QyFc/Jn3LqmQkWhFgtf1sQ
         zuRUn5Zd4bpv+91Ea45lNxX61IuBv4ueDs+6OSU2cnqEmWbl0/8nHHnFuTNsR6o7eMMg
         2l0vj2ala3b8ApMfsopqbw6BD4MrRJc0ikCh12+w3JSoM/55KjjiBMsvpKYgmXVmBHY1
         LhPw==
X-Gm-Message-State: AOAM533CZ3y9DFebLTicvpPd9vJqQkXQ7HVitXwtDcEvZbXrKXKZvO1O
	5h4Cxw1FLnlMrRogIeYX6/0how==
X-Google-Smtp-Source: ABdhPJwgxdg2L5sycEeihXVf01r/r2Q81z2rJjy0y+e8eXi+C41HQQj5o57GT256tuXR/En1DShDLw==
X-Received: by 2002:a17:90a:1b45:: with SMTP id q63mr55443957pjq.135.1636902190185;
        Sun, 14 Nov 2021 07:03:10 -0800 (PST)
Received: from smtpclient.apple (072-239-139-197.res.spectrum.com. [72.239.139.197])
        by smtp.gmail.com with ESMTPSA id f2sm13084508pfe.132.2021.11.14.07.03.07
        (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
        Sun, 14 Nov 2021 07:03:08 -0800 (PST)
Message-Id: <5A60AA15-F560-44D9-89A0-BD0A197E5E58@netflix.com>
Content-Type: multipart/signed;
	boundary="Apple-Mail=_3E97E46A-D01D-461F-9B18-231FA993F6C0";
	protocol="application/pkcs7-signature";
	micalg=sha-256
List-Id: Commit messages for the main branch of the src repository <dev-commits-src-main.freebsd.org>
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main
List-Help: <mailto:dev-commits-src-main+help@freebsd.org>
List-Post: <mailto:dev-commits-src-main@freebsd.org>
List-Subscribe: <mailto:dev-commits-src-main+subscribe@freebsd.org>
List-Unsubscribe: <mailto:dev-commits-src-main+unsubscribe@freebsd.org>
Sender: owner-dev-commits-src-main@freebsd.org
X-BeenThere: dev-commits-src-main@freebsd.org
Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\))
Subject: Re: git: b8d60729deef - main - tcp: Congestion control cleanup.
Date: Sun, 14 Nov 2021 10:03:06 -0500
In-Reply-To: <2a564b11-b1f4-a4fe-745b-27f45fb134eb@FreeBSD.org>
Cc: Jessica Clarke <jrtc27@freebsd.org>,
 Randall Ray Stewart <rrs@freebsd.org>,
 "src-committers@freebsd.org" <src-committers@freebsd.org>,
 "dev-commits-src-all@freebsd.org" <dev-commits-src-all@freebsd.org>,
 "dev-commits-src-main@freebsd.org" <dev-commits-src-main@freebsd.org>
To: John Baldwin <jhb@freebsd.org>
References: <202111111131.1ABBVH6s017371@gitrepo.freebsd.org>
 <DDB6E732-7054-4C57-ADFD-4534CBAD5109@freebsd.org>
 <2a564b11-b1f4-a4fe-745b-27f45fb134eb@FreeBSD.org>
X-Mailer: Apple Mail (2.3654.120.0.1.13)
X-Rspamd-Queue-Id: 4HsbDN5SMcz3vN4
X-Spamd-Bar: -------------
Authentication-Results: mx1.freebsd.org;
	dkim=pass header.d=netflix.com header.s=google header.b=j2BrmaJC;
	dmarc=pass (policy=reject) header.from=netflix.com;
	spf=pass (mx1.freebsd.org: domain of rrs@netflix.com designates 2607:f8b0:4864:20::62b as permitted sender) smtp.mailfrom=rrs@netflix.com
X-Spamd-Result: default: False [-13.59 / 15.00];
	 TO_DN_EQ_ADDR_SOME(0.00)[];
	 RCVD_VIA_SMTP_AUTH(0.00)[];
	 TO_DN_SOME(0.00)[];
	 R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c];
	 MV_CASE(0.50)[];
	 HAS_ATTACHMENT(0.00)[];
	 RCPT_COUNT_FIVE(0.00)[6];
	 RCVD_COUNT_THREE(0.00)[3];
	 DKIM_TRACE(0.00)[netflix.com:+];
	 DMARC_POLICY_ALLOW(-0.50)[netflix.com,reject];
	 FROM_EQ_ENVFROM(0.00)[];
	 MIME_TRACE(0.00)[0:+,1:+,2:~];
	 ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US];
	 MID_RHS_MATCH_FROM(0.00)[];
	 RECEIVED_SPAMHAUS_PBL(0.00)[72.239.139.197:received];
	 ARC_NA(0.00)[];
	 NEURAL_HAM_MEDIUM(-1.00)[-1.000];
	 R_DKIM_ALLOW(-0.20)[netflix.com:s=google];
	 FREEFALL_USER(0.00)[rrs];
	 FROM_HAS_DN(0.00)[];
	 SIGNED_SMIME(-2.00)[];
	 NEURAL_SPAM_SHORT(1.00)[1.000];
	 NEURAL_HAM_LONG(-1.00)[-1.000];
	 MIME_GOOD(-0.20)[multipart/signed,text/plain];
	 PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org];
	 TO_MATCH_ENVRCPT_SOME(0.00)[];
	 WHITELIST_DMARC(-7.00)[netflix.com:D:+];
	 RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::62b:from];
	 WHITELIST_SPF_DKIM(-3.00)[netflix.com:d:+,netflix.com:s:+];
	 HAS_GOOGLE_REDIR(0.01)[];
	 RCVD_TLS_ALL(0.00)[]
Reply-To: rrs@netflix.com
From: Randall Stewart via dev-commits-src-all
	<dev-commits-src-all@freebsd.org>
X-Original-From: Randall Stewart <rrs@netflix.com>
X-ThisMailContainsUnwantedMimeParts: N


--Apple-Mail=_3E97E46A-D01D-461F-9B18-231FA993F6C0
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8

John:

This is fine to do, but I want to make sure everyone understands that
I was specifically asked to make compile fail on the transport call
if CC_XXXX or CC_DEFAULT was not defined. Its not how I had the code
originally but it was requested specifically.

I am fine with all the changes aka it showing up in DEFAULT that=E2=80=99s=
 a
good solution.=20

And I think Warner=E2=80=99s patch with an ifndef in cc.c works =
perfectly that
way if you are say netapp and don=E2=80=99t use newreno you can do a

nooptions CC_NEWRENO
options CC_CUBIC
options CC_DEFAULT=3D\=E2=80=9Dcubic\=E2=80=9D

And it all just works for you ;)

R

> On Nov 12, 2021, at 12:01 PM, John Baldwin <jhb@freebsd.org> wrote:
>=20
> On 11/12/21 8:19 AM, Jessica Clarke wrote:
>> On 11 Nov 2021, at 11:31, Randall Stewart <rrs@FreeBSD.org> wrote:
>>>=20
>>> The branch main has been updated by rrs:
>>>=20
>>> URL: =
https://www.google.com/url?q=3Dhttps://cgit.FreeBSD.org/src/commit/?id%3Db=
8d60729deefa0bd13e6a395fcab4928e6e10445&source=3Dgmail-imap&ust=3D16373413=
08000000&usg=3DAOvVaw0ox_w6BYoj1_WxabaN9-lG
>>>=20
>>> commit b8d60729deefa0bd13e6a395fcab4928e6e10445
>>> Author:     Randall Stewart <rrs@FreeBSD.org>
>>> AuthorDate: 2021-11-11 11:28:18 +0000
>>> Commit:     Randall Stewart <rrs@FreeBSD.org>
>>> CommitDate: 2021-11-11 11:28:18 +0000
>>>=20
>>>    tcp: Congestion control cleanup.
>>>=20
>>>    NOTE: HEADS UP read the note below if your kernel config is not =
including GENERIC!!
>>>=20
>>>    This patch does a bit of cleanup on TCP congestion control =
modules. There were some rather
>>>    interesting surprises that one could get i.e. where you use a =
socket option to change
>>>    from one CC (say cc_cubic) to another CC (say cc_vegas) and you =
could in theory get
>>>    a memory failure and end up on cc_newreno. This is not what one =
would expect. The
>>>    new code fixes this by requiring a cc_data_sz() function so we =
can malloc with M_WAITOK
>>>    and pass in to the init function preallocated memory. The CC init =
is expected in this
>>>    case *not* to fail but if it does and a module does break the
>>>    "no fail with memory given" contract we do fall back to the CC =
that was in place at the time.
>>>=20
>>>    This also fixes up a set of common newreno utilities that can be =
shared amongst other
>>>    CC modules instead of the other CC modules reaching into newreno =
and executing
>>>    what they think is a "common and understood" function. Lets put =
these functions in
>>>    cc.c and that way we have a common place that is easily findable =
by future developers or
>>>    bug fixers. This also allows newreno to evolve and grow support =
for its features i.e. ABE
>>>    and HYSTART++ without having to dance through hoops for other CC =
modules, instead
>>>    both newreno and the other modules just call into the common =
functions if they desire
>>>    that behavior or roll there own if that makes more sense.
>>>=20
>>>    Note: This commit changes the kernel configuration!! If you are =
not using GENERIC in
>>>    some form you must add a CC module option (one of CC_NEWRENO, =
CC_VEGAS, CC_CUBIC,
>>>    CC_CDG, CC_CHD, CC_DCTCP, CC_HTCP, CC_HD). You can have more than =
one defined
>>>    as well if you desire. Note that if you create a kernel =
configuration that does not
>>>    define a congestion control module and includes INET or INET6 the =
kernel compile will
>>>    break. Also you need to define a default, generic adds 'options =
CC_DEFAULT=3D\"newreno\"
>>>    but you can specify any string that represents the name of the CC =
module (same names
>>>    that show up in the CC module list under net.inet.tcp.cc). If you =
fail to add the
>>>    options CC_DEFAULT in your kernel configuration the kernel build =
will also break.
>> Not doing so breaks tinderbox, as well as configs not hooks up to
>> tinderbox. I don=E2=80=99t think this is acceptable.
>=20
> We discussed this a bit on IRC, but I think in this case the default =
CC_*
> options belong in DEFAULTS like the default GEOM_PART_* options rather
> than in GENERIC.  (Though we mostly avoid changing DEFAULTS, this is =
one
> of the rare cases when I think it makes sense.)  Handling the default =
for
> CC_DEFAULT does not work in DEFAULTS since you can't later override =
it,
> but that could be handled by simply having the default for CC_DEFAULT =
live
> in the code itself under an #ifndef instead.
>=20
> I think Warner is already testing a patchset to make this change.
>=20
> --=20
> John Baldwin

------
Randall Stewart
rrs@netflix.com




--Apple-Mail=_3E97E46A-D01D-461F-9B18-231FA993F6C0
Content-Disposition: attachment;
	filename=smime.p7s
Content-Type: application/pkcs7-signature;
	name=smime.p7s
Content-Transfer-Encoding: base64

MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0BBwEAAKCCAzYw
ggMyMIICGqADAgECAgqxywKqrHPB2ybTMA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