0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef _CRYPTO_PCRYPT_H
0010 #define _CRYPTO_PCRYPT_H
0011
0012 #include <linux/container_of.h>
0013 #include <linux/crypto.h>
0014 #include <linux/padata.h>
0015
0016 struct pcrypt_request {
0017 struct padata_priv padata;
0018 void *data;
0019 void *__ctx[] CRYPTO_MINALIGN_ATTR;
0020 };
0021
0022 static inline void *pcrypt_request_ctx(struct pcrypt_request *req)
0023 {
0024 return req->__ctx;
0025 }
0026
0027 static inline
0028 struct padata_priv *pcrypt_request_padata(struct pcrypt_request *req)
0029 {
0030 return &req->padata;
0031 }
0032
0033 static inline
0034 struct pcrypt_request *pcrypt_padata_request(struct padata_priv *padata)
0035 {
0036 return container_of(padata, struct pcrypt_request, padata);
0037 }
0038
0039 #endif