Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Jan 2018 19:41:18 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r328057 - head/sys/opencrypto
Message-ID:  <201801161941.w0GJfIC7032893@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Tue Jan 16 19:41:18 2018
New Revision: 328057
URL: https://svnweb.freebsd.org/changeset/base/328057

Log:
  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.
  
  Reviewed by:	kib
  Sponsored by:	Chelsio Communications
  Differential Revision:	https://reviews.freebsd.org/D13927

Modified:
  head/sys/opencrypto/cryptodev.h

Modified: head/sys/opencrypto/cryptodev.h
==============================================================================
--- head/sys/opencrypto/cryptodev.h	Tue Jan 16 19:29:32 2018	(r328056)
+++ head/sys/opencrypto/cryptodev.h	Tue Jan 16 19:41:18 2018	(r328057)
@@ -425,7 +425,11 @@ struct cryptop {
 					 * if CRYPTO_F_ASYNC flags is set
 					 */
 
-	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 */
 
@@ -538,5 +542,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_ */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801161941.w0GJfIC7032893>