crypto.c (116924) | crypto.c (117058) |
---|---|
1/* $OpenBSD: crypto.c,v 1.38 2002/06/11 11:14:29 beck Exp $ */ 2/* 3 * The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu) 4 * 5 * This code was written by Angelos D. Keromytis in Athens, Greece, in 6 * February 2000. Network Security Technologies Inc. (NSTI) kindly 7 * supported the development of this code. 8 * --- 7 unchanged lines hidden (view full) --- 16 * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR 17 * IMPLIED WARRANTY. IN PARTICULAR, NONE OF THE AUTHORS MAKES ANY 18 * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE 19 * MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR 20 * PURPOSE. 21 */ 22 23#include <sys/cdefs.h> | 1/* $OpenBSD: crypto.c,v 1.38 2002/06/11 11:14:29 beck Exp $ */ 2/* 3 * The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu) 4 * 5 * This code was written by Angelos D. Keromytis in Athens, Greece, in 6 * February 2000. Network Security Technologies Inc. (NSTI) kindly 7 * supported the development of this code. 8 * --- 7 unchanged lines hidden (view full) --- 16 * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR 17 * IMPLIED WARRANTY. IN PARTICULAR, NONE OF THE AUTHORS MAKES ANY 18 * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE 19 * MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR 20 * PURPOSE. 21 */ 22 23#include <sys/cdefs.h> |
24__FBSDID("$FreeBSD: head/sys/opencrypto/crypto.c 116924 2003-06-27 20:07:10Z sam $"); | 24__FBSDID("$FreeBSD: head/sys/opencrypto/crypto.c 117058 2003-06-30 05:09:32Z sam $"); |
25 26#define CRYPTO_TIMING /* enable timing support */ 27 28#include <sys/param.h> 29#include <sys/systm.h> 30#include <sys/eventhandler.h> 31#include <sys/kernel.h> 32#include <sys/kthread.h> --- 912 unchanged lines hidden (view full) --- 945 ("crypto_done: op already done, flags 0x%x", crp->crp_flags)); 946 crp->crp_flags |= CRYPTO_F_DONE; 947 if (crp->crp_etype != 0) 948 cryptostats.cs_errs++; 949#ifdef CRYPTO_TIMING 950 if (crypto_timing) 951 crypto_tstat(&cryptostats.cs_done, &crp->crp_tstamp); 952#endif | 25 26#define CRYPTO_TIMING /* enable timing support */ 27 28#include <sys/param.h> 29#include <sys/systm.h> 30#include <sys/eventhandler.h> 31#include <sys/kernel.h> 32#include <sys/kthread.h> --- 912 unchanged lines hidden (view full) --- 945 ("crypto_done: op already done, flags 0x%x", crp->crp_flags)); 946 crp->crp_flags |= CRYPTO_F_DONE; 947 if (crp->crp_etype != 0) 948 cryptostats.cs_errs++; 949#ifdef CRYPTO_TIMING 950 if (crypto_timing) 951 crypto_tstat(&cryptostats.cs_done, &crp->crp_tstamp); 952#endif |
953 if (crp->crp_flags & CRYPTO_F_CBIMM) { | 953 /* 954 * CBIMM means unconditionally do the callback immediately; 955 * CBIFSYNC means do the callback immediately only if the 956 * operation was done synchronously. Both are used to avoid 957 * doing extraneous context switches; the latter is mostly 958 * used with the software crypto driver. 959 */ 960 if ((crp->crp_flags & CRYPTO_F_CBIMM) || 961 ((crp->crp_flags & CRYPTO_F_CBIFSYNC) && 962 (CRYPTO_SESID2CAPS(crp->crp_sid) & CRYPTOCAP_F_SYNC))) { |
954 /* 955 * Do the callback directly. This is ok when the 956 * callback routine does very little (e.g. the 957 * /dev/crypto callback method just does a wakeup). 958 */ 959#ifdef CRYPTO_TIMING 960 if (crypto_timing) { 961 /* --- 277 unchanged lines hidden --- | 963 /* 964 * Do the callback directly. This is ok when the 965 * callback routine does very little (e.g. the 966 * /dev/crypto callback method just does a wakeup). 967 */ 968#ifdef CRYPTO_TIMING 969 if (crypto_timing) { 970 /* --- 277 unchanged lines hidden --- |