summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2004-08-21 21:20:06 +0000
committerrwatson <rwatson@FreeBSD.org>2004-08-21 21:20:06 +0000
commite40f2287d8b719cc8c56dee669fbc022ddc934cc (patch)
treeeeff33cd4044d560f15e3f417a6628a6049d1b5c /sys
parent2acdd880f4604706669461ec3a52a73bb41dd081 (diff)
downloadFreeBSD-src-e40f2287d8b719cc8c56dee669fbc022ddc934cc.zip
FreeBSD-src-e40f2287d8b719cc8c56dee669fbc022ddc934cc.tar.gz
Allow the size of the routing socket netisr queue to be configured using
the tunable or sysctl 'net.route.netisr_maxqlen'. Default the maximum depth to 256 rather than IFQ_MAXLEN due to the downsides of dropping routing messages. MT5 candidate. Discussed with: mdodd, mlaier, Vincent Jardin <jardin at 6wind.com>
Diffstat (limited to 'sys')
-rw-r--r--sys/net/rtsock.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c
index 85d763b..fb5def4 100644
--- a/sys/net/rtsock.c
+++ b/sys/net/rtsock.c
@@ -74,6 +74,11 @@ MTX_SYSINIT(rtsock, &rtsock_mtx, "rtsock route_cb lock", MTX_DEF);
static struct ifqueue rtsintrq;
+SYSCTL_NODE(_net, OID_AUTO, route, CTLFLAG_RD, 0, "");
+SYSCTL_INT(_net_route, OID_AUTO, netisr_maxqlen, CTLFLAG_RW,
+ &rtsintrq.ifq_maxlen, 0, "maximum routing socket dispatch queue length");
+TUNABLE_INT("net.route.netisr_maxqlen", &rtsintrq.ifq_maxlen);
+
struct walkarg {
int w_tmemsize;
int w_op, w_arg;
@@ -101,7 +106,7 @@ static void
rts_init(void)
{
- IFQ_SET_MAXLEN(&rtsintrq, IFQ_MAXLEN);
+ rtsintrq.ifq_maxlen = 256;
mtx_init(&rtsintrq.ifq_mtx, "rts_inq", NULL, MTX_DEF);
netisr_register(NETISR_ROUTE, rts_input, &rtsintrq, NETISR_MPSAFE);
}
OpenPOWER on IntegriCloud