From owner-dev-commits-src-all@freebsd.org Tue Jan 12 22:07:24 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4DA3D4E7DD6; Tue, 12 Jan 2021 22:07:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFl701nx7z4lJP; Tue, 12 Jan 2021 22:07:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 308A0478B; Tue, 12 Jan 2021 22:07:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 10CM7Onf002297; Tue, 12 Jan 2021 22:07:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10CM7OGe002296; Tue, 12 Jan 2021 22:07:24 GMT (envelope-from git) Date: Tue, 12 Jan 2021 22:07:24 GMT Message-Id: <202101122207.10CM7OGe002296@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: d89e1db5a331 - main - if_wg: fix modules load on !x86 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d89e1db5a3319f4e3bc9403ed883c64638b67f71 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 22:07:24 -0000 The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=d89e1db5a3319f4e3bc9403ed883c64638b67f71 commit d89e1db5a3319f4e3bc9403ed883c64638b67f71 Author: Mitchell Horne AuthorDate: 2021-01-12 21:38:21 +0000 Commit: Mitchell Horne CommitDate: 2021-01-12 22:07:10 +0000 if_wg: fix modules load on !x86 Only x86 provides optimized implementations via the blake2 module. The software "reference" implementation is already included in the crypto(4) module, we can drop the extra MODULE_DEPEND for other platforms. Without this change, if_wg.ko could not be loaded due to the missing dependency. PR: 252156 Reported by: gbe Sponsored by: The FreeBSD Foundation --- sys/dev/if_wg/module/module.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/dev/if_wg/module/module.c b/sys/dev/if_wg/module/module.c index c7c71a1a0f72..76c7db01cba1 100644 --- a/sys/dev/if_wg/module/module.c +++ b/sys/dev/if_wg/module/module.c @@ -843,5 +843,8 @@ static moduledata_t wg_moduledata = { DECLARE_MODULE(wg, wg_moduledata, SI_SUB_PSEUDO, SI_ORDER_ANY); MODULE_VERSION(wg, 1); MODULE_DEPEND(wg, iflib, 1, 1, 1); +#if defined(__amd64__) || defined(__i386__) +/* Optimized blake2 implementations are only available on x86. */ MODULE_DEPEND(wg, blake2, 1, 1, 1); +#endif MODULE_DEPEND(wg, crypto, 1, 1, 1);