From nobody Wed Feb 08 10:11:16 2023 X-Original-To: freebsd-current@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 4PBbPY4hXTz3n00Q for ; Wed, 8 Feb 2023 10:11:29 +0000 (UTC) (envelope-from zlei@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 4PBbPY42mGz3x7W; Wed, 8 Feb 2023 10:11:29 +0000 (UTC) (envelope-from zlei@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675851089; 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=ocvYm6fsIG5G/+a4wZW7bUPCupLpnSSRgw3B0C/evpU=; b=VEd5dNCGfZFHVOVqEzBVJtFkSLZ5L6tcI/6nzuWU9AucFKazWSWywMMfb/MXNPkvbc38Zq KI9u3JSTxTi9BZmYgnGzFM5iB5jmzDV+zChQ0bLUVVO4cPxYSWxX+HD9ys8NX16X5moGn7 9GrwO2Gv9lzNQuNDypQaoSd9AZePh8crGOMR1E+SYP7ywE5HImT/R2coTUtFPKgKcShhyv 1oVYtdiAlbv/ZrXMF4AWeU/ugskxbVZZBBu7z7DQfvbuV8iLHlMYC46HHgREUWp7VYJCgA +QB6b7dP4nJh9hLOTEo/r0Y9q0ytq2+7KcVRe4e1/a/vO0I7rk1oG08DXLwbOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675851089; 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=ocvYm6fsIG5G/+a4wZW7bUPCupLpnSSRgw3B0C/evpU=; b=votvGxBOB5LnELfj72A27bO1lQDQwM34W2df33/6pFE4nwSVKqTZNrfoLfL2KW1YgOt8Dj eBhkwr5ALC8AtK41rIuPylxQh83MonblBWcGzOvrnUaNt26dffHo2AuT30zI1AuAgIHifp 8FURXA8IVjs3FxbxiP5uE+GcEepLb84B9Fw7HqKaVcQETaTTmzK3rgtIUexwoRPvq/dk8r Yl5MJ8y0Nl2oUuqc2O0JReIsjBWgZg8Wgb0Uy+gyHbfn/e2xxA6Ievow/vuvPDcy6ikyms RofRDynBetvLufKYu/FQXZgcdCQpm9A7+mML66stX2JbLSTSMmHdAVXD4M1n5g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675851089; a=rsa-sha256; cv=none; b=iFmsscml5+xmwsQRQPFGH1RdStfNkhWoSEmFVuXjyWs9vhvX5cY0hoVgug+hpuofn24rke 0IQ3M1364wId0eI6mNYuulC8e6E866khnhwzJLxh5cUkll8jaG2pI3ppJY8C9ddqNxHfZS QuwbiaznO3Qf/OvowXxxIYANj5cGNmYsJlJtxt1PtPUFhFft2JUR2aZvX5PodjVNQruTCG 1rUqkLgzZlKSMy3hcNsTE7m2R41X+xSDaRY20o1cmTpo/oX9IejObFak/2LrLG3iDnA/hM 4vCZGZJxhuA2wiCSk+Ye3cfhnHm7mXIeTqD6kquGuR7gmp7c4w5Qum7X9PMfFA== Received: from smtpclient.apple (unknown [IPv6:2001:19f0:6001:9db:98f0:9fe0:3545:10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: zlei/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4PBbPX30ttztJB; Wed, 8 Feb 2023 10:11:28 +0000 (UTC) (envelope-from zlei@FreeBSD.org) From: Zhenlei Huang Message-Id: <71C09FDA-6109-470A-953A-258BC95376DC@FreeBSD.org> Content-Type: multipart/alternative; boundary="Apple-Mail=_A744D2AE-F7A7-49D6-9296-9BE984BE4D83" List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.2\)) Subject: Re: kernel compile fails if device bpf is not enabled Date: Wed, 8 Feb 2023 18:11:16 +0800 In-Reply-To: <20230208073249.4ccb5fb7@ernst.home> Cc: freebsd-current@freebsd.org To: Gary Jennejohn References: <20230207100812.76d206d4@ernst.home> <4FF5CEED-A667-455A-8BFC-960B50E8D93D@FreeBSD.org> <20230208073249.4ccb5fb7@ernst.home> X-Mailer: Apple Mail (2.3696.120.41.1.2) X-ThisMailContainsUnwantedMimeParts: N --Apple-Mail=_A744D2AE-F7A7-49D6-9296-9BE984BE4D83 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Feb 8, 2023, at 2:32 PM, Gary Jennejohn wrote: >=20 > On Wed, 8 Feb 2023 12:49:46 +0800 > Zhenlei Huang > wrote: >=20 > Hi Zhenlei, >=20 >> Thanks for the report! Post the fix to Phabricator = https://reviews.freebsd.org/D38432 = > . >>=20 >> Best regards, >> Zhenlei >>=20 >=20 > Thanks! I see it's been accepted. Fixed in 9df6eeabb379 . >=20 >>> On Feb 7, 2023, at 5:08 PM, Gary Jennejohn wrote: >>>=20 >>> I just saw this error today because I didn't have device bpf enabled = in >>> my kernel configuration file: >>>=20 >>> -------------------------------------------------------------- >>>>>> stage 3.1: building everything >>> -------------------------------------------------------------- >>> linking kernel.full >>> ld: error: undefined symbol: bpf_mtap_if >>>>>> referenced by if.c:4724 (/usr/src/sys/net/if.c:4724) >>>>>> if.o:(if_bpfmtap) >>>>>> referenced by if_tuntap.c:1717 = (/usr/src/sys/net/if_tuntap.c:1717) >>>>>> if_tuntap.o:(tunread) >>>>>> referenced by if_vlan.c:1292 (/usr/src/sys/net/if_vlan.c:1292) >>>>>> if_vlan.o:(vlan_transmit) >>>=20 >>> ld: error: undefined symbol: bpf_mtap2_if >>>>>> referenced by if_gif.c:323 (/usr/src/sys/net/if_gif.c:323) >>>>>> if_gif.o:(gif_transmit) >>>>>> referenced by if_tuntap.c:1816 = (/usr/src/sys/net/if_tuntap.c:1816) >>>>>> if_tuntap.o:(tunwrite) >>> --- kernel.full --- >>> *** [kernel.full] Error code 1 >>>=20 >>> This happens because a dummy bpf_mtap_if() (called a NOP stub in = bpf.c) >>> isn't being defined if bpf is not enabled. >>>=20 >>> -- >>> Gary Jennejohn >>>=20 >=20 > -- > Gary Jennejohn --Apple-Mail=_A744D2AE-F7A7-49D6-9296-9BE984BE4D83 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii

On Feb 8, 2023, at 2:32 PM, Gary Jennejohn <garyj@gmx.de> = wrote:

On Wed, 8 Feb 2023 12:49:46 +0800
Zhenlei Huang = <zlei@FreeBSD.org> = wrote:

Hi = Zhenlei,

Thanks = for the report! Post the fix to Phabricator https://reviews.freebsd.org/D38432 <https://reviews.freebsd.org/D38432> .

Best regards,
Zhenlei


Thanks!  I see it's been accepted.

Fixed = in 9df6eeabb379 .


On= Feb 7, 2023, at 5:08 PM, Gary Jennejohn <garyj@gmx.de> wrote:

I just saw this error today because I didn't = have device bpf enabled in
my kernel configuration = file:

--------------------------------------------------------------<= br class=3D"">
stage 3.1: = building everything
------------------------= --------------------------------------
linking = kernel.full
ld: error: undefined symbol: bpf_mtap_if
referenced by if.c:4724 = (/usr/src/sys/net/if.c:4724)
          &nb= sp; if.o:(if_bpfmtap)
referenced by if_tuntap.c:1717 = (/usr/src/sys/net/if_tuntap.c:1717)
          &nb= sp; if_tuntap.o:(tunread)
referenced by = if_vlan.c:1292 (/usr/src/sys/net/if_vlan.c:1292)
          &nb= sp; if_vlan.o:(vlan_transmit)

ld: = error: undefined symbol: bpf_mtap2_if
referenced by if_gif.c:323 = (/usr/src/sys/net/if_gif.c:323)
          &nb= sp; if_gif.o:(gif_transmit)
referenced by = if_tuntap.c:1816 (/usr/src/sys/net/if_tuntap.c:1816)
          &nb= sp; if_tuntap.o:(tunwrite)
--- kernel.full ---
*** [kernel.full] Error code 1

This happens because a dummy bpf_mtap_if() (called a NOP stub = in bpf.c)
isn't being defined if bpf is not enabled.

--
Gary Jennejohn


--
Gary = Jennejohn


= --Apple-Mail=_A744D2AE-F7A7-49D6-9296-9BE984BE4D83--