If kernel doesn't indicate the accelerated ciphers base the decision on known chips.
[cryptodev-linux.git] / zc.h
blobf8e8727370d5810704a84c3d11356be953c3fa2e
1 #ifndef ZC_H
2 # define ZC_H
4 #include "cryptodev_int.h"
6 /* For zero copy */
7 int __get_userbuf(uint8_t __user *addr, uint32_t len, int write,
8 int pgcount, struct page **pg, struct scatterlist *sg,
9 struct task_struct *task, struct mm_struct *mm);
10 void release_user_pages(struct csession* ses);
12 int get_userbuf(struct csession *ses, void* __user src, int src_len,
13 void* __user dst, int dst_len,
14 struct task_struct *task, struct mm_struct *mm,
15 struct scatterlist **src_sg,
16 struct scatterlist **dst_sg);
18 /* last page - first page + 1 */
19 #define PAGECOUNT(buf, buflen) \
20 ((((unsigned long)(buf + buflen - 1) & PAGE_MASK) >> PAGE_SHIFT) - \
21 (((unsigned long) buf & PAGE_MASK) >> PAGE_SHIFT) + 1)
23 #define DEFAULT_PREALLOC_PAGES 32
25 #endif