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.h | |
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.h')
-rw-r--r-- | sys/opencrypto/cryptodev.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/opencrypto/cryptodev.h b/sys/opencrypto/cryptodev.h index 964f383..b9d22d5 100644 --- a/sys/opencrypto/cryptodev.h +++ b/sys/opencrypto/cryptodev.h @@ -122,7 +122,8 @@ struct crypt_op { u_int16_t op; /* i.e. COP_ENCRYPT */ #define COP_ENCRYPT 1 #define COP_DECRYPT 2 - u_int16_t flags; /* always 0 */ + u_int16_t flags; +#define COP_F_BATCH 0x0008 /* Batch op if possible */ u_int len; caddr_t src, dst; /* become iov[] inside kernel */ caddr_t mac; /* must be big enough for chosen MAC */ @@ -261,7 +262,8 @@ struct cryptop { #define CRYPTO_F_IMBUF 0x0001 /* Input/output are mbuf chains, otherwise contig */ #define CRYPTO_F_IOV 0x0002 /* Input/output are uio */ #define CRYPTO_F_REL 0x0004 /* Must return data in same place */ -#define CRYPTO_F_NODELAY 0x0008 /* Dispatch as quickly as possible */ +#define CRYPTO_F_BATCH 0x0008 /* Batch op if possible */ +#define CRYPTO_F_CBIMM 0x0010 /* Do callback immediately */ caddr_t crp_buf; /* Data to be processed */ caddr_t crp_opaque; /* Opaque pointer, passed along */ |