Page MenuHomeFreeBSD

OCF: Add crypto_clonereq().
ClosedPublic

Authored by jhb on Dec 21 2021, 9:39 PM.
Tags
None
Referenced Files
F104003135: D33607.id.diff
Mon, Dec 2, 6:46 AM
F104002859: D33607.id100433.diff
Mon, Dec 2, 6:41 AM
F104002856: D33607.id100946.diff
Mon, Dec 2, 6:41 AM
F104002041: D33607.diff
Mon, Dec 2, 6:24 AM
Unknown Object (File)
Thu, Nov 28, 5:46 AM
Unknown Object (File)
Wed, Nov 20, 5:55 PM
Unknown Object (File)
Sun, Nov 17, 2:38 PM
Unknown Object (File)
Tue, Nov 12, 8:44 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.