1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-24 11:29:10 +00:00

If a tunable for the routing socket netisr queue max is defined, allow it

to override the default value, rather than the default value overriding
the tunable.
This commit is contained in:
Robert Watson 2004-08-21 21:45:40 +00:00
parent 190a4c9436
commit b062951a3d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=134138

View File

@ -77,7 +77,6 @@ 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;
@ -105,8 +104,11 @@ static void rt_dispatch(struct mbuf *, const struct sockaddr *);
static void
rts_init(void)
{
int tmp;
rtsintrq.ifq_maxlen = 256;
if (TUNABLE_INT_FETCH("net.route.netisr_maxqlen", &tmp))
rtsintrq.ifq_maxlen = tmp;
mtx_init(&rtsintrq.ifq_mtx, "rts_inq", NULL, MTX_DEF);
netisr_register(NETISR_ROUTE, rts_input, &rtsintrq, NETISR_MPSAFE);
}