From nobody@FreeBSD.org  Tue Nov 17 01:28:56 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D73311065672
	for <freebsd-gnats-submit@FreeBSD.org>; 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 <freebsd-gnats-submit@FreeBSD.org>; 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 <freebsd-gnats-submit@FreeBSD.org>; 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 <pluknet@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: refine obsolete if_var.h comments describing ifnet->if_poll_slowq
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         140619
>Category:       kern
>Synopsis:       [ifnet] [patch] refine obsolete if_var.h comments describing ifnet->if_poll_slowq
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-net
>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:  Tue Nov 17 03:26:25 UTC 2009
>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:
Responsible-Changed-From-To: freebsd-bugs->freebsd-net 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Tue Nov 17 03:26:06 UTC 2009 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=140619 
>Unformatted:
