From nobody Sun Jun 16 18:11:18 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 4W2LgD3NZgz5PDkx; Sun, 16 Jun 2024 18:11:20 +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 4W2LgC0lrsz4gyR; Sun, 16 Jun 2024 18:11:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718561479; 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=TmjW8dJRwz5ep9Tb5m7YuriUWyiWnkYC4G36PnMkaxU=; b=Xz4HunZIgGX5oAj8mdhLPmNLvVb7SHFBLRA03ijloE3qBrS2uVGX3okkZ7unYnprGcM0/m p+j+RlPmb1ckgJE7ao1YX79LT65++qxELAcAOAdJycZmyCi3aZ1O1YK2NXRq7qvOz4JkVL EVvKNW9llFuv7Cf8C/gbJzBGZw4eqokWn0zZLr8r4ir4mai9sXvM+OkmEkFyg5hsJITdKg b5Z3ekjDVjyjegYLBBZbqR3l+AfoTpDN8paAkI8y/lWEkWmJmZzr8LG8GKG4TI/thjSzrH k+/8jX9HWyLyTb5qgmDfaYTTCx66zCSOhygfVbMBXTPeZQ7vRhXuqkzu8QBgUw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718561479; a=rsa-sha256; cv=none; b=muK1p6luoXyAcxhK14YVu1PODGzmP1B4/iHGn2boQPmZeyC5XLbmSPZMFTHM4MbZ1RQhk9 LkUpAOXzjZK9QGCkKUfPxqwSfXqjjuyuuVkRfTd29tNiUAJw1ehRdf/qGN+ARrQdUwzaQs HVI11loXvaybG6maJgpv0fzm6qJvVdvB/sWVH3NNU+T5rrGXp1CeltSqtLXZeQvDHfEDto uTpEVGpqE8rFovt/esKIrrV55mALj50DzCbwBlvh7O4ukVB4zEjag/LyxtIvNx8iOX5IwH HAqldrnxZo6f47l5KvbWgzmGS8EzAwGn5IogFAIBI32zdDuizPNbtz4VSagOJQ== 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=1718561479; 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=TmjW8dJRwz5ep9Tb5m7YuriUWyiWnkYC4G36PnMkaxU=; b=xSf7757x+obgG0OGl16ZGE9fwgLE1obfnozvEcqyLfI4cOMrTlrpIU6kdchZGNcBDt8pFN QkTJ0mgJuzp7brhHp8HnnkhzeqKwbmKiyaZP6kcOEo87gfqKqFEDTwPQIEjJOEIUWxsfUr cJzucBFynE52RCjohV9y/rswclMDsDqOo8WNgqM/O1W1Py9YhOsBBsWQpdaJZ6nFyG6iiV jvwiJLxRNUfNzg3u2OPZKiL9i37WIEr6oKsF0m0Mar/8l5RTF26RA3wPRG/Bok1NPLGUCl BjiFD8/psJPJaBDSMqN1PyCVH7PHsZCql3DNZlDmYNvajq+y1lT0IcKCGIR+Cw== 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 4W2LgB3yVKzxpn; Sun, 16 Jun 2024 18:11:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45GIBIOp039543; Sun, 16 Jun 2024 18:11:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45GIBIWX039540; Sun, 16 Jun 2024 18:11:18 GMT (envelope-from git) Date: Sun, 16 Jun 2024 18:11:18 GMT Message-Id: <202406161811.45GIBIWX039540@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 5515e8874a8d - main - 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/main X-Git-Reftype: branch X-Git-Commit: 5515e8874a8d85a8d961fca64c494dfc1bea4bd0 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=5515e8874a8d85a8d961fca64c494dfc1bea4bd0 commit 5515e8874a8d85a8d961fca64c494dfc1bea4bd0 Author: Mark Johnston AuthorDate: 2024-06-16 17:33:45 +0000 Commit: Mark Johnston CommitDate: 2024-06-16 17:33:45 +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") --- 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 d0b75d5cbf4b..6683d0505b26 100644 --- a/sys/dev/wg/if_wg.c +++ b/sys/dev/wg/if_wg.c @@ -2196,7 +2196,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) { @@ -2258,6 +2257,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. @@ -2921,8 +2921,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);