From nobody Fri Jan 13 00:01:14 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 4NtM5S1VXzz2sZcQ; Fri, 13 Jan 2023 00:01:16 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NtM5S10F4z3L0S; Fri, 13 Jan 2023 00:01:16 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673568076; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wMKGZhGJTIddsUQqV54fioabdE5vFhIn3OrmgWG71xc=; b=x7WEbmusZia+fiMFdg5PW8KWbqNb730DvMWnquk/zVOem5e9oTaZw+38Sv035Elw9vHHph iF1O0npCJwCSDeNMN27UQkNkr7p1WnSjnEuWwEfzLxC2KDKm2FltGBPnBNeYTP3KtXToZ5 y7iBeV277l5DDciyME4jYMPLL4enoeJfQxDLOxSJu+qDxqSb3fkkCXHHDUnQHhq/CrLdln Izok+NEzmR9Qjqe6dKjCm6T47trErqWz4mVHI3APo/2Yp2Dx4dHZpeXupLtJ+U6BFrdUdY SThQi529u3HU2AdFq7Ekbd82IKuoD7Mx9kKWuMUYc24rNoom5E7IAqBMqkKBow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673568076; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wMKGZhGJTIddsUQqV54fioabdE5vFhIn3OrmgWG71xc=; b=Jd73dk9psmP0jNBf196rktrzsVX0JvEdFKzyPNf7SJX1Ade03+4oFL6xCTvPbCb1x02xIP A/+6QoIo8mt+DE5d4e9wxsbwqDObyKte2QVuH+uJuyV12X7Ll7A/nBEFGT/EGlFclGw17k BJbn+FsRTiHJ2weTzAhlGAJVc6u2eU2yp3LznMMNRz9+7EdzkFXb1mkGuwlZt0r8WeBNEj vCs0rvelm2K4CrZshAiBRG6q9Ana1kK2EbW3N4KCRdEEiy+WnhLu+Jyyx7384Jw2yYqneG OrfbtmTQqrAc3W5c9m7mZfjKzhrL0QrfIv20b8+dyR4BVoA1EII2NWXPRzaRbA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1673568076; a=rsa-sha256; cv=none; b=MabiA3+J35Tp0Rp0JmYEzuB+XJDvUpI0dBslFE/2sLC+6upT+VPyAc2sbiX6Jaa8/xTzb8 DUnNdfoCG9LVErCN6mFifjR07eYwRulkybfhOQ/rb0flbGT012X4kec70SYDeqnZqX1GwQ 0idtp3Visad9/ilNmAWysjrcjaHhQrtjksOOGQ3m0eX28sK3uqwaRU3tJy5HrjCNs5lH+t MppEjmxeDJq6/+MBEyW5kNx4N9jzA78jewlZQl5p2/tn45ihvWBDR3KmfT+Wt+NBn27yS6 S1oNvuCo5XfxNXPPXBHxIvXp876caCZhabir/w6JPDvvjIiD/AWKCoVbdXWvXg== Received: from ralga-linux (dsl-74-83-251-217.fuse.net [74.83.251.217]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhibbits) by smtp.freebsd.org (Postfix) with ESMTPSA id 4NtM5R5kt9z153k; Fri, 13 Jan 2023 00:01:15 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Date: Thu, 12 Jan 2023 19:01:14 -0500 From: Justin Hibbits To: Gleb Smirnoff 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: <20230112190114.238a3662@ralga-linux> In-Reply-To: References: <202301121620.30CGKtpM047283@gitrepo.freebsd.org> X-Mailer: Claws Mail 4.1.0 (GTK 3.24.34; powerpc64le-unknown-linux-gnu) 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-Transfer-Encoding: 7bit X-ThisMailContainsUnwantedMimeParts: N Hi Gleb, On Thu, 12 Jan 2023 15:37:43 -0800 Gleb Smirnoff wrote: > 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: > J> 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 > J> net/if_var.h being implementation details for the netstack. This > J> is the next step in 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 > I'll revert this, but I think we should discuss further how to approach this, since on our call last week I got the impression that the DrvAPI does belong in if.h, with if_var.h being exclusively used by netstack. - Justin