From nobody Thu Aug 25 17:31:35 2022 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 4MD94R5jVKz4b3BJ; Thu, 25 Aug 2022 17:31:35 +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 4MD94R54qZz3Kx6; Thu, 25 Aug 2022 17:31:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661448695; 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=rgfH+mQ28CIKhHNJmOmsTfa3lGDwvgLkFSS1qdQX30E=; b=Bs/k1krW7hN2OCTBaxwQKMyomNa1lyF9xyagIH4bTAX6r0vhEXyMFUyLzbenL/NGjNj9/z Aluf80zVw2su+YhyJQYGbxsfvVP3CFk5CW9zBm2lLKKGBRzHcsNFhPiEF1E/QoCSetN7UZ 2Y7oXxlWR9f+fQ0BdNGSEHc49r4/P3vJ5BQpcuqk0RroE2dMNpD/Irt3KnGkdhOVHK55Mq jRaJDMNG2YgkUs9USYDIZGqUWLHnmShZ+tkSYbfRrn7m6w0OBNH4iaagercXA+SvyiNRAC bVYQvvedrDrFQDcbaabs/Y07t4Ew+NF2xPMWCskSQoc5i2XItTwJQiYnju5Cpg== 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 4MD94R4B4tzwxY; Thu, 25 Aug 2022 17:31:35 +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 27PHVZuv041558; Thu, 25 Aug 2022 17:31:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27PHVZmh041557; Thu, 25 Aug 2022 17:31:35 GMT (envelope-from git) Date: Thu, 25 Aug 2022 17:31:35 GMT Message-Id: <202208251731.27PHVZmh041557@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 1a26ebd6d5b3 - stable/13 - ktls_test: Add a require_toe option similar to require_ifnet. 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 1a26ebd6d5b3d86870f91fac3e23573ae6e840ae Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661448695; 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=rgfH+mQ28CIKhHNJmOmsTfa3lGDwvgLkFSS1qdQX30E=; b=DjJRsqV8QgoOKRBkYw34xyiveARDRbUTsTBEAdH1/00uxkh7M0oUDeZW40PY5pkBdTSwfx lze0YjCrOeOHpt8jOrPog6SLeURGu4bSR0xdk7bwQdQKrjA6+iI+q+ebFfWEaxGPv4qo+3 v/zkfcIW82HZRPTT4BliCBFtaWQP5Rt24ufyZwTfYkgeE2uFqQglPsiRg2UYy+6YKMZmw+ W+9d2LVEdGYZO5Nqx0dbTlBqHHYoLRUyBZtIYRqpbBA9ZK54fBpD+QwQrjUOZPevVtFcm4 OVbgjFkSQoX8IJmo0B227BWZlNho6Z+0Exl1NpbLHFhaQwKA8BbcvsIpuvy6qw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1661448695; a=rsa-sha256; cv=none; b=JcdOiX6DFwzj7RkkCaanJ9OcBK4qiXFVq3nYS/8iInF/XDR8KQVSgnM1y8dzrJCYsly7IS C1AZr0zHzeSZUbuPHt/zMi1N3KW8aZ1OHCO0j0BM96UmaR/Cti8Su9MU0tr9IE7ThGTfoz OheIBMIlWw+VGBnDfQrbcWHoQEf7teTH1g557e1oPqiPa4JOCSfX0jzi3IsJvU3KvHblQr UVxKee3debfcuoXjNqUlWzlRGu1ZuSkqL214RMVm+qwsa9yb1ggHy9y8FQJFtcHiX60ZRC dTtFIglzGaauLIS5rXVBTnilc4JdCkcy4eW2GmNe1GElactNF/NpXNEz9JPhxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=1a26ebd6d5b3d86870f91fac3e23573ae6e840ae commit 1a26ebd6d5b3d86870f91fac3e23573ae6e840ae Author: John Baldwin AuthorDate: 2022-08-08 18:21:54 +0000 Commit: John Baldwin CommitDate: 2022-08-25 16:33:57 +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 (cherry picked from commit cc13c98302f6d73ab0b0ea81e2b7ef84297057b3) --- 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