svn commit: r345031 - stable/11/sys/opencrypto
John Baldwin
jhb at FreeBSD.org
Mon Mar 11 21:56:36 UTC 2019
Author: jhb
Date: Mon Mar 11 21:56:35 2019
New Revision: 345031
URL: https://svnweb.freebsd.org/changeset/base/345031
Log:
MFC 328057: Split crp_buf into a union.
This adds explicit crp_mbuf and crp_uio pointers of the right type to
replace casts of crp_buf. This does not sweep through changing existing
code, but new code should use the correct fields instead of casts.
Sponsored by: Chelsio Communications
Modified:
stable/11/sys/opencrypto/cryptodev.h
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/opencrypto/cryptodev.h
==============================================================================
--- stable/11/sys/opencrypto/cryptodev.h Mon Mar 11 21:51:15 2019 (r345030)
+++ stable/11/sys/opencrypto/cryptodev.h Mon Mar 11 21:56:35 2019 (r345031)
@@ -421,7 +421,11 @@ struct cryptop {
#define CRYPTO_F_DONE 0x0020 /* Operation completed */
#define CRYPTO_F_CBIFSYNC 0x0040 /* Do CBIMM if op is synchronous */
- caddr_t crp_buf; /* Data to be processed */
+ union {
+ caddr_t crp_buf; /* Data to be processed */
+ struct mbuf *crp_mbuf;
+ struct uio *crp_uio;
+ };
void * crp_opaque; /* Opaque pointer, passed along */
struct cryptodesc *crp_desc; /* Linked list of processing descriptors */
@@ -522,5 +526,6 @@ extern void crypto_copydata(int flags, caddr_t buf, in
caddr_t out);
extern int crypto_apply(int flags, caddr_t buf, int off, int len,
int (*f)(void *, void *, u_int), void *arg);
+
#endif /* _KERNEL */
#endif /* _CRYPTO_CRYPTO_H_ */
More information about the svn-src-stable-11
mailing list