From owner-freebsd-bugs@FreeBSD.ORG Tue Nov 17 01:30:02 2009 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 AA747106566B for ; Tue, 17 Nov 2009 01:30:02 +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 887708FC18 for ; Tue, 17 Nov 2009 01:30:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id nAH1U2Pp055292 for ; Tue, 17 Nov 2009 01:30:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id nAH1U2vx055289; Tue, 17 Nov 2009 01:30:02 GMT (envelope-from gnats) Resent-Date: Tue, 17 Nov 2009 01:30:02 GMT Resent-Message-Id: <200911170130.nAH1U2vx055289@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, pluknet Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D73311065672 for ; Tue, 17 Nov 2009 01:28:56 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id C6A1B8FC1C for ; Tue, 17 Nov 2009 01:28:56 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id nAH1SuA4003244 for ; Tue, 17 Nov 2009 01:28:56 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id nAH1SuSD003242; Tue, 17 Nov 2009 01:28:56 GMT (envelope-from nobody) Message-Id: <200911170128.nAH1SuSD003242@www.freebsd.org> Date: Tue, 17 Nov 2009 01:28:56 GMT From: pluknet To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: kern/140619: refine obsolete if_var.h comments describing ifnet->if_poll_slowq 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: Tue, 17 Nov 2009 01:30:02 -0000 >Number: 140619 >Category: kern >Synopsis: refine obsolete if_var.h comments describing ifnet->if_poll_slowq >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: Tue Nov 17 01:30:02 UTC 2009 >Closed-Date: >Last-Modified: >Originator: pluknet >Release: 9.0-CURRENT >Organization: >Environment: >Description: The mentioned obsolete comment is there: net/if_var.h: 266: * Output queues (ifp->if_snd) and slow device input queues (*ifp->if_slowq) 267: * are queues of messages stored on ifqueue structures 268: * (defined above). Entries are added to and deleted from these structures 269: * by these macros, which should be called with ipl raised to splimp(). The source and comment were both moved here from net/if.h in svn r21259 on Jan 3 1997 where the comment initially originated there in r17352 following by source change in r13641: - void *if_private[IF_NPRIVATE]; /* opaque data for various clients */ + struct ifqueue *if_poll_slowq; /* input queue for slow devices */ [yes, it wasn't much correct wrt. the field name. I see no other slowq refs, though] The field was finally removed in r127828 (before RELENG_5). While here, it would be nice to refine a bit stale comments wrt. current locking. >How-To-Repeat: >Fix: Apply the patch. Patch attached with submission follows: --- sys/net/if_var.h.orig 2009-11-15 07:24:31.000000000 +0300 +++ sys/net/if_var.h 2009-11-15 07:27:31.000000000 +0300 @@ -263,10 +263,9 @@ void if_maddr_runlock(struct ifnet *ifp); /* if_multiaddrs */ /* - * Output queues (ifp->if_snd) and slow device input queues (*ifp->if_slowq) - * are queues of messages stored on ifqueue structures + * Output queues (ifp->if_snd) of messages are stored on ifqueue structures * (defined above). Entries are added to and deleted from these structures - * by these macros, which should be called with ipl raised to splimp(). + * by these macros, which should be called with per-queue mutex held. */ #define IF_LOCK(ifq) mtx_lock(&(ifq)->ifq_mtx) #define IF_UNLOCK(ifq) mtx_unlock(&(ifq)->ifq_mtx) >Release-Note: >Audit-Trail: >Unformatted: