From nobody Thu Jan 12 23:37: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 4NtLqr2xNpz2sYYS; Thu, 12 Jan 2023 23:49:28 +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 4NtLqq6xwXz3JqP; Thu, 12 Jan 2023 23:49:27 +0000 (UTC) (envelope-from glebius@freebsd.org) Authentication-Results: mx1.freebsd.org; none Received: by glebi.us (Postfix, from userid 1000) id 633541DBC; Thu, 12 Jan 2023 15:37:44 -0800 (PST) Date: Thu, 12 Jan 2023 15:37: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> 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: <202301121620.30CGKtpM047283@gitrepo.freebsd.org> X-Rspamd-Queue-Id: 4NtLqq6xwXz3JqP 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 04:20:55PM +0000, Justin Hibbits wrote: J> The branch main has been updated by jhibbits: J> J> URL: https://cgit.FreeBSD.org/src/commit/?id=fe33e0ab83d1fbc3c5cd4a2591ba0036e47b1fec J> J> commit fe33e0ab83d1fbc3c5cd4a2591ba0036e47b1fec J> Author: Justin Hibbits J> AuthorDate: 2023-01-11 16:56:39 +0000 J> Commit: Justin Hibbits J> CommitDate: 2023-01-12 16:25:41 +0000 J> J> ifnet/API: Move the IfAPI from if_var.h to if.h J> J> Summary: J> The "public" KPI for ifnet belongs in net/if.h, with net/if_var.h being J> implementation details for the netstack. This is the next step in J> enforcing that separation. J> J> Reviewed by: melifaro J> Sponsored by: Juniper Networks, Inc. J> Differential Revision: https://reviews.freebsd.org/D38030 I'm very sorry for not reviewing the D38030 in time. I didn't have electricity for a few days in a raw. I agree that DrvAPI needs to be isolated from stack visible header file, but I can't agree that if.h needs to be polluted with it. First of all net/if.h is a SuS/POSIX mandated header[1], with a very limited set of features announced and perfectionist-wise we definitely shouldn't pollute it with our kernel driver API. Second, it of course has lots of stuff beyond POSIX, but it still was 99% userland visible (before this change) and ideally it should be a 100% userland header. I think this change as is needs to be reverted. And to properly isolate DrvAPI we have two options: 1) Leave it in if_var.h and start a new header where we will move stuff that should stay private from drivers. Drivers keep using if_var.h. 2) Create a new header with DrvAPI. Drivers to stop useing if_var.h and switch to new header file. I personally prefer 1), as it follows what we have started to do long time ago, see c29e1ad9304, c3322cb91ca, 76039bc84fa, eedc7fd9e87. [1] https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/net_if.h.html -- Gleb Smirnoff