Author: jhb Date: Tue Sep 29 21:51:32 2020 New Revision: 366269 URL: https://svnweb.freebsd.org/changeset/base/366269
Log: Fallback to software for more GCM and CCM requests. ccr(4) uses software to handle GCM and CCM requests not supported by the crypto engine (e.g. with only AAD and no payload). This change adds a fallback for a few more requests such as those with more SGL entries than can fit in a work request (this can happen for GCM when decrypting a TLS record split across 15 or more packets). Reported by: Chelsio QA Reviewed by: np Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D26582 Modified: head/sys/dev/cxgbe/crypto/t4_crypto.c Modified: head/sys/dev/cxgbe/crypto/t4_crypto.c ============================================================================== --- head/sys/dev/cxgbe/crypto/t4_crypto.c Tue Sep 29 20:46:25 2020 (r366268) +++ head/sys/dev/cxgbe/crypto/t4_crypto.c Tue Sep 29 21:51:32 2020 (r366269) @@ -2777,7 +2777,7 @@ ccr_process(device_t dev, struct cryptop *crp, int hin return (0); } error = ccr_gcm(sc, s, crp); - if (error == EMSGSIZE) { + if (error == EMSGSIZE || error == EFBIG) { counter_u64_add(sc->stats_sw_fallback, 1); mtx_unlock(&s->lock); ccr_gcm_soft(s, crp); @@ -2796,7 +2796,7 @@ ccr_process(device_t dev, struct cryptop *crp, int hin csp->csp_cipher_klen); } error = ccr_ccm(sc, s, crp); - if (error == EMSGSIZE) { + if (error == EMSGSIZE || error == EFBIG) { counter_u64_add(sc->stats_sw_fallback, 1); mtx_unlock(&s->lock); ccr_ccm_soft(s, crp); _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"