From nobody Fri Nov 12 16:19:04 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 70558185A46B for ; Fri, 12 Nov 2021 16:19:13 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (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 4HrP0w2hW7z3K9t for ; Fri, 12 Nov 2021 16:19:12 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: by mail-wr1-f42.google.com with SMTP id r8so16358504wra.7 for ; Fri, 12 Nov 2021 08:19:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=Ng4Ue0STk10t74mE5LP3ydSuBg6nouxJSGt0TgAw/p0=; b=XdVV9N0rHjK0HcnU0BPOwPlcxfrXLzw95j/Y80NlB1UBVn3PY+5+6P78GWfggXBgqL ZLTK3rXxFa5tm0E6F1NmUbc7KhxQPPeJEk9zUqoAed24Yf1otnBu5aJSztEaOvZyeKot qGeUvc9vqHOAZpMlstlrgaUduAu0FvhbKAJrt/zSIBeQ0OWA3Y0tYkObx9nycsDzpM9M v154esNcZPfd0SroX5Bi6VTK5R5OCxbUY/sH+KWqXnX/1FD6LUjn38JPj1PWQT8vAsRJ NT3FNi0yZ1XAKhgT/V+oGTfwTBlzGaIyBF4tCjq9OpqoU86zhs5gPLp3ivSWH1BzcJxF oZQw== X-Gm-Message-State: AOAM531Uy3qZoByrVbwCckMARIXi9vO2A5SWQCBGiQOFIASwr1AoXiMZ WMghHL5CDQ43wsQCbqMh6ysM5ch0tex3UQ== X-Google-Smtp-Source: ABdhPJyrs2wArWM9GxlpZDKUy0HqoSWHjugLTzCVVTwuw0tp6lfvlWgjQFLxfFtcAnhdc4JWlH0atg== X-Received: by 2002:a5d:6488:: with SMTP id o8mr19202205wri.348.1636733945603; Fri, 12 Nov 2021 08:19:05 -0800 (PST) Received: from smtpclient.apple (global-5-141.nat-2.net.cam.ac.uk. [131.111.5.141]) by smtp.gmail.com with ESMTPSA id y7sm6001387wrw.55.2021.11.12.08.19.04 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Nov 2021 08:19:05 -0800 (PST) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: 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. From: Jessica Clarke In-Reply-To: <202111111131.1ABBVH6s017371@gitrepo.freebsd.org> Date: Fri, 12 Nov 2021 16:19:04 +0000 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <202111111131.1ABBVH6s017371@gitrepo.freebsd.org> To: Randall Stewart X-Mailer: Apple Mail (2.3654.120.0.1.13) X-Rspamd-Queue-Id: 4HrP0w2hW7z3K9t X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of jrtc27@jrtc27.com designates 209.85.221.42 as permitted sender) smtp.mailfrom=jrtc27@jrtc27.com X-Spamd-Result: default: False [-2.41 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; RCVD_COUNT_THREE(0.00)[3]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FORGED_SENDER(0.30)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; MID_RHS_MATCH_FROM(0.00)[]; FROM_NEQ_ENVFROM(0.00)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.91)[-0.912]; FREEFALL_USER(0.00)[jrtc27]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_HAM_LONG(-1.00)[-0.999]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.221.42:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.221.42:from]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N On 11 Nov 2021, at 11:31, Randall Stewart wrote: >=20 > The branch main has been updated by rrs: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Db8d60729deefa0bd13e6a395fcab4928= e6e10445 >=20 > commit b8d60729deefa0bd13e6a395fcab4928e6e10445 > Author: Randall Stewart > AuthorDate: 2021-11-11 11:28:18 +0000 > Commit: Randall Stewart > 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. Jess