Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Feb 2023 19:12:24 GMT
From:      Andrew Gallatin <gallatin@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: d24b032bec1b - main - ktls: Fix comments & whitespace issues with c0e4090e3d43
Message-ID:  <202302091912.319JCOa8069462@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by gallatin:

URL: https://cgit.FreeBSD.org/src/commit/?id=d24b032bec1b868b99fd1f3f23ec8116cd719e94

commit d24b032bec1b868b99fd1f3f23ec8116cd719e94
Author:     Andrew Gallatin <gallatin@FreeBSD.org>
AuthorDate: 2023-02-09 19:09:05 +0000
Commit:     Andrew Gallatin <gallatin@FreeBSD.org>
CommitDate: 2023-02-09 19:11:24 +0000

    ktls: Fix comments & whitespace issues with c0e4090e3d43
    
    Address some last minute review feedback on c0e4090e3d43
    by fixing spacing around comments, and clarifying that the
    newly added destroy_task is not related to tls 1.0.
    No functional change intended.
    
    Pointed out by: jhb
    Sponsored by: Netflix
---
 sys/kern/uipc_ktls.c | 3 ++-
 sys/sys/ktls.h       | 2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/sys/kern/uipc_ktls.c b/sys/kern/uipc_ktls.c
index b3895aee9249..cb2e3f272774 100644
--- a/sys/kern/uipc_ktls.c
+++ b/sys/kern/uipc_ktls.c
@@ -1478,6 +1478,7 @@ ktls_set_tx_mode(struct socket *so, int mode)
 		/* Don't allow enabling ifnet ktls multiple times */
 		if (tp->t_nic_ktls_xmit)
 			return (EALREADY);
+
 		/*
 		 * Don't enable ifnet ktls if we disabled it due to an
 		 * excessive retransmission rate
@@ -1850,7 +1851,6 @@ ktls_destroy(struct ktls_session *tls)
 			 * know that we don't hold the inp rlock, and
 			 * can safely take the wlock
 			 */
-
 			if (curthread->td_rw_rlocks == 0) {
 				INP_WLOCK(inp);
 			} else {
@@ -3335,6 +3335,7 @@ ktls_disable_ifnet(void *arg)
 		SOCK_UNLOCK(so);
 		return;
 	}
+
 	/*
 	 * note that t_nic_ktls_xmit_dis is never cleared; disabling
 	 * ifnet can only be done once per connection, so we never want
diff --git a/sys/sys/ktls.h b/sys/sys/ktls.h
index 909d5347bc47..549ce3ee869d 100644
--- a/sys/sys/ktls.h
+++ b/sys/sys/ktls.h
@@ -201,6 +201,8 @@ struct ktls_session {
 	/* Only used for TLS 1.0. */
 	uint64_t next_seqno;
 	STAILQ_HEAD(, mbuf) pending_records;
+
+	/* Used to destroy any kTLS session */
 	struct task destroy_task;
 } __aligned(CACHE_LINE_SIZE);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202302091912.319JCOa8069462>