Lines Matching defs:cop
230 struct crypt_op *cop;
344 cop = (struct crypt_op *)data;
345 cse = csefind(fcr, cop->ses);
351 error = cryptodev_op(cse, cop, curlwp);
454 cryptodev_op(struct csession *cse, struct crypt_op *cop, struct lwp *l)
459 int iov_len = cop->len;
463 if (cop->len > 256*1024-4)
467 if (cop->len < cse->txform->blocksize
468 + (cop->iv ? 0 : cse->txform->ivsize) ||
469 (cop->len - (cop->iv ? 0 : cse->txform->ivsize))
479 if ((cse->tcomp) && cop->dst_len) {
480 if (iov_len < cop->dst_len) {
482 iov_len = cop->dst_len;
536 DPRINTF("ocf[%u]: iov_len %zu, cop->len %u\n",
539 cop->len);
541 if ((error = copyin(cop->src, cse->uio.uio_iov[0].iov_base, cop->len)))
543 printf("copyin failed %s %d \n", (char *)cop->src, error);
548 switch (cop->op) {
559 if (cop->flags & COP_F_MORE) {
562 crdc->crd_len = cop->len;
574 crda->crd_len = cop->len;
584 switch (cop->op) {
594 crde->crd_len = cop->len;
609 crp->crp_ilen = cop->len;
610 crp->crp_flags = CRYPTO_F_IOV | (cop->flags & COP_F_BATCH) | flags;
616 if (cop->iv) {
625 if ((error = copyin(cop->iv, cse->tmp_iv,
642 if (cop->mac) {
676 if (crp->crp_olen > (cop->dst_len ? cop->dst_len : cop->len)) {
680 dst_len = cop->dst_len = crp->crp_olen;
683 if (cop->dst) {
684 DPRINTF("copyout %d bytes to %p\n", dst_len, cop->dst);
686 if (cop->dst &&
687 (error = copyout(cse->uio.uio_iov[0].iov_base, cop->dst, dst_len)))
693 if (cop->mac &&
694 (error = copyout(crp->crp_mac, cop->mac, cse->thash->authsize))) {