From nobody Wed Mar 15 20:05:47 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 4PcLxH5mMTz3xjBq for ; Wed, 15 Mar 2023 20:05:55 +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 4PcLxG0fXMz3qjZ; Wed, 15 Mar 2023 20:05:54 +0000 (UTC) (envelope-from glebius@freebsd.org) Authentication-Results: mx1.freebsd.org; dkim=none; spf=softfail (mx1.freebsd.org: 162.251.186.162 is neither permitted nor denied by domain of glebius@freebsd.org) smtp.mailfrom=glebius@freebsd.org; dmarc=none Received: by glebi.us (Postfix, from userid 1000) id 1E5EF2DBB9; Wed, 15 Mar 2023 13:05:47 -0700 (PDT) Date: Wed, 15 Mar 2023 13:05:47 -0700 From: Gleb Smirnoff To: Alexander Chernikov Cc: Kristof Provost , "dev-commits-src-main@freebsd.org" Subject: Re: git: 7e5bf68495cc - main - netlink: add netlink support Message-ID: References: <202210011419.291EJ3aa000309@gitrepo.freebsd.org> <3D3095AE-60CC-4CCD-8C8A-A6E53EEB6A8A@FreeBSD.org> <2F410705-A141-49B4-8395-3B39D3EF1C3E@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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2F410705-A141-49B4-8395-3B39D3EF1C3E@freebsd.org> X-Spamd-Result: default: False [0.50 / 15.00]; VIOLATED_DIRECT_SPF(3.50)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.998]; MIME_GOOD(-0.10)[text/plain]; RCVD_NO_TLS_LAST(0.10)[]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; ASN(0.00)[asn:27348, ipnet:162.251.186.0/24, country:US]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all]; DMARC_NA(0.00)[freebsd.org]; FREEFALL_USER(0.00)[glebius]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Rspamd-Queue-Id: 4PcLxG0fXMz3qjZ X-Spamd-Bar: / X-ThisMailContainsUnwantedMimeParts: N On Thu, Mar 09, 2023 at 05:45:50PM +0000, Alexander Chernikov wrote: A> > So, really fun thing here, we also have #define NETLINK_GENERIC 0 in sys/net/if_mib.h. (And that’s exposed to userspace, and used there, so we can’t just change that.) A> > A> Wow. Thanks for pointing it out - it wasn’t defined in the kernel headers so I missed it. A> That looks like something FreeBSD-specific. Both NetBSD / OpenBSD doesn’t have it. A> It seem to provide: A> - iteration over the list of the interfaces A> - some basic interface traffic statistics A> - copy of the ’struct ifdata’ (basic interface properties and some interface traffic statistics) A> - Link-specific data (IFDATA_LINKSPECIFIC), not used by anything in base A> - Original “driver name” (IFDATA_DRIVERNAME) A> A> Most of this is already provided by either getifaddr(3) or netlink or even rtsock. I’m thinking of deprecating it in mid-term in favour of Netlink. A> A> I see the following options: A> 1) Remove usage of if_mib.h from ifconfig A> A> 2) Add compat layer: A> *) Rename NETLINK_GENERIC to NET_LINK_GENERIC (which is the right name de-facto) A> *) Add conditional define for NETLINK_GENERIC to if_mib and set it to 16 A> *) Define another tree in if_mib.c under net.link .generic16 with value 16 Let's request exp-run with NETLINK_GENERIC removed or renamed to NET_LINK_GENERIC. Very likely deprecating this name would go fairly easy. -- Gleb Smirnoff