From owner-svn-src-all@freebsd.org Wed Jan 27 06:12:24 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 678F1A6F4A7; Wed, 27 Jan 2016 06:12:24 +0000 (UTC) (envelope-from lstewart@freebsd.org) Received: from lauren.room52.net (lauren.room52.net [210.50.193.198]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2DAAE869; Wed, 27 Jan 2016 06:12:23 +0000 (UTC) (envelope-from lstewart@freebsd.org) Received: from lgwl-lstewart2.corp.netflix.com (c110-22-60-167.eburwd6.vic.optusnet.com.au [110.22.60.167]) by lauren.room52.net (Postfix) with ESMTPSA id F0EAD7E820; Wed, 27 Jan 2016 17:12:20 +1100 (EST) Subject: Re: svn commit: r294535 - in head/sys/netinet: . cc tcp_stacks To: Gleb Smirnoff References: <201601212234.u0LMYpKT009948@repo.freebsd.org> <56A1D6B2.1010406@freebsd.org> <20160122181816.GB1004@FreeBSD.org> <56A31B78.2090100@freebsd.org> <20160124080720.GE1004@FreeBSD.org> Cc: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org From: Lawrence Stewart X-Enigmail-Draft-Status: N1110 Message-ID: <56A85FA3.50403@freebsd.org> Date: Wed, 27 Jan 2016 17:11:47 +1100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20160124080720.GE1004@FreeBSD.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.4 required=5.0 tests=DNS_FROM_AHBL_RHSBL, UNPARSEABLE_RELAY autolearn=no version=3.3.2 X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lauren.room52.net 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: Wed, 27 Jan 2016 06:12:24 -0000 On 01/24/16 19:07, Gleb Smirnoff wrote: > Lawrence, > > On Sat, Jan 23, 2016 at 05:19:36PM +1100, Lawrence Stewart wrote: > L> > The problem is that cc.h (or tcp_cc.h) is already depening on many > L> > TCP types. So, the structures defined inside are not agnostic, including > L> > tcp headers before cc.h is required. > L> > L> Not in any significant way that tightly couples the API to TCP from > L> consumers' perspective. > L> > L> > The old cc.h used to include tcp.h implicitly, which is a bad style. > L> > > L> > Since many developers sorted netinet/* includes in a .c file using > L> > sort(1), that lead to cc.h always come before actual tcp includes, > L> > hiding the real requirement for tcp.h in a .c file. > L> > L> To provide some more context, I considered that choice to be a lesser > L> evil at the time. Linux had set the defacto standard macro naming and > L> location so even though I would have put the CC related defines in cc.h > L> given the choice, I wanted third-party software which checked for > L> modular CC the Linux way to work on FreeBSD. The alphabetical ordering > L> of includes is what prompted me to include tcp.h in cc.h so that cc.h > L> could happily sit at the top of the list. I probably could have just > L> moved cc.h to the cc subdir, in which case it would always come > L> logically after the TCP includes as - perhaps that's > L> the right solution. > > Well, if the intent was to provide some sort of compatibility with Linux, > then my rename is even more valid! Look what left in the cc.h in the > Netflix source (which is kinda forward of FreeBSD): almost the whole > file is under _KERNEL. Only the tcp.h pollution left for userland. > > If Linux has cc.h and we want to put same definitions in cc.h, then > we should start new cc.h and keep this one renamed. Because if we > provided that one, we won't provide any compatibility, but would > just pollute with tcp.h. They do not have cc.h, they stuffed things into tcp.h. When I say I was trying to keep compat with Linux, I meant that I wanted to leave TCP_CA_NAME_MAX in tcp.h rather than move it to cc.h where it logically belongs and is required. This has no bearing on the naming of our cc.h file, but is the reason why I included tcp.h in cc.h, bad as that may be. > I am fine with netinet/cc/cc.h. If you agree I can run the rename. I think this is the right option. Please go ahead and move tcp_cc.h to netinet/cc/cc.h and update ifdef guard, src includes and man page accordingly. Cheers, Lawrence