From owner-freebsd-bugs@FreeBSD.ORG Sat Jan 14 21:10:20 2012 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E34C10656E4 for ; Sat, 14 Jan 2012 21:10:20 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id C67738FC0A for ; Sat, 14 Jan 2012 21:10:15 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q0ELAFK4069396 for ; Sat, 14 Jan 2012 21:10:15 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q0ELAFQH069395; Sat, 14 Jan 2012 21:10:15 GMT (envelope-from gnats) Resent-Date: Sat, 14 Jan 2012 21:10:15 GMT Resent-Message-Id: <201201142110.q0ELAFQH069395@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Eugen Konkov Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4291C1065677 for ; Sat, 14 Jan 2012 21:02:44 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 132938FC12 for ; Sat, 14 Jan 2012 21:02:44 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q0EL2hdq036279 for ; Sat, 14 Jan 2012 21:02:43 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id q0EL2h0R036278; Sat, 14 Jan 2012 21:02:43 GMT (envelope-from nobody) Message-Id: <201201142102.q0EL2h0R036278@red.freebsd.org> Date: Sat, 14 Jan 2012 21:02:43 GMT From: Eugen Konkov To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: misc/164130: broken netisr initialization X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2012 21:10:20 -0000 >Number: 164130 >Category: misc >Synopsis: broken netisr initialization >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Jan 14 21:10:15 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Eugen Konkov >Release: 10.0-CURRENT >Organization: ISP FreeLine >Environment: # uname -a FreeBSD meta-up 10.0-CURRENT FreeBSD 10.0-CURRENT #8 r230107M: Sat Jan 14 21:02:14 EET 2012 adm@meta-up:/usr/obj/usr/src.svn/head10/sys/KES_KERN_v10 i386 >Description: netisr has been broken in r230059 and after booting there are conflicting values in sysctl net.isr >How-To-Repeat: just run: #sysctl net.isr # sysctl net.isr net.isr.direct: 0 net.isr.direct_force: 0 net.isr.dispatch: direct for net.isr.dispatch=direct is conflicting with values direct=0 and direct_force=0 >Fix: you must call netisr_dispatch_policy_compat() in any case dispite on net.isr.dispatch is set or not in /boot/loader.conf Index: src/sys/net/netisr.c =================================================================== --- src/sys/net/netisr.c (revision 230107) +++ src/sys/net/netisr.c (working copy) @@ -1201,13 +1201,14 @@ error = EINVAL; if (error == 0) { netisr_dispatch_policy = dispatch_policy; - netisr_dispatch_policy_compat(); } else printf( "%s: invalid dispatch policy %s, using default\n", __func__, tmp); } + netisr_dispatch_policy_compat(); + netisr_start_swi(curcpu, pcpu_find(curcpu)); } SYSINIT(netisr_init, SI_SUB_SOFTINTR, SI_ORDER_FIRST, netisr_init, NULL); or send way: you must setup default values for direct and direct_force to 1 because of default dispatcher is 'direct' Index: src/sys/net/netisr.c =================================================================== --- src/sys/net/netisr.c (revision 230107) +++ src/sys/net/netisr.c (working copy) @@ -158,11 +158,11 @@ * dispatch policy state. Now, we provide read-only export via them so that * older netstat binaries work. At some point they can be garbage collected. */ -static int netisr_direct_force; +static int netisr_direct_force = 1; SYSCTL_INT(_net_isr, OID_AUTO, direct_force, CTLFLAG_RD, &netisr_direct_force, 0, "compat: force direct dispatch"); -static int netisr_direct; +static int netisr_direct = 1; SYSCTL_INT(_net_isr, OID_AUTO, direct, CTLFLAG_RD, &netisr_direct, 0, "compat: enable direct dispatch"); But I think first way is more right way *Sponsored by ISP FreeLine, Eugen Konkov >Release-Note: >Audit-Trail: >Unformatted: