mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-30 13:44:55 +00:00
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
This commit is contained in:
parent
163cdf6a32
commit
5dfca6c375
|
@ -1153,11 +1153,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);
|
||||
|
@ -1314,7 +1314,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);
|
||||
|
@ -1407,7 +1407,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);
|
||||
|
@ -1599,7 +1599,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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -982,7 +982,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;
|
||||
|
|
Loading…
Reference in a new issue