Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 May 2007 02:12:30 GMT
From:      Kip Macy <kmacy@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 119315 for review
Message-ID:  <200705060212.l462CU0V065856@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=119315

Change 119315 by kmacy@kmacy_vt-x:opentoe_init on 2007/05/06 02:12:12

	move mbufq routines into separate header

Affected files ...

.. //depot/projects/opentoe/sys/dev/cxgb/cxgb_adapter.h#16 edit
.. //depot/projects/opentoe/sys/dev/cxgb/sys/mbufq.h#1 add

Differences ...

==== //depot/projects/opentoe/sys/dev/cxgb/cxgb_adapter.h#16 (text+ko) ====

@@ -60,62 +60,12 @@
 #include <dev/pci/pcivar.h>
 
 #include <dev/cxgb/ulp/toecore/toedev.h>
+#include <dev/cxgb/sys/mbufq.h>
+
 struct adapter;
 struct sge_qset;
 extern int cxgb_debug;
 
-/*
- * Put here for now until a more appropriate place is found
- */
-struct mbuf_head {
-	struct mbuf *head;
-	struct mbuf *tail;
-	uint32_t     qlen;
-	struct mtx   lock;
-};
-
-static __inline void
-mbufq_init(struct mbuf_head *l)
-{
-	l->head = l->tail = NULL;
-}
-
-static __inline int
-mbufq_empty(struct mbuf_head *l)
-{
-	return (l->head == NULL);
-}
-
-static __inline void
-mbufq_tail(struct mbuf_head *l, struct mbuf *m)
-{
-	l->qlen++;
-	l->tail->m_nextpkt = m;
-	l->tail = m;
-}
-
-static __inline struct mbuf *
-mbufq_dequeue(struct mbuf_head *l)
-{
-	struct mbuf *m;
-
-	m = l->head;
-	if (m) {
-		if (m == l->tail) 
-			l->tail = NULL;
-		l->head = m->m_nextpkt;
-		l->qlen--;
-	}
-
-	return (m);
-}
-
-static __inline struct mbuf *
-mbufq_peek(struct mbuf_head *l)
-{
-	return (l->head);
-}
-	
 struct port_info {
 	struct adapter	*adapter;
 	struct ifnet	*ifp;



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