Page MenuHomeFreeBSD

OCF: Add crypto_clonereq().
ClosedPublic

Authored by jhb on Dec 21 2021, 9:39 PM.
Tags
None
Referenced Files
F102401269: D33607.id100433.diff
Mon, Nov 11, 6:32 PM
Unknown Object (File)
Fri, Nov 1, 2:00 AM
Unknown Object (File)
Fri, Nov 1, 1:59 AM
Unknown Object (File)
Fri, Nov 1, 1:59 AM
Unknown Object (File)
Fri, Nov 1, 1:40 AM
Unknown Object (File)
Sat, Oct 19, 1:01 PM
Unknown Object (File)
Sep 28 2024, 5:52 AM
Unknown Object (File)
Sep 28 2024, 5:52 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.