Page MenuHomeFreeBSD

Add crypto_initreq() and crypto_destroyreq().
ClosedPublic

Authored by jhb on Jul 16 2020, 6:24 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 21 2024, 10:27 AM
Unknown Object (File)
Feb 2 2024, 9:45 PM
Unknown Object (File)
Dec 31 2023, 12:50 AM
Unknown Object (File)
Dec 25 2023, 6:51 AM
Unknown Object (File)
Dec 22 2023, 10:08 PM
Unknown Object (File)
Nov 13 2023, 4:22 PM
Unknown Object (File)
Jul 22 2023, 5:02 AM
Unknown Object (File)
Jul 5 2023, 1:08 PM
Subscribers

Details

Summary

These routines are similar to crypto_getreq() and crypto_freereq()
but operate on caller-supplied storage instead of allocating crypto
requests from a UMA zone.

Test Plan
  • used this with some KTLS performance testing

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jhb requested review of this revision.Jul 16 2020, 6:24 PM
jhb created this revision.

LGTM aside from the comments.

sys/opencrypto/crypto.c
1768 ↗(On Diff #74534)

Style doesn't require the extra newline anymore.

1796 ↗(On Diff #74534)

This needs to be conditional on crp != NULL.

This revision is now accepted and ready to land.Jul 16 2020, 6:30 PM
jhb added a subscriber: asomers.

Added @asomers since Alan's been looking at GELI stuff. One of the things I changed in the OCF rework was to make GELI use crypto_getreq instead of preallocating space for the crypto requests along with other data it was already allocating. That part could be reverted now to using this API instead and doing fewer allocations. (It's still better than the old OCF bits that needed the crd's as well as the crp).

jhb marked 2 inline comments as done.Jul 16 2020, 8:16 PM
jhb added inline comments.
sys/opencrypto/crypto.c
1796 ↗(On Diff #74534)

Oof, this is an old bug from when I added the 'how' flag to support M_NOWAIT.

jhb marked an inline comment as done.
  • Review feedback.
This revision now requires review to proceed.Jul 16 2020, 9:17 PM
This revision is now accepted and ready to land.Jul 16 2020, 9:19 PM
This revision was automatically updated to reflect the committed changes.