From nobody Sat Jun 15 12:40:31 2024 X-Original-To: dev-commits-src-main@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 4W1bN60Bxpz5NksD; Sat, 15 Jun 2024 12:40:38 +0000 (UTC) (envelope-from peterj@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 4W1bN56qglz46wr; Sat, 15 Jun 2024 12:40:37 +0000 (UTC) (envelope-from peterj@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718455238; 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=odVyxW0oqlb0tJZ7YROIqf6OngVIKLM9hE68bhaRWjw=; b=GmFoN4pbg9LT3zNbMw0zQVlGnGG2P6CtkB0+vwHVTvt220aUMKFVKkMZb1SY0x3j8dutoc +OL83zyLQ4VdnDQ5v5o7Uh07vWlXzXaFvS4V1YSFFPATucAvA7Rz/W/4alHaC9X19saByB S/6A7DJmygqjfk7okWy4Mj+haZygAvZXuQRXGKqFaRdnxAqLk8A6YpldKUnk5OXY9GUHxQ GyBjAmNjz+dwYFW39TJPCIQjALNKDSMNUgm+rco/NJr3VaFr2v38yBunFoL/l0/otrJyGZ QnkM3jMuqiykbdczI4pVa0riksovNVKGSl43ce2Ul1GTt+hYgsD1jPWFT0qYZA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718455238; a=rsa-sha256; cv=none; b=FhHScvn03Qf77Gw0kXogWCJwxEN4nuWzmfxYv8epXifUXPJTmQZg0V8MpQAgjGY0D9L3xG s2/pDPBooouR/Y8ticR/KO2+QhY5uUPdKLmrKmtsCdGUbp7FNwnZaaV1NBoCY87vh9DNUY OfWGp9FT0S53w7M+w5KupaOgBtHUtjtTs0BUSOHmDl+CaqkRzbZvwUwt9TLWHR5xx7JNPT t8UQzVpwtfGBEH15gWUNczM2wukS8IAk3VKn1UxvKBNk0LdnapQtwsW0w9l5iBWXaNpW+a ++j0tG1tLgVolRp7YUyzYyDtBy8zsc+N5NQV84qiFXLq/gDxfsj9Ev0FVjjh/A== 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=1718455238; 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=odVyxW0oqlb0tJZ7YROIqf6OngVIKLM9hE68bhaRWjw=; b=NZ993xF0njNmqHjNpRqLogawYzRjme1DGyMNhm5uRjmMgqKAigGwQZ94gPiU7fwMhwxbLv 9epaHZvhPOIxkMGWAra6xv1R+TpVxR0+IDPGaMZUP5PvTOrG8eaMbzLe+dqvZ8EgvYMNMO AGszVIpb2BXpCtjedL8Hzo8iP0buKC5zsPDOVqU+jcI06N5mtebFcGFIQhfFe89JMpr1oy y0ECIyVyA9S75sSpEorMfV7hHmtGe2f3nZ7OMCSwmniK1QEwWhyG4qKy+FJronu2mspsJu jZ4SRdS3kD3jgVCOvDPOUGoCTHt+P7XruRP737v1p+tGfD+L3ssxbJRmazAwWg== Received: from server.rulingia.com (ppp239-208.static.internode.on.net [59.167.239.208]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA512) (Client did not present a certificate) (Authenticated sender: peterj) by smtp.freebsd.org (Postfix) with ESMTPSA id 4W1bN43PbXzPNY; Sat, 15 Jun 2024 12:40:36 +0000 (UTC) (envelope-from peterj@freebsd.org) Date: Sat, 15 Jun 2024 22:40:31 +1000 From: Peter Jeremy To: Mark Johnston Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: bf454ca88bdf - main - wg: Add netmap support Message-ID: References: <202404201605.43KG564E080220@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="VKAYPSKkzu5Qsqrn" Content-Disposition: inline In-Reply-To: <202404201605.43KG564E080220@gitrepo.freebsd.org> X-PGP-Key: http://www.rulingia.com/keys/peter.pgp --VKAYPSKkzu5Qsqrn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2024-Apr-20 16:05:06 +0000, Mark Johnston wrote: >URL: https://cgit.FreeBSD.org/src/commit/?id=3Dbf454ca88bdf4acfa873386e876= ff5e772e6a830 > > wg: Add netmap support =2E.. >--- a/sys/dev/wg/if_wg.c >+++ b/sys/dev/wg/if_wg.c =2E.. >@@ -2206,6 +2341,11 @@ wg_output(if_t ifp, struct mbuf *m, const struct so= ckaddr *dst, struct route *ro > return (EAFNOSUPPORT); > } >=20 >+#ifdef DEV_NETMAP >+ if ((if_getcapenable(ifp) & IFCAP_NETMAP) !=3D 0) >+ return (wg_xmit_netmap(ifp, m, af)); >+#endif >+ > defragged =3D m_defrag(m, M_NOWAIT); > if (defragged) > m =3D defragged; >@@ -2781,7 +2921,10 @@ wg_clone_create(struct if_clone *ifc, char *name, s= ize_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); >+ if_setinputfn(ifp, wg_if_input); >+#endif > if_setoutputfn(ifp, wg_output); > if_setioctlfn(ifp, wg_ioctl); > if_attach(ifp); sys/net/if.c:if_attach_internal() (called from if_attach()) requires that both transmit and qflush must either be NULL or set but if DEV_NETMAP is undefined, this code only sets qflush, guaranteeing a panic() as soon as a wg is attached. Unfortunately, I don't understand the code well enough to offer a fix. --=20 Peter Jeremy --VKAYPSKkzu5Qsqrn Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEE7rKYbDBnHnTmXCJ+FqWXoOSiCzQFAmZti7FfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEVF QjI5ODZDMzA2NzFFNzRFNjVDMjI3RTE2QTU5N0EwRTRBMjBCMzQACgkQFqWXoOSi CzSEiA//TFPoTUzp7D01ospWUU3p+6hGfx+PPdQK93abCk483I2yfc8EGONTpDs2 P7KLi0Vd7tlL/EHKKEUThaVwTSXlLPKpgwek1EMyzTILWm+ho6iJhCvJ2gIdP+Ax sFwCz8NivbHSmL74I9CI1Cm8Q6BThDMkdG8FFb1XsSx5oPnRvq7uJEdi/3PfI0SS s0DKbHWg6Fsn62m24qYD6J+wuvMXZ5J4PtVSqo2yE7NhPbGcbc826E9YqgBPb/bL il6LiLx0gVIttQk1J7ct3slH+1kIHazTiXHA0Le00Dtn/3xWAfyHOqYWdPXnpmL3 NmYWIPLqpUJizBAWLDqWMevGGruAdGIIUVDH0SuASY6VXV+i2O77TM0hipvmRYv8 AEZxmORYnZdsi1smzsmqfweZkWh0OK0G5qElkj606nHAIsFLlIA0arNFlfAxz0wm 4MuivBfMcVECzzUjDHK/eqdMP/2hM2EtOFt8ezL0r7VkeAYaGRpn55e+n4nPoQ2G EndWPLi2yha0SUH5fsGChULY2ljHS3t+eZ2V5ILtWC/R1aDOSNBaT4IN7blTdbDS cCyLlEpkElmJKNa/jqSowE/s8NR4lX5wQ7VLj+/m2sHzLwaTU8Qcj1uTokHa8oXj +Dw9upt9j7jP6ztQjHGoACn3gZJrqmHShSoApMNHYa8akvDakbA= =q27h -----END PGP SIGNATURE----- --VKAYPSKkzu5Qsqrn--