From nobody Tue Jul 02 13:22:32 2024 X-Original-To: dev-commits-src-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 4WD3Vd1Sy2z5QRhj; Tue, 02 Jul 2024 13:22:33 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WD3Vd10hCz4yj0; Tue, 2 Jul 2024 13:22:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719926553; 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=BGfHxJ/RiZh12jABN9KZjFe6vHNWwWOZj1G0IVY/M74=; b=SJ7fmwp8v8K3Crmb+7feihehJTwXeBplV6a4lLW6vxbIM+15yDmGU4uCNzAxab6iAFHFUL 4Vb0cGWTSosVIe36igocah8lOlIzTpLZMYVYb/YCk6GFaPLbELRbPUt/PmzqfJcx5r6fP0 4YIaYmtQcZsTZlRYD7LifQvcpDhBGeAj6Jmwny/63+X566kelUlmji+Ei8IDiXU7FEu3ka /sSGh/T/klWKtziVYQKuE1oS/RKz7e9Wf5+mIbdLl8TnuZOD0/oeaXGHkvTepw8Y/A6i/t cezP4+6KgJXFX4o9itdN+dORyUh78+kN2PIrjpi38Fdb5IQIpA1kTQ+nJq1x0g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719926553; a=rsa-sha256; cv=none; b=d1uoHjjVt37ZzpnxF1v3jfh3RMLwHjoD4LecvlmAJdF3sbiEbvmHoeUoWSdjeadWr9oXpa n9Ph9z2mTGfl0dm6oKFRQg20P04Qg7YJFAifs4Ab0Q9cdJ+sbOurIZVgwCC6uOc0SeOYH7 LRdnxy+lJ994yML303j0kqMV8gAC5uMY8+gnqk2jG26DF+suEF65swLMeP6TchrZ3mKmHx hP6CsnfbltPNv3ADmatD+NUIA0WQ/Xz49rZXhEoM9UFXm0O3kU23ZXg5Vm2Qsqt1MRxtQd m3jQGPIly1H/owgt2T4/dxYlK57Hvn0APEo2s3UbDNiyNGlcoEn21yo03i6Ikg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719926553; 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=BGfHxJ/RiZh12jABN9KZjFe6vHNWwWOZj1G0IVY/M74=; b=vjMa4IAyPNh2KdSQG7wANzNJWkxOV7vBPpRWligmV1/8Wlagg7OCm+5rRE0q8ET8acJAp7 Qjv4fqqhZk2ldjckbOJdiVPK6Y+MHMxi0QspSJYc3kQpr8ViZUPR8P7dTxEPP+LpMeL+g5 1p2+oJ2wQeWWESbp2Es+YeKDtqsLL3v/401eeUxJ1/Lwtovsff9aDFxVOzXESX2oSgQ83p SCGhcPi8hQGQ1YEgMIkgdH8VSar8qg4s6d3pp342/14CfAvuy5HluewVH6JJ6OjsZk7aTO hCjQoXbsYfcHly1jE54YLatiYcsdTcgZxM5wn1Qn3nYKXXXY1O3V//VYvXTLrw== 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 4WD3Vd0bJpzpwM; Tue, 2 Jul 2024 13:22:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 462DMWae021069; Tue, 2 Jul 2024 13:22:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 462DMWJq021066; Tue, 2 Jul 2024 13:22:32 GMT (envelope-from git) Date: Tue, 2 Jul 2024 13:22:32 GMT Message-Id: <202407021322.462DMWJq021066@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: a9a57c843264 - stable/14 - wg: Implement if_transmit unconditionally List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a9a57c843264ae1fecf8f0b63f95edbca2496819 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a9a57c843264ae1fecf8f0b63f95edbca2496819 commit a9a57c843264ae1fecf8f0b63f95edbca2496819 Author: Mark Johnston AuthorDate: 2024-06-16 17:33:45 +0000 Commit: Mark Johnston CommitDate: 2024-07-02 13:19:28 +0000 wg: Implement if_transmit unconditionally Commit bf454ca88bdf made wg_transmit() defined only when "device netmap" is configured, as if_wg's if_transmit implementation should never be called otherwise, but this breaks a requirement that interfaces implement both or neither of if_transmit and if_qflush. Restore the old behaviour of unconditionally defining wg_transmit(). It contains an assertion that the interface is in netmap mode. Reported by: peterj MFC after: 2 weeks Fixes: bf454ca88bdf ("wg: Add netmap support") (cherry picked from commit 5515e8874a8d85a8d961fca64c494dfc1bea4bd0) --- sys/dev/wg/if_wg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/wg/if_wg.c b/sys/dev/wg/if_wg.c index 552f47f9645b..b0ad94e284f1 100644 --- a/sys/dev/wg/if_wg.c +++ b/sys/dev/wg/if_wg.c @@ -2194,7 +2194,6 @@ determine_af_and_pullup(struct mbuf **m, sa_family_t *af) return (0); } -#ifdef DEV_NETMAP static int determine_ethertype_and_pullup(struct mbuf **m, int *etp) { @@ -2256,6 +2255,7 @@ wg_transmit(if_t ifp, struct mbuf *m) return (0); } +#ifdef DEV_NETMAP /* * This should only be invoked by netmap, via nm_os_send_up(), to process * packets from the host TX ring. @@ -2919,8 +2919,8 @@ wg_clone_create(struct if_clone *ifc, char *name, size_t len, if_setinitfn(ifp, wg_init); if_setreassignfn(ifp, wg_reassign); if_setqflushfn(ifp, wg_qflush); -#ifdef DEV_NETMAP if_settransmitfn(ifp, wg_transmit); +#ifdef DEV_NETMAP if_setinputfn(ifp, wg_if_input); #endif if_setoutputfn(ifp, wg_output);