Page MenuHomeFreeBSD

OCF: Add crypto_clonereq().
ClosedPublic

Authored by jhb on Dec 21 2021, 9:39 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, May 11, 8:09 PM
Unknown Object (File)
Sat, May 11, 6:35 PM
Unknown Object (File)
Sat, May 11, 4:23 PM
Unknown Object (File)
Sun, Apr 28, 7:27 AM
Unknown Object (File)
Fri, Apr 26, 10:26 PM
Unknown Object (File)
Mar 14 2024, 4:46 PM
Unknown Object (File)
Mar 14 2024, 4:46 PM
Unknown Object (File)
Mar 11 2024, 4:45 AM

Details

Summary

This function clones an existing crypto request, but associates the
new request with a specified session. The intended use case is for
drivers to be able to fall back to software by cloning a request and
dispatch it to an internally allocated software session.

Sponsored by: Chelsio Communications

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jhb requested review of this revision.Dec 21 2021, 9:39 PM
pauamma_gundo.com added inline comments.
share/man/man9/crypto_request.9
84

For readability, but may be personal taste.

106

As above.

markj added inline comments.
share/man/man9/crypto_request.9
84

+1

sys/opencrypto/cryptodev.h
432

I'm not sure it makes sense to inherit CRYPTO_F_DONE given that the callback is not copied.

This revision is now accepted and ready to land.Dec 26 2021, 11:11 PM
sys/opencrypto/cryptodev.h
432

That is true, but in the intended use cases it should never be set. It may arguably be a bug (and worth asserting on?) if the flag is set in the source request? I can't think of any use cases where you want to clone a competed request. If the request failed with an error and you want to retry it (and maybe clone it as part of retrying), then I think you would want to clear DONE before doing the clone for example.

jhb marked 3 inline comments as done.Jan 4 2022, 10:18 PM
This revision was automatically updated to reflect the committed changes.