From nobody Sat Jun 11 10:58:18 2022 X-Original-To: dev-commits-ports-all@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 F3A61855845; Sat, 11 Jun 2022 10:58:18 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LKvvG6YCCz4VFX; Sat, 11 Jun 2022 10:58:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1654945098; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7g4GUjSZJE37mk/5JJ+zHlbPX3Z+tj9hi36jOJXcd1g=; b=mX2h7MdTx3pl3iYVnTruSp1uG/xegaTs8RymNmSW4xmA2wBd/gan1bC+WLmvIi1bifsobC bIr6DTnFWqseIX/ck7Q/iWhzT7ODVNyA3fwwAUMRjUw1+Nzhz4ZfhMIcmrmBvCeYx025hw 8G0T8fXj3m4+qxu0OkXD+WlfMutz6bdXlZStO5nYdIi4SJ4ojOLJmeVGkenMXK8hGgCsiY cbSRv5TofFojqb2uMyr16E6iUI/lDLmM62emo5f2HnY4ao7Rh0HbRZqTaTWexUOs3XI6ta 0xeeOwz9KAo99Ta3a5tgGtlkrwqgkmd/+LFDtEZdcTlbMiAXPYxkQq4Oz87+Tg== 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 C10793DAB; Sat, 11 Jun 2022 10:58:18 +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 25BAwIai038919; Sat, 11 Jun 2022 10:58:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 25BAwIAs038918; Sat, 11 Jun 2022 10:58:18 GMT (envelope-from git) Date: Sat, 11 Jun 2022 10:58:18 GMT Message-Id: <202206111058.25BAwIAs038918@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Bernhard Froehlich Subject: git: b44715d91b98 - main - net/wireguard-kmod: Update to 0.0.20220610 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: decke X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b44715d91b98beefed44294caf090243e3ee1214 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1654945098; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7g4GUjSZJE37mk/5JJ+zHlbPX3Z+tj9hi36jOJXcd1g=; b=uK4emGyEh2GyUR6LeT1ef3siHDCN+X9HMLEaQnxODp4Y+nmATh+jiCZ7UksrBLRZ4ZsooL gxBKukkeoJnwKHLwrmdscBfKLnqblvOHb3f1baJw8xMxp3J4dMjj5YWI9W7kh5mYK4cQdi iAry48KrbgkmTZpFz+JKRo67tg527r+BweYP8HwBP9l/EBDLS5J0FShEKBd5EWp+IM/SHi JTVgWpGYSBwD+D+rJfeaTMWn3M5ZKepTolck+jttgqNZrFZrnd/LBqCBuYOYAkf33wBOcO rby8LgwrzPWnh63IYVH+paUNTB8+k08YdURl54HiR0tv6v9cE1GjcxGjL44EbA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1654945098; a=rsa-sha256; cv=none; b=Uo9PJ1bafrblUekhrtQc7pyDADUOjhd/TkzyPwq9uZLhuZrE4x++3tBpdTp1p3EkZEt6Zc 3qT5PrcykC1jGRL8DsvfsXJriP3P4f8BMIKtQApFMDaNTa0/J+f7FAdejOK5IK2OXEHJVQ v95BAebbcD6WGDMtn5YqdTinY7VmUitm5c0771PMKkZ+HezhIYOoR4dBg01rGgBp2LIXC1 ItMkeEkzJUdP7/bhoWJt33XA52efrgbtotQPvrpX4xUeG2sXQGD4KVCYlXAELsCYPmcg0i /S+u6MSK4AcgiODa8dWwtXO+Ft4KkLnLqiiZ+llQ+w/hWV4Z6gxUBkglaesmwg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by decke: URL: https://cgit.FreeBSD.org/ports/commit/?id=b44715d91b98beefed44294caf090243e3ee1214 commit b44715d91b98beefed44294caf090243e3ee1214 Author: Bernhard Froehlich AuthorDate: 2022-06-11 10:52:01 +0000 Commit: Bernhard Froehlich CommitDate: 2022-06-11 10:58:13 +0000 net/wireguard-kmod: Update to 0.0.20220610 == Changes == * if_wg: wg_queue_len: remove locking * if_wg: wg_queue_delist_staged: use more standard STAILQ_CONCAT * if_wg: wgc_get/set: use M_WAITOK with malloc() * if_wg: wg_clone_create: Use M_WAITOK with malloc * wg_cookie: ratelimit_init: use callout_init_mtx * if_wg: wg_mbuf_reset: don't free send tags * if_wg: wg_module_init: clean up more if the self tests fail Numerous cleanups. * if_wg: avoid scheduling excessive tasks for encryption/decryption A nice performance improvement - John reports double on iperf3 TCP throughput. * crypto: return an error code from mbuf crypt routines Preparation for the OCF work John's been working on. * if_wg: account for input function returning a boolean * if_wg: account for added argument to sbcreatecontrol These allow building on recent FreeBSD 14 main. * if_wg: do not use continue statement on \!VIMAGE * build: only include compat.h for if_wg.c and fix build with an obj directory Minimum required version is FreeBSD 12.3. --- net/wireguard-kmod/Makefile | 3 +- net/wireguard-kmod/distinfo | 6 +-- net/wireguard-kmod/files/patch-Makefile | 23 +++++++++ net/wireguard-kmod/files/patch-if_wg.c | 84 --------------------------------- 4 files changed, 27 insertions(+), 89 deletions(-) diff --git a/net/wireguard-kmod/Makefile b/net/wireguard-kmod/Makefile index cb3105bb649d..4e44828fe968 100644 --- a/net/wireguard-kmod/Makefile +++ b/net/wireguard-kmod/Makefile @@ -1,6 +1,5 @@ PORTNAME= wireguard-kmod -PORTVERSION= 0.0.20211105 -PORTREVISION= 1 +PORTVERSION= 0.0.20220610 CATEGORIES= net net-vpn MASTER_SITES= https://git.zx2c4.com/wireguard-freebsd/snapshot/ DISTNAME= wireguard-freebsd-${PORTVERSION} diff --git a/net/wireguard-kmod/distinfo b/net/wireguard-kmod/distinfo index 58a8d3b741e5..a1bbe2c7fe76 100644 --- a/net/wireguard-kmod/distinfo +++ b/net/wireguard-kmod/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1636441226 -SHA256 (wireguard-freebsd-0.0.20211105.tar.xz) = 454f2cf15329ccf40da15f8df61f8d70bb6d382efdfe4a5899ca16474f91903f -SIZE (wireguard-freebsd-0.0.20211105.tar.xz) = 45944 +TIMESTAMP = 1654889136 +SHA256 (wireguard-freebsd-0.0.20220610.tar.xz) = 518779c383e8087a60a7ec7b0969158a48b2f19a34a13b62683c982960295f17 +SIZE (wireguard-freebsd-0.0.20220610.tar.xz) = 46064 diff --git a/net/wireguard-kmod/files/patch-Makefile b/net/wireguard-kmod/files/patch-Makefile new file mode 100644 index 000000000000..7fcb0b959840 --- /dev/null +++ b/net/wireguard-kmod/files/patch-Makefile @@ -0,0 +1,23 @@ +From ccf37db6e6b983bafcd7a6a7abd7e066026b388f Mon Sep 17 00:00:00 2001 +From: "Jason A. Donenfeld" +Date: Fri, 10 Jun 2022 22:28:48 +0200 +Subject: build: include compat.h for all files + +54b2075 ("build: only include compat.h for if_wg.c and fix build with an +obj directory") scoped compat.h to if_wg.c, which broke building on +12.3. + +Signed-off-by: Jason A. Donenfeld +--- + src/Makefile | 2 +- + +--- Makefile ++++ Makefile +@@ -6,6 +6,6 @@ SRCS= opt_inet.h opt_inet6.h device_if.h bus_if.h ifdi_if.h + + SRCS+= if_wg.c wg_noise.c wg_cookie.c crypto.c + +-CFLAGS.if_wg.c+= -include ${.CURDIR}/compat.h ++CFLAGS+= -include ${.CURDIR}/compat.h + + .include diff --git a/net/wireguard-kmod/files/patch-if_wg.c b/net/wireguard-kmod/files/patch-if_wg.c deleted file mode 100644 index 6ba4437fc116..000000000000 --- a/net/wireguard-kmod/files/patch-if_wg.c +++ /dev/null @@ -1,84 +0,0 @@ ---- if_wg.c.orig 2021-11-05 14:40:17 UTC -+++ if_wg.c -@@ -377,7 +377,11 @@ static struct wg_packet *wg_queue_dequeue_parallel(str - static int wg_queue_both(struct wg_queue *, struct wg_queue *, struct wg_packet *); - static struct wg_packet *wg_queue_dequeue_serial(struct wg_queue *); - static struct wg_packet *wg_queue_dequeue_parallel(struct wg_queue *); -+#if __FreeBSD_version >= 1400057 -+static bool wg_input(struct mbuf *, int, struct inpcb *, const struct sockaddr *, void *); -+#else - static void wg_input(struct mbuf *, int, struct inpcb *, const struct sockaddr *, void *); -+#endif - static void wg_peer_send_staged(struct wg_peer *); - static int wg_clone_create(struct if_clone *, int, caddr_t); - static void wg_qflush(struct ifnet *); -@@ -1946,9 +1950,15 @@ wg_queue_dequeue_parallel(struct wg_queue *parallel) - return (pkt); - } - -+#if __FreeBSD_version >= 1400057 -+static bool -+wg_input(struct mbuf *m, int offset, struct inpcb *inpcb, -+ const struct sockaddr *sa, void *_sc) -+#else - static void - wg_input(struct mbuf *m, int offset, struct inpcb *inpcb, - const struct sockaddr *sa, void *_sc) -+#endif - { - const struct sockaddr_in *sin; - const struct sockaddr_in6 *sin6; -@@ -1965,7 +1975,11 @@ wg_input(struct mbuf *m, int offset, struct inpcb *inp - m = m_unshare(m, M_NOWAIT); - if (!m) { - if_inc_counter(sc->sc_ifp, IFCOUNTER_IQDROPS, 1); -+#if __FreeBSD_version >= 1400057 -+ return true; -+#else - return; -+#endif - } - - /* Caller provided us with `sa`, no need for this header. */ -@@ -1974,13 +1988,21 @@ wg_input(struct mbuf *m, int offset, struct inpcb *inp - /* Pullup enough to read packet type */ - if ((m = m_pullup(m, sizeof(uint32_t))) == NULL) { - if_inc_counter(sc->sc_ifp, IFCOUNTER_IQDROPS, 1); -+#if __FreeBSD_version >= 1400057 -+ return true; -+#else - return; -+#endif - } - - if ((pkt = wg_packet_alloc(m)) == NULL) { - if_inc_counter(sc->sc_ifp, IFCOUNTER_IQDROPS, 1); - m_freem(m); -+#if __FreeBSD_version >= 1400057 -+ return true; -+#else - return; -+#endif - } - - /* Save send/recv address and port for later. */ -@@ -2027,11 +2049,19 @@ wg_input(struct mbuf *m, int offset, struct inpcb *inp - } else { - goto error; - } -+#if __FreeBSD_version >= 1400057 -+ return true; -+#else - return; -+#endif - error: - if_inc_counter(sc->sc_ifp, IFCOUNTER_IERRORS, 1); - wg_packet_free(pkt); -+#if __FreeBSD_version >= 1400057 -+ return true; -+#else - return; -+#endif - } - - static void