From nobody Fri Jan 13 00:55:43 2023 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 4NtNJJ3F30z2shjc; Fri, 13 Jan 2023 00:55:44 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from glebi.us (glebi.us [162.251.186.162]) by mx1.freebsd.org (Postfix) with ESMTP id 4NtNJJ2QTrz3jNw; Fri, 13 Jan 2023 00:55:44 +0000 (UTC) (envelope-from glebius@freebsd.org) Authentication-Results: mx1.freebsd.org; none Received: by glebi.us (Postfix, from userid 1000) id 265461EDC; Thu, 12 Jan 2023 16:55:43 -0800 (PST) Date: Thu, 12 Jan 2023 16:55:43 -0800 From: Gleb Smirnoff To: Justin Hibbits Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: fe33e0ab83d1 - main - ifnet/API: Move the IfAPI from if_var.h to if.h Message-ID: References: <202301121620.30CGKtpM047283@gitrepo.freebsd.org> <20230112190114.238a3662@ralga-linux> 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 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230112190114.238a3662@ralga-linux> X-Rspamd-Queue-Id: 4NtNJJ2QTrz3jNw X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:27348, ipnet:162.251.186.0/24, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N Justin, On Thu, Jan 12, 2023 at 07:01:14PM -0500, Justin Hibbits wrote: J> > 1) Leave it in if_var.h and start a new header where we will move J> > stuff that should stay private from drivers. Drivers keep using J> > if_var.h. 2) Create a new header with DrvAPI. Drivers to stop useing J> > if_var.h and switch to new header file. J> > J> > I personally prefer 1), as it follows what we have started to do long J> > time ago, see c29e1ad9304, c3322cb91ca, 76039bc84fa, eedc7fd9e87. J> > J> > [1] J> > https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/net_if.h.html J> > J> J> I'll revert this, but I think we should discuss further how to approach J> this, since on our call last week I got the impression that the DrvAPI J> does belong in if.h, with if_var.h being exclusively used by netstack. My fail to properly articulate that. :( Sorry Do you agree with this plan: 1) DrvAPI stays in if_var.h. Today all drivers already include it. 2) struct ifnet (and possibly later more stuff) goes to if_private.h. Alternative names: if_priv.h, if_kern.h, anything else? This file is not supposed to be used by drivers. 3) if_var.h _temporarily_ includes if_private.h. Removing this include and trying to compile we can very quickly check how close are we to final removal. 4) Eventually if_var.h stops including if_private.h. -- Gleb Smirnoff