From nobody Mon Aug 08 18:22:27 2022 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 4M1l0z3hCFz4YkKg; Mon, 8 Aug 2022 18:22:27 +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 4M1l0z2WGNz3Xq6; Mon, 8 Aug 2022 18:22:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659982947; 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=paU7bf4gYxIbdy6kLpf7RaJG951RqADxxc3SYngrvQA=; b=D7wU+qafmEdeYplTynhWN4d1Jq7NBN76GsgpY0N36Ef2yNcIG7IFLendKVDz9ffOsWbJWv qrK1AfOK6FvZtg11znBwCKtDjl5WQF6ZakAi76YGhs8pZuMoXP2jGl1sgcE5x5kjKv3sgZ cz5/uI4SfAaSdLaH6+/RVOXSiD6DuZV3vTxvMA7EwhK6bXr2MfZ7RqOmgjPLweF0PXpoiS VpqWXm1OTpj19QdyCCzxwx0HOyMCE2Ul78U56cKTdQv0hzKTk6fyKwqQtfZ7UIeHwipCk3 shJsXOGhSVhcazyDxeCDthv+4uCM5GKniiyllaqU64HlQ6qlCTxz4HvwIZY2MQ== 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 4M1l0z1MLcz12LS; Mon, 8 Aug 2022 18:22:27 +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 278IMRWa041991; Mon, 8 Aug 2022 18:22:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 278IMRbl041990; Mon, 8 Aug 2022 18:22:27 GMT (envelope-from git) Date: Mon, 8 Aug 2022 18:22:27 GMT Message-Id: <202208081822.278IMRbl041990@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: cc13c98302f6 - main - ktls_test: Add a require_toe option similar to require_ifnet. 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cc13c98302f6d73ab0b0ea81e2b7ef84297057b3 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659982947; 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=paU7bf4gYxIbdy6kLpf7RaJG951RqADxxc3SYngrvQA=; b=JC6zYk9aoiXjtimSpkbaFJG+oIZnLB9Lu6ujJehhs2cfTkMIAK0dQV/BSl+PZw13rCk9W3 QkDrmSEyRdvBtgukfoh68Q1re5hIxioHFtbXD/IuKuEjUG/sH++Hm8Wr8msY0t9LBk4Y4G VHFJoFmwcjD7VpAFYKJA3M+9aecgjCvGn4IadCosdD72cvBZcmrZ9wwEY8ZJDb/Ej//Z1B o1Wg4i3NgZbnDSYa4fnOt1YePXfvhg+P8mr95ApQFOdHq2FaYs8hU1jqP6DC45ikV0AEoX v6I590oulxqMlnHBkJuQTg7In7H5u4QaUFfK8A5rFbzW0SsNeG6mtF0gvJ79VA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1659982947; a=rsa-sha256; cv=none; b=Pg++bNZzmNzNr3r3b9cbvANaIXQyR6312Z/UlGTUsCSxMYFo4Ty31/qi36qRxcb8FUN/Sx VipMQepkYrvKG5S7UewtVAzCe5BXay6u6aiqa5zpZGsVpBMbK3M/1tRVo7RzsY0sVpkGjz 7hXIuCiSV+2dqvjzmpUjxNlalDtAP7BD9Yz9mShz4klUjevps/dRgpte8ypxdx5P0QNchg 8x2D3T44g9nU892y+dvzKmebXwCmLQQc7ApwTLFOLdUKZphSbrT2FUBEWFotQOMhORWVOl SmqmXMcGhYP/7YZH8jVvndAqI67KMqA8j5lUPAmmTdsitM221OfLnxGI0vnYOA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=cc13c98302f6d73ab0b0ea81e2b7ef84297057b3 commit cc13c98302f6d73ab0b0ea81e2b7ef84297057b3 Author: John Baldwin AuthorDate: 2022-08-08 18:21:54 +0000 Commit: John Baldwin CommitDate: 2022-08-08 18:21:54 +0000 ktls_test: Add a require_toe option similar to require_ifnet. This skips tests that send and receive records that do not use TOE TLS. Sponsored by: Chelsio Communications --- tests/sys/kern/ktls_test.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/sys/kern/ktls_test.c b/tests/sys/kern/ktls_test.c index b36de88adfa2..488b98725d09 100644 --- a/tests/sys/kern/ktls_test.c +++ b/tests/sys/kern/ktls_test.c @@ -81,6 +81,18 @@ check_tls_mode(const atf_tc_t *tc, int s, int sockopt) if (mode != TCP_TLS_MODE_IFNET) atf_tc_skip("connection did not use ifnet TLS"); } + + if (atf_tc_get_config_var_as_bool_wd(tc, "ktls.require_toe", false)) { + socklen_t len; + int mode; + + len = sizeof(mode); + if (getsockopt(s, IPPROTO_TCP, sockopt, &mode, &len) == -1) + atf_libc_error(errno, "Failed to fetch TLS mode"); + + if (mode != TCP_TLS_MODE_TOE) + atf_tc_skip("connection did not use TOE TLS"); + } } static char