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)
Sep 17 2024, 9:54 AM
Unknown Object (File)
Sep 17 2024, 12:58 AM
Unknown Object (File)
Sep 6 2024, 5:42 AM
Unknown Object (File)
Sep 3 2024, 1:13 PM
Unknown Object (File)
Aug 14 2024, 6:10 AM
Unknown Object (File)
Jul 30 2024, 2:22 AM
Unknown Object (File)
Jul 29 2024, 12:16 PM
Unknown Object (File)
Jul 13 2024, 2:22 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

Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 32373
Build 29854: arc lint + arc unit

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

Style doesn't require the extra newline anymore.

1795–1796

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
1795–1796

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.