From owner-svn-src-all@freebsd.org Fri Jan 22 18:18:18 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 095E5A8CEE5; Fri, 22 Jan 2016 18:18:18 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id E62CC1351; Fri, 22 Jan 2016 18:18:17 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id u0MIIGaR001354 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 22 Jan 2016 10:18:16 -0800 (PST) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id u0MIIGoW001353; Fri, 22 Jan 2016 10:18:16 -0800 (PST) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 22 Jan 2016 10:18:16 -0800 From: Gleb Smirnoff To: Lawrence Stewart Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r294535 - in head/sys/netinet: . cc tcp_stacks Message-ID: <20160122181816.GB1004@FreeBSD.org> References: <201601212234.u0LMYpKT009948@repo.freebsd.org> <56A1D6B2.1010406@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56A1D6B2.1010406@freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2016 18:18:18 -0000 On Fri, Jan 22, 2016 at 06:13:54PM +1100, Lawrence Stewart wrote: L> On 01/22/16 09:34, Gleb Smirnoff wrote: L> > Author: glebius L> > Date: Thu Jan 21 22:34:51 2016 L> > New Revision: 294535 L> > URL: https://svnweb.freebsd.org/changeset/base/294535 L> > L> > Log: L> > - Rename cc.h to more meaningful tcp_cc.h. L> L> As a bit of historical context, the naming was intentionally protocol L> agnostic because it was originally hoped that the CC framework could be L> shared between multiple CC aware transports, and the design went to some L> lengths to accommodate that possibility (e.g. the ccv_container union in L> struct cc_var). SCTP was the obvious potential in tree consumer at the L> time, and other protocols like DCCP were considered as well. L> L> This hasn't come about to date, but I'm not sure what value is obtained L> from your rename change unless we decide to completely give up on shared L> CC and if we do that, this change doesn't go far enough and we can L> further simplify the framework to make it entirely TCP specific e.g. we L> should probably do away with struct cc_var. L> L> I'd argue in favour of reverting the rename and if you're gung ho about L> making the framework TCP specific, we can start a public discussion L> about what that should look like. The problem is that cc.h (or tcp_cc.h) is already depening on many TCP types. So, the structures defined inside are not agnostic, including tcp headers before cc.h is required. The old cc.h used to include tcp.h implicitly, which is a bad style. Since many developers sorted netinet/* includes in a .c file using sort(1), that lead to cc.h always come before actual tcp includes, hiding the real requirement for tcp.h in a .c file. P.S. Speaking of agnostic stuff. My humble opinion, that in the network stack through the whole BSD history agnosticism never yield in virtue. Examples: routing code can be used for IPv4, IPv6, Atalk and IPX. Result is that Atalk and IPX are history, but our routing table uses 8x more memory for IPv4 and performs miserably. Another example is the same sockbuf used for all types of sockets, including stream, datagram, local and network, which first yielded in quite complex code for a quite trivial task, and later then, when SCTP came in failed to be agnostic enough to fit into SCTP. -- Totus tuus, Glebius.