zero copy functions separated from rest.
[cryptodev-linux.git] / zc.h
blobe9f4cd4f5809dcc6269a6d426ed75a030f00579d
1 /* For zero copy */
2 int __get_userbuf(uint8_t __user *addr, uint32_t len, int write,
3 int pgcount, struct page **pg, struct scatterlist *sg,
4 struct task_struct *task, struct mm_struct *mm);
5 void release_user_pages(struct page **pg, int pagecount);
7 /* last page - first page + 1 */
8 #define PAGECOUNT(buf, buflen) \
9 ((((unsigned long)(buf + buflen - 1) & PAGE_MASK) >> PAGE_SHIFT) - \
10 (((unsigned long) buf & PAGE_MASK) >> PAGE_SHIFT) + 1)
12 #define DEFAULT_PREALLOC_PAGES 32