Page MenuHomeFreeBSD

OCF: Add crypto_clonereq().
ClosedPublic

Authored by jhb on Dec 21 2021, 9:39 PM.
Tags
None
Referenced Files
F96243577: D33607.diff
Tue, Sep 24, 4:52 AM
F96187032: D33607.id.diff
Tue, Sep 24, 12:19 AM
Unknown Object (File)
Sun, Sep 22, 11:46 PM
Unknown Object (File)
Sun, Sep 22, 7:59 AM
Unknown Object (File)
Sat, Sep 21, 8:38 PM
Unknown Object (File)
Wed, Sep 18, 4:11 AM
Unknown Object (File)
Thu, Sep 5, 7:16 AM
Unknown Object (File)
Thu, Sep 5, 4:40 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.