Home | History | Annotate | Download | only in opencrypto

Lines Matching defs:fcr

226 	struct fcrypt *fcr = fp->f_fcrypt;
250 getnanotime(&fcr->atime);
279 error = cryptodev_session(fcr, sop);
297 fcr->mtime = fcr->atime;
299 error = cryptodev_msession(fcr, snop, sgop->count);
311 fcr->mtime = fcr->atime;
313 cse = csefind(fcr, ses);
318 csedelete(fcr, cse);
324 fcr->mtime = fcr->atime;
337 cryptodev_msessionfin(fcr, sfop->count, sesid);
343 fcr->mtime = fcr->atime;
345 cse = csefind(fcr, cop->ses);
356 fcr->mtime = fcr->atime;
369 error = cryptodev_mop(fcr, cnop, mop->count, curlwp);
383 fcr->mtime = fcr->atime;
396 error = cryptodev_mkey(fcr, knop, mkop->count);
408 fcr->mtime = fcr->atime;
423 crypt_ret->count = cryptodev_getmstatus(fcr, crypt_res,
439 error = cryptodev_getstatus(fcr, (struct crypt_result *)data);
895 struct fcrypt *fcr = fp->f_fcrypt;
899 while ((cse = TAILQ_FIRST(&fcr->csessions))) {
900 TAILQ_REMOVE(&fcr->csessions, cse, next);
905 seldestroy(&fcr->sinfo);
910 pool_put(&fcrpl, fcr);
915 struct csession *cryptodev_csefind(struct fcrypt *fcr, u_int ses)
917 return csefind(fcr, ses);
922 csefind(struct fcrypt *fcr, u_int ses)
927 TAILQ_FOREACH_SAFE(cse, &fcr->csessions, next, cnext)
936 csedelete(struct fcrypt *fcr, struct csession *cse_del)
942 TAILQ_FOREACH_SAFE(cse, &fcr->csessions, next, cnext) {
944 TAILQ_REMOVE(&fcr->csessions, cse, next);
952 cseadd(struct fcrypt *fcr, struct csession *cse)
956 if (fcr->sesn + 1 == 0) return NULL;
957 TAILQ_INSERT_TAIL(&fcr->csessions, cse, next);
958 cse->ses = fcr->sesn++;
964 csecreate(struct fcrypt *fcr, u_int64_t sid, void *key, u_int64_t keylen,
986 if (cseadd(fcr, cse))
1011 struct fcrypt *fcr;
1020 fcr = pool_get(&fcrpl, PR_WAITOK);
1021 getnanotime(&fcr->btime);
1022 fcr->atime = fcr->mtime = fcr->btime;
1024 TAILQ_INIT(&fcr->csessions);
1025 TAILQ_INIT(&fcr->crp_ret_mq);
1026 TAILQ_INIT(&fcr->crp_ret_mkq);
1027 selinit(&fcr->sinfo);
1032 fcr->sesn = 1;
1033 fcr->requestid = 1;
1036 return fd_clone(fp, fd, flag, &cryptofops, fcr);
1074 cryptodev_mop(struct fcrypt *fcr,
1087 cse = csefind(fcr, cnop[req].ses);
1247 crp->fcrp = fcr;
1291 cnop[req].reqid = atomic_inc_32_nv(&(fcr->requestid));
1314 cryptodev_mkey(struct fcrypt *fcr, struct crypt_n_kop *kop, int count)
1422 krp->fcrp = fcr;
1424 kop[req].crk_reqid = atomic_inc_32_nv(&(fcr->requestid));
1455 cryptodev_session(struct fcrypt *fcr, struct session_op *sop)
1658 cse = csecreate(fcr, sid, crie.cri_key, crie.cri_klen,
1686 cryptodev_msession(struct fcrypt *fcr, struct session_n_op *sn_ops,
1702 sn_ops->status = cryptodev_session(fcr, &s_op);
1711 cryptodev_msessionfin(struct fcrypt *fcr, int count, u_int32_t *sesid)
1718 cse = csefind(fcr, sesid[req]);
1721 csedelete(fcr, cse);
1735 cryptodev_getmstatus(struct fcrypt *fcr, struct crypt_result *crypt_res,
1759 crp = TAILQ_FIRST(&fcr->crp_ret_mq);
1761 TAILQ_REMOVE(&fcr->crp_ret_mq, crp, crp_next);
1766 cse = csefind(fcr, cse->ses);
1777 krp = TAILQ_FIRST(&fcr->crp_ret_mkq);
1779 TAILQ_REMOVE(&fcr->crp_ret_mkq, krp, krp_next);
1882 cryptodev_getstatus (struct fcrypt *fcr, struct crypt_result *crypt_res)
1892 TAILQ_FOREACH_SAFE(crp, &fcr->crp_ret_mq, crp_next, cnext) {
1896 cse = csefind(fcr, cse->ses);
1923 TAILQ_REMOVE(&fcr->crp_ret_mq, crp, crp_next);
1931 TAILQ_FOREACH_SAFE(krp, &fcr->crp_ret_mkq, krp_next, knext) {
1958 TAILQ_REMOVE(&fcr->crp_ret_mkq, krp, krp_next);
1983 struct fcrypt *fcr = fp->f_fcrypt;
1988 st->st_dev = makedev(cdevsw_lookup_major(&crypto_cdevsw), fcr->sesn);
1989 st->st_atimespec = fcr->atime;
1990 st->st_mtimespec = fcr->mtime;
1991 st->st_ctimespec = st->st_birthtimespec = fcr->btime;
2002 struct fcrypt *fcr = fp->f_fcrypt;
2011 if (TAILQ_EMPTY(&fcr->crp_ret_mq) && TAILQ_EMPTY(&fcr->crp_ret_mkq)) {
2013 selrecord(curlwp, &fcr->sinfo);