From owner-p4-projects@FreeBSD.ORG Sun May 6 02:12:31 2007 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EEE1716A403; Sun, 6 May 2007 02:12:30 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CD46F16A400 for ; Sun, 6 May 2007 02:12:30 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id BDF2413C4AD for ; Sun, 6 May 2007 02:12:30 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l462CURe065859 for ; Sun, 6 May 2007 02:12:30 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l462CU0V065856 for perforce@freebsd.org; Sun, 6 May 2007 02:12:30 GMT (envelope-from kmacy@freebsd.org) Date: Sun, 6 May 2007 02:12:30 GMT Message-Id: <200705060212.l462CU0V065856@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 119315 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 May 2007 02:12:31 -0000 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 #include +#include + 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;