Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Jan 2016 10:18:16 -0800
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        Lawrence Stewart <lstewart@freebsd.org>
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>
In-Reply-To: <56A1D6B2.1010406@freebsd.org>
References:  <201601212234.u0LMYpKT009948@repo.freebsd.org> <56A1D6B2.1010406@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160122181816.GB1004>