svn commit: r193545 - user/kmacy/releng_7_2_fcs/sys/net
Kip Macy
kmacy at FreeBSD.org
Fri Jun 5 23:23:25 UTC 2009
Author: kmacy
Date: Fri Jun 5 23:23:24 2009
New Revision: 193545
URL: http://svn.freebsd.org/changeset/base/193545
Log:
add function to return number of queued packets
Modified:
user/kmacy/releng_7_2_fcs/sys/net/if_var.h
Modified: user/kmacy/releng_7_2_fcs/sys/net/if_var.h
==============================================================================
--- user/kmacy/releng_7_2_fcs/sys/net/if_var.h Fri Jun 5 23:22:15 2009 (r193544)
+++ user/kmacy/releng_7_2_fcs/sys/net/if_var.h Fri Jun 5 23:23:24 2009 (r193545)
@@ -643,6 +643,16 @@ drbr_empty(struct ifnet *ifp, struct buf
#endif
return (buf_ring_empty(br));
}
+
+static __inline int
+drbr_inuse(struct ifnet *ifp, struct buf_ring *br)
+{
+#ifdef ALTQ
+ if (ALTQ_IS_ENABLED(&ifp->if_snd))
+ return (ifp->if_snd.ifq_len);
+#endif
+ return (buf_ring_count(br));
+}
#endif
/*
* 72 was chosen below because it is the size of a TCP/IP
More information about the svn-src-user
mailing list