diff options
author | sam <sam@FreeBSD.org> | 2003-02-23 07:25:48 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2003-02-23 07:25:48 +0000 |
commit | 9da403e48c25f4100a1febdffa6b0aa4c372c7fa (patch) | |
tree | 155a5fdfbb58ff3efa24ed1044f606c88169ca24 /sys/opencrypto/cryptodev.c | |
parent | 2702599ca0d83dc1569763a7ca8e6efb644bef2b (diff) | |
download | FreeBSD-src-9da403e48c25f4100a1febdffa6b0aa4c372c7fa.zip FreeBSD-src-9da403e48c25f4100a1febdffa6b0aa4c372c7fa.tar.gz |
o add a CRYPTO_F_CBIMM flag to symmetric ops to indicate the callback
should be done in crypto_done rather than in the callback thread
o use this flag to mark operations from /dev/crypto since the callback
routine just does a wakeup; this eliminates the last unneeded ctx switch
o change CRYPTO_F_NODELAY to CRYPTO_F_BATCH with an inverted meaning
so "0" becomes the default/desired setting (needed for user-mode
compatibility with openbsd)
o change crypto_dispatch to honor CRYPTO_F_BATCH instead of always
dispatching immediately
o remove uses of CRYPTO_F_NODELAY
o define COP_F_BATCH for ops submitted through /dev/crypto and pass
this on to the op that is submitted
Similar changes and more eventually coming for asymmetric ops.
MFC if re gives approval.
Diffstat (limited to 'sys/opencrypto/cryptodev.c')
-rw-r--r-- | sys/opencrypto/cryptodev.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/opencrypto/cryptodev.c b/sys/opencrypto/cryptodev.c index 8b51d69..d8487f4 100644 --- a/sys/opencrypto/cryptodev.c +++ b/sys/opencrypto/cryptodev.c @@ -382,7 +382,8 @@ cryptodev_op( } crp->crp_ilen = cop->len; - crp->crp_flags = CRYPTO_F_IOV; + crp->crp_flags = CRYPTO_F_IOV | CRYPTO_F_CBIMM + | (cop->flags & COP_F_BATCH); crp->crp_buf = (caddr_t)&cse->uio; crp->crp_callback = (int (*) (struct cryptop *)) cryptodev_cb; crp->crp_sid = cse->sid; |