From nobody Tue Jul 23 13:19: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 4WSyRT1xxNz5Rwmg; Tue, 23 Jul 2024 13:19: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 4WSyRS6h3bz4HSh; Tue, 23 Jul 2024 13:19:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721740772; 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=Ia16fY8bdz1qXdq/Ii2d7nyJrCQ6evZdXMHIl9l3yxg=; b=oAI+G9/pQPAQQUKqcJQd3CWv182b/CI5Z9OpzGDq92ULd0valEVEGv8QEFHJZKM/rRK0Y4 PzWg2FpJzxAooKdjJuU4iqay59sMgaG2zNvzkfP6WjRh8b5AEyrUYvsZT0rlC7ZuiNZJlR euf7iuTRetDnmyKsy+POf6v9wmgYUrW8BWKp/rViSb2vT6KrEvVhxCkLsoh3xp1c/0p3pF oHhhRM4HP7bXwjeu2Ti1GdyX2fxf5lgRNX2IK7KvsETmpv8Sa0Ar+rtgqKTGX9UYKOyDbn W204XbTuRsqc3ACvJoCCaNcQbMurs55gMXrWqb2baXG59sQN/eYZKNkZBpXaUA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721740772; a=rsa-sha256; cv=none; b=EczwTdCmFuIuAkgEew0W1mwcmIbGVPsrCQRL34jJbYmmSPx3A+dkOz7XyaFv4Mk6+4PkSp ChF6SSZmQ0CUtZgBi7tZ1H/FM0+xoDisYqEU8Dqa+3Jq5rLhaLYJ1Tf2ZLucm+g/E4QJwZ z16UMg23XvkEpaDq0IvDpTt8ZAzk6dyI8DNiwGjfRIB0PCNMZanvhyWGtXDg+au/H8ofyk ITMM1FcRVKj+Xmhnvc5WNVI/P+a0wCRDRdPKV3WfAEKHuTDBdaGIzG7VD3FL8JqbMe8qs8 rLO08iyUU6GkdMZaY3ExhoH12+rp2Cut0XiFvYzQ7ixM0hdhAqymELaQVgrMFw== 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=1721740772; 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=Ia16fY8bdz1qXdq/Ii2d7nyJrCQ6evZdXMHIl9l3yxg=; b=ROgeusmPVdmMAgGqeXK/qtwoUCw27K+jf/zcrcO3YH8zC5h2F7qnIhXozu0sMIGOu5j6nF VNwYrCG5+otEnwKmnD1vacAsLO4MuoJnQQyFHt5p0pkd5aN3j+PCNpgCd0F37JVwTDEiLa jCSVrZ0fGw7uPPPu2e/nqvH6/VdACh4auTTr7XZmTBGFoN3djii43xfPA/JtVz9aJ4IGNe UTUX5Qn7VpMduur2fljTmcg3SFuGLU4DbadHICG/x20DPVFRhEWyTRNFSi4jtnegi4rHuQ SrPvN3Lhl4ZEFrKiv3AVMw/eWG8xnPqMWh9ZgLHutWZ6e4YLtDnWl00ijXND6w== 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 4WSyRS6HJLzVT2; Tue, 23 Jul 2024 13:19:32 +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 46NDJW6f004324; Tue, 23 Jul 2024 13:19:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46NDJWEf004321; Tue, 23 Jul 2024 13:19:32 GMT (envelope-from git) Date: Tue, 23 Jul 2024 13:19:32 GMT Message-Id: <202407231319.46NDJWEf004321@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: 97d88163d468 - stable/14 - ktls: Remove the socket parameter to ktls_ocf_try() 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: 97d88163d4685b57b3f50e7788691454256c5182 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=97d88163d4685b57b3f50e7788691454256c5182 commit 97d88163d4685b57b3f50e7788691454256c5182 Author: Mark Johnston AuthorDate: 2024-07-08 15:52:07 +0000 Commit: Mark Johnston CommitDate: 2024-07-23 13:01:30 +0000 ktls: Remove the socket parameter to ktls_ocf_try() The socket is unused, and not passing it means that there's less to think about when considering how KTLS is synchronized with the rest of the socket code. No functional change intended. Reviewed by: gallatin MFC after: 2 weeks Sponsored by: Klara, Inc. Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D45675 (cherry picked from commit 5dfca6c375d530908eedb7f103681c2493cf0ca3) --- sys/kern/uipc_ktls.c | 10 +++++----- sys/opencrypto/ktls.h | 2 +- sys/opencrypto/ktls_ocf.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/kern/uipc_ktls.c b/sys/kern/uipc_ktls.c index 91dfb8516308..b4b169c4daf2 100644 --- a/sys/kern/uipc_ktls.c +++ b/sys/kern/uipc_ktls.c @@ -1076,11 +1076,11 @@ ktls_use_sw(struct ktls_session *tls) } static int -ktls_try_sw(struct socket *so, struct ktls_session *tls, int direction) +ktls_try_sw(struct ktls_session *tls, int direction) { int error; - error = ktls_ocf_try(so, tls, direction); + error = ktls_ocf_try(tls, direction); if (error) return (error); ktls_use_sw(tls); @@ -1237,7 +1237,7 @@ ktls_enable_rx(struct socket *so, struct tls_enable *en) if (error) return (error); - error = ktls_ocf_try(so, tls, KTLS_RX); + error = ktls_ocf_try(tls, KTLS_RX); if (error) { ktls_free(tls); return (error); @@ -1318,7 +1318,7 @@ ktls_enable_tx(struct socket *so, struct tls_enable *en) #endif error = ktls_try_ifnet(so, tls, KTLS_TX, false); if (error) - error = ktls_try_sw(so, tls, KTLS_TX); + error = ktls_try_sw(tls, KTLS_TX); if (error) { ktls_free(tls); @@ -1503,7 +1503,7 @@ ktls_set_tx_mode(struct socket *so, int mode) if (mode == TCP_TLS_MODE_IFNET) error = ktls_try_ifnet(so, tls_new, KTLS_TX, true); else - error = ktls_try_sw(so, tls_new, KTLS_TX); + error = ktls_try_sw(tls_new, KTLS_TX); if (error) { counter_u64_add(ktls_switch_failed, 1); ktls_free(tls_new); diff --git a/sys/opencrypto/ktls.h b/sys/opencrypto/ktls.h index 0fe02b7f50f5..efba25e17013 100644 --- a/sys/opencrypto/ktls.h +++ b/sys/opencrypto/ktls.h @@ -48,7 +48,7 @@ struct ktls_ocf_encrypt_state { void ktls_encrypt_cb(struct ktls_ocf_encrypt_state *state, int error); void ktls_ocf_free(struct ktls_session *tls); -int ktls_ocf_try(struct socket *so, struct ktls_session *tls, int direction); +int ktls_ocf_try(struct ktls_session *tls, int direction); int ktls_ocf_encrypt(struct ktls_ocf_encrypt_state *state, struct ktls_session *tls, struct mbuf *m, struct iovec *outiov, int outiovcnt); diff --git a/sys/opencrypto/ktls_ocf.c b/sys/opencrypto/ktls_ocf.c index 0b9a07a9c83e..f61fb7f73b5d 100644 --- a/sys/opencrypto/ktls_ocf.c +++ b/sys/opencrypto/ktls_ocf.c @@ -983,7 +983,7 @@ ktls_ocf_free(struct ktls_session *tls) } int -ktls_ocf_try(struct socket *so, struct ktls_session *tls, int direction) +ktls_ocf_try(struct ktls_session *tls, int direction) { struct crypto_session_params csp, mac_csp, recrypt_csp; struct ktls_ocf_session *os;