MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ktls_try_ifnet

Function ktls_try_ifnet

freebsd/kern/uipc_ktls.c:892–912  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

890}
891
892static int
893ktls_try_ifnet(struct socket *so, struct ktls_session *tls, bool force)
894{
895 struct m_snd_tag *mst;
896 int error;
897
898 error = ktls_alloc_snd_tag(so->so_pcb, tls, force, &mst);
899 if (error == 0) {
900 tls->mode = TCP_TLS_MODE_IFNET;
901 tls->snd_tag = mst;
902 switch (tls->params.cipher_algorithm) {
903 case CRYPTO_AES_CBC:
904 counter_u64_add(ktls_ifnet_cbc, 1);
905 break;
906 case CRYPTO_AES_NIST_GCM_16:
907 counter_u64_add(ktls_ifnet_gcm, 1);
908 break;
909 }
910 }
911 return (error);
912}
913
914static int
915ktls_try_sw(struct socket *so, struct ktls_session *tls, int direction)

Callers 2

ktls_enable_txFunction · 0.85
ktls_set_tx_modeFunction · 0.85

Calls 2

ktls_alloc_snd_tagFunction · 0.85
counter_u64_addFunction · 0.50

Tested by

no test coverage detected