kern/140619: refine obsolete if_var.h comments describing
ifnet->if_poll_slowq
pluknet
pluknet at gmail.com
Tue Nov 17 01:30:02 UTC 2009
>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:
More information about the freebsd-bugs
mailing list