Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/opencrypto make the default values of q_maxlen build par...
details: https://anonhg.NetBSD.org/src/rev/59ff9e3582bb
branches: trunk
changeset: 824119:59ff9e3582bb
user: knakahara <knakahara%NetBSD.org@localhost>
date: Wed May 24 10:05:09 2017 +0000
description:
make the default values of q_maxlen build parameters.
diffstat:
sys/opencrypto/crypto.c | 19 ++++++++++++-------
sys/opencrypto/files.opencrypto | 3 ++-
2 files changed, 14 insertions(+), 8 deletions(-)
diffs (65 lines):
diff -r e46ac7311783 -r 59ff9e3582bb sys/opencrypto/crypto.c
--- a/sys/opencrypto/crypto.c Wed May 24 09:57:36 2017 +0000
+++ b/sys/opencrypto/crypto.c Wed May 24 10:05:09 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: crypto.c,v 1.74 2017/05/24 09:57:36 knakahara Exp $ */
+/* $NetBSD: crypto.c,v 1.75 2017/05/24 10:05:09 knakahara Exp $ */
/* $FreeBSD: src/sys/opencrypto/crypto.c,v 1.4.2.5 2003/02/26 00:14:05 sam Exp $ */
/* $OpenBSD: crypto.c,v 1.41 2002/07/17 23:52:38 art Exp $ */
@@ -53,7 +53,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: crypto.c,v 1.74 2017/05/24 09:57:36 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: crypto.c,v 1.75 2017/05/24 10:05:09 knakahara Exp $");
#include <sys/param.h>
#include <sys/reboot.h>
@@ -131,9 +131,8 @@
#define DEFINIT_CRYPTO_Q_DROPS(name) \
static int crypto_##name##_drops = 0
-#define CRYPTO_Q_MAXLEN 0
-#define DEFINIT_CRYPTO_Q_MAXLEN(name) \
- static int crypto_##name##_maxlen = CRYPTO_Q_MAXLEN
+#define DEFINIT_CRYPTO_Q_MAXLEN(name, defval) \
+ static int crypto_##name##_maxlen = defval
#define CRYPTO_Q_INC(name) \
do { \
@@ -166,12 +165,18 @@
DEFINIT_CRYPTO_Q_DROPS(crp_ret_q);
DEFINIT_CRYPTO_Q_DROPS(crp_ret_kq);
+#ifndef CRYPTO_RET_Q_MAXLEN
+#define CRYPTO_RET_Q_MAXLEN 0
+#endif
+#ifndef CRYPTO_RET_KQ_MAXLEN
+#define CRYPTO_RET_KQ_MAXLEN 0
+#endif
/*
* queue length limit.
* default value is 0. <=0 means unlimited.
*/
-DEFINIT_CRYPTO_Q_MAXLEN(crp_ret_q);
-DEFINIT_CRYPTO_Q_MAXLEN(crp_ret_kq);
+DEFINIT_CRYPTO_Q_MAXLEN(crp_ret_q, CRYPTO_RET_Q_MAXLEN);
+DEFINIT_CRYPTO_Q_MAXLEN(crp_ret_kq, CRYPTO_RET_KQ_MAXLEN);
/*
* TODO:
diff -r e46ac7311783 -r 59ff9e3582bb sys/opencrypto/files.opencrypto
--- a/sys/opencrypto/files.opencrypto Wed May 24 09:57:36 2017 +0000
+++ b/sys/opencrypto/files.opencrypto Wed May 24 10:05:09 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.opencrypto,v 1.25 2011/11/19 22:51:30 tls Exp $
+# $NetBSD: files.opencrypto,v 1.26 2017/05/24 10:05:09 knakahara Exp $
#
#
@@ -28,3 +28,4 @@
file opencrypto/ocryptodev.c crypto & compat_50
defflag opt_ocf.h CRYPTO_DEBUG CRYPTO_TIMING
+defparam opt_ocf.h CRYPTO_RET_Q_MAXLEN CRYPTO_RET_KQ_MAXLEN
Home |
Main Index |
Thread Index |
Old Index