Changeset View
Changeset View
Standalone View
Standalone View
share/man/man9/crypto_request.9
Show All 24 Lines | |||||
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||||
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||||
.\" POSSIBILITY OF SUCH DAMAGE. | .\" POSSIBILITY OF SUCH DAMAGE. | ||||
.\" | .\" | ||||
.\" * Other names and brands may be claimed as the property of others. | .\" * Other names and brands may be claimed as the property of others. | ||||
.\" | .\" | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd January 4, 2022 | .Dd November 2, 2022 | ||||
.Dt CRYPTO_REQUEST 9 | .Dt CRYPTO_REQUEST 9 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm crypto_request | .Nm crypto_request | ||||
.Nd symmetric cryptographic operations | .Nd symmetric cryptographic operations | ||||
.Sh SYNOPSIS | .Sh SYNOPSIS | ||||
.In opencrypto/cryptodev.h | .In opencrypto/cryptodev.h | ||||
.Ft "struct cryptop *" | .Ft "struct cryptop *" | ||||
▲ Show 20 Lines • Show All 394 Lines • ▼ Show 20 Lines | |||||
.Fn crypto_done . | .Fn crypto_done . | ||||
If | If | ||||
.Dv CRYPTO_F_CBIFSYNC | .Dv CRYPTO_F_CBIFSYNC | ||||
is set, | is set, | ||||
the callback is invoked synchronously if the request was processed by a | the callback is invoked synchronously if the request was processed by a | ||||
software driver or asynchronously if the request was processed by a | software driver or asynchronously if the request was processed by a | ||||
hardware driver. | hardware driver. | ||||
.Pp | .Pp | ||||
If a request was scheduled to the taskqueue via | If a request was scheduled to the taskqueue with | ||||
.Dv CRYPTO_F_ASYNC , | .Dv CRYPTO_F_ASYNC_ORDERED , | ||||
markj: Consumers shouldn't be setting CRYPTO_F_ASYNC_ORDERED directly. | |||||
asomersAuthorUnsubmitted Done Inline ActionsAhh, good catch. asomers: Ahh, good catch. | |||||
callbacks are always invoked asynchronously ignoring | callbacks are always invoked asynchronously ignoring | ||||
.Dv CRYPTO_F_CBIMM | .Dv CRYPTO_F_CBIMM | ||||
and | and | ||||
.Dv CRYPTO_F_CBIFSYNC . | .Dv CRYPTO_F_CBIFSYNC . | ||||
In this case, | |||||
.Dv CRYPTO_F_ASYNC_KEEPORDER | |||||
may be set to ensure that callbacks for requests on a given session are | |||||
invoked in the same order that requests were queued to the session via | |||||
.Fn crypto_dispatch . | |||||
This flag is used by IPsec to ensure that decrypted network packets are | This flag is used by IPsec to ensure that decrypted network packets are | ||||
passed up the network stack in roughly the same order they were received. | passed up the network stack in roughly the same order they were received. | ||||
.Ss Other Request Fields | .Ss Other Request Fields | ||||
In addition to the fields and flags enumerated above, | In addition to the fields and flags enumerated above, | ||||
.Vt struct cryptop | .Vt struct cryptop | ||||
includes the following: | includes the following: | ||||
.Bl -tag -width crp_payload_length | .Bl -tag -width crp_payload_length | ||||
.It Fa crp_session | .It Fa crp_session | ||||
▲ Show 20 Lines • Show All 83 Lines • Show Last 20 Lines |
Consumers shouldn't be setting CRYPTO_F_ASYNC_ORDERED directly.