Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Nov 2009 01:28:56 GMT
From:      pluknet <pluknet@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/140619: refine obsolete if_var.h comments describing ifnet->if_poll_slowq
Message-ID:  <200911170128.nAH1SuSD003242@www.freebsd.org>
Resent-Message-ID: <200911170130.nAH1U2vx055289@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200911170128.nAH1SuSD003242>