From nobody Wed Sep 07 09:54:49 2022 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 4MMyKV3Txjz4c4bw; Wed, 7 Sep 2022 09:54:54 +0000 (UTC) (envelope-from bz@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 4MMyKV2jjkz4Kq5; Wed, 7 Sep 2022 09:54:54 +0000 (UTC) (envelope-from bz@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662544494; 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: in-reply-to:in-reply-to:references:references; bh=OW5NDBKxBxalpruYvk9cUf3/ZAsrntOJ5AU1o5F/Y6s=; b=EJU15FxgsVxeEdU92spqrKyaffikwThIRjVU6YQSs8mfNpIh7qBY7pr1LKnugGBbwUI2Am TzY1nXyxLNlKxBCuCJVLOk703kOQcNXPp+z22CicV5mVqYinzCLh2kko5/276Iz1JC9Lke 2hHKiV75vnPRZDe920V0IibaLryQSftIKXWlzkz8I6nFQLd3xquu6KYxE8oRJIOACoTWna vTouHx8JuppCHo5j8IP4x2bW+3zAhwBSPWGurfS7etyiyeYwaFc/DA45gAohhNnSuMR27O ug528/WT+ALAahfzQ6ajvKaiE1bEwVX4jJJc/QJMyKdeHwMhBjROrwQoNGwzgg== Received: from mx1.sbone.de (cross.sbone.de [195.201.62.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) (Authenticated sender: bz/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4MMyKV0wHKz13g2; Wed, 7 Sep 2022 09:54:54 +0000 (UTC) (envelope-from bz@freebsd.org) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 77F728D4A215; Wed, 7 Sep 2022 09:54:52 +0000 (UTC) Received: from content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (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) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 90E265C3A831; Wed, 7 Sep 2022 09:54:51 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) by content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (amavisd-new, port 10024) with ESMTP id ghUXxz0mKVlY; Wed, 7 Sep 2022 09:54:50 +0000 (UTC) Received: from strong-iwl0.sbone.de (strong-iwl0.sbone.de [IPv6:fde9:577b:c1a9:4902:b66b:fcff:fef3:e3d2]) (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) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 3FC925C3A82F; Wed, 7 Sep 2022 09:54:50 +0000 (UTC) Date: Wed, 7 Sep 2022 09:54:49 +0000 (UTC) From: "Bjoern A. Zeeb" To: Gleb Smirnoff cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: e72c522858cb - main - divert(4): make it compilable and working without INET In-Reply-To: Message-ID: <6r5o5nqn-9srp-79qr-n33-q4992936q51q@serrofq.bet> References: <202208302249.27UMnSwI022109@gitrepo.freebsd.org> <6q6n8553-2143-n24p-4816-406549997s@mnoonqbm.arg> <15on1poo-pnpq-3pos-qs7s-673pp1q0s83@serrofq.bet> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 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; format=flowed ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662544494; 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: in-reply-to:in-reply-to:references:references; bh=OW5NDBKxBxalpruYvk9cUf3/ZAsrntOJ5AU1o5F/Y6s=; b=qV7+3cRnHOAYe0hoH9yYDYugT2RBcQGVjFqp6N7NO/LPLDKai5wRYh7C8l/d0nBUSq3raF 9io9WH4htZbqOJR3XcosmxiotQyLknYDWXvkevv11xkwYGmRMBbFq44MZr/gnR/+1TTFaq 75M+kQ25XARM39rIedCA54BgBDdBG6fvLLMxl3R2nc/yrl1LTFqL8en4oytrpwOMPUWfeh MiMEkJvBQNJNuwlhukLT+i+dP32AXh1JHZi7bN8faXVFf9uL60KeWJXKWECmmvyWehaeHe eNt6FY+eXnCjE3pR6BLGACDRMizHNccim8J3V1EusRejqH+1N1seUbPzUqR7lQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1662544494; a=rsa-sha256; cv=none; b=yaDMgfqVH1yEo8g7EiCyBMsAhxXUfErqFUPPOmbJx+Y78KxcrJMWNBEKKD/1RQafZZtjoC gwNJNyjUVJeMi8ZdeA3FWzhIrUTrYxU0ThoQDsh+gY0st3UrfqgBSvJZw0NVpPg86VeK8h SGbqWDbNEYwgrkuQd12BrS+MP+pSL1/QkP4iBO+Sv5SK4dbqqgC0d9GZTpqF9xP1C1bcJE Twi9+gdgjxeXo4dCc15yTnSozQx099n7B2aHIjmXvmSlH2QiW8Ed1lJD4P1htLeAeGWlDn BiLX1PCR8kuO37to6lAMT6r0CiSXI1Dtit+DdNlIPYoSqdwkFjnfHweJduvnSQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N On Tue, 6 Sep 2022, Gleb Smirnoff wrote: > On Sun, Sep 04, 2022 at 06:39:53AM +0000, Bjoern A. Zeeb wrote: > B> > B> > Author: Gleb Smirnoff > B> > B> > AuthorDate: 2022-08-30 22:09:21 +0000 > B> > B> > Commit: Gleb Smirnoff > B> > B> > CommitDate: 2022-08-30 22:09:21 +0000 > B> > B> > > B> > B> > divert(4): make it compilable and working without INET > B> > B> > > B> > B> > Differential revision: https://reviews.freebsd.org/D36383 > B> > B> > B> > B> Well, almost at least.... > B> > > B> > I wonder why LINT-NOINET builds without this?? > B> > B> I wondered the same last night.. I would be good to find out? > > Ok, I think that assumption that sysctl parts of divert require > INET were just wrong, that's why LINT-NOINET builds. Not entirely. It's because sys/netinet/in_proto.c uncodonitionally currently provides _net_inet for the sysctl. The reason for that is that a lot of AF independent sysctls were initially put under inet but are equally used for inet6 or neither in the network stack. You will need at least #if defined(INET6) || defined(INET) around the sysctls in divert.c then. A LINT-NOIP kernel will complain about the missing symbol if we keep compiling divert without INET or INET6 in the kernel: 1 make[4]: "/tank/users/bz/git/FreeBSD/freebsd-src/Makefile.inc1" line 334: SYSTEM_LINKER: Determined that LD=ld matches the source tree. Not bootstrapping a cross-linker. 2 3 -------------------------------------------------------------- 4 >>> Kernel build for LINT-NOIP started on Mon Sep 5 20:26:47 UTC 2022 5 -------------------------------------------------------------- 6 ===> LINT-NOIP 7 0.09 real 0.03 user 0.06 sys 8 9 -------------------------------------------------------------- 10 >>> stage 2.3: build tools 11 -------------------------------------------------------------- 12 0.12 real 0.03 user 0.09 sys 13 -------------------------------------------------------------- 14 >>> stage 3.1: building everything 15 -------------------------------------------------------------- 16 linking kernel 17 ld: error: undefined symbol: ip_divert_ptr 18 >>> referenced by ip_divert.c 19 >>> ip_divert.o:(div_modevent) 20 >>> referenced by ip_divert.c 21 >>> ip_divert.o:(div_modevent) 22 23 ld: error: undefined symbol: sctp_delayed_cksum 24 >>> referenced by ip_divert.c 25 >>> ip_divert.o:(divert_packet) 26 27 ld: error: undefined symbol: sysctl___net_inet 28 >>> referenced by ip_divert.c 29 >>> ip_divert.o:(sysctl___net_inet_divert) 30 --- kernel --- 31 *** [kernel] Error code 1 32 33 make[5]: stopped in /tank/users/bz/obj/tank/users/bz/git/FreeBSD/freebsd-src/amd64.amd64/sys/LINT-NOIP 34 1 error 35 36 make[5]: stopped in /tank/users/bz/obj/tank/users/bz/git/FreeBSD/freebsd-src/amd64.amd64/sys/LINT-NOIP 37 1224.73 real 2829.68 user 196.38 sys 38 --- buildkernel --- 39 40 make[4]: stopped in /tank/users/bz/git/FreeBSD/freebsd-src 41 --- buildkernel --- 42 43 make[3]: stopped in /tank/users/bz/git/FreeBSD/freebsd-src -- Bjoern A. Zeeb r15:7