From owner-p4-projects@FreeBSD.ORG Sun Jan 27 04:49:24 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 621B816A421; Sun, 27 Jan 2008 04:49:23 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D594C16A41A for ; Sun, 27 Jan 2008 04:49:21 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C246E13C448 for ; Sun, 27 Jan 2008 04:49:21 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m0R4nL98020423 for ; Sun, 27 Jan 2008 04:49:21 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m0R4nLpW020420 for perforce@freebsd.org; Sun, 27 Jan 2008 04:49:21 GMT (envelope-from kmacy@freebsd.org) Date: Sun, 27 Jan 2008 04:49:21 GMT Message-Id: <200801270449.m0R4nLpW020420@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 134181 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, 27 Jan 2008 04:49:24 -0000 http://perforce.freebsd.org/chv.cgi?CH=134181 Change 134181 by kmacy@kmacy:storage:toehead on 2008/01/27 04:49:19 IFC 134180 bring cxgb_sge.c fix for DISABLE_MBUF_IOVEC Affected files ... .. //depot/projects/toehead/share/man/man9/style.9#3 integrate .. //depot/projects/toehead/sys/dev/cxgb/cxgb_sge.c#5 integrate .. //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_tcp.h#2 integrate .. //depot/projects/toehead/sys/netinet/tcp_ofld.c#2 delete .. //depot/projects/toehead/sys/netinet/tcp_ofld.h#5 delete .. //depot/projects/toehead/sys/netinet/toedev.h#3 integrate Differences ... ==== //depot/projects/toehead/share/man/man9/style.9#3 (text+ko) ==== @@ -24,7 +24,7 @@ .\" SUCH DAMAGE. .\" .\" From: @(#)style 1.14 (Berkeley) 4/28/95 -.\" $FreeBSD: src/share/man/man9/style.9,v 1.124 2008/01/05 21:39:21 grog Exp $ +.\" $FreeBSD: src/share/man/man9/style.9,v 1.125 2008/01/27 03:58:22 obrien Exp $ .\" .Dd February 10, 2005 .Dt STYLE 9 @@ -46,7 +46,7 @@ * Style guide for FreeBSD. Based on the CSRG's KNF (Kernel Normal Form). * * @(#)style 1.14 (Berkeley) 4/28/95 - * $FreeBSD: src/share/man/man9/style.9,v 1.124 2008/01/05 21:39:21 grog Exp $ + * $FreeBSD: src/share/man/man9/style.9,v 1.125 2008/01/27 03:58:22 obrien Exp $ */ /* @@ -111,7 +111,7 @@ #endif #include -__FBSDID("$FreeBSD: src/share/man/man9/style.9,v 1.124 2008/01/05 21:39:21 grog Exp $"); +__FBSDID("$FreeBSD: src/share/man/man9/style.9,v 1.125 2008/01/27 03:58:22 obrien Exp $"); .Ed .Pp Leave another blank line before the header files. @@ -852,3 +852,7 @@ desire of the .Fx project. +.Pa src/admin/style/style +is a codification by the CSRG of the programming style of Ken Thompson and +Dennis Ritchie in +.At v6 . ==== //depot/projects/toehead/sys/dev/cxgb/cxgb_sge.c#5 (text+ko) ==== @@ -30,7 +30,7 @@ #include -__FBSDID("$FreeBSD: src/sys/dev/cxgb/cxgb_sge.c,v 1.47 2008/01/19 22:47:43 kmacy Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/cxgb/cxgb_sge.c,v 1.48 2008/01/27 04:37:02 kmacy Exp $"); #include #include @@ -292,18 +292,6 @@ * * Return a packet containing the immediate data of the given response. */ -#ifdef DISABLE_MBUF_IOVEC -static __inline int -get_imm_packet(adapter_t *sc, const struct rsp_desc *resp, struct t3_mbuf_hdr *mh) -{ - struct mbuf *m = mh->m_head; - - memcpy(mtod(m, uint8_t *), resp->imm_data, IMMED_PKT_SIZE); - m->m_pkthdr.len = m->m_len = len; - return (0); -} - -#else static int get_imm_packet(adapter_t *sc, const struct rsp_desc *resp, struct mbuf *m, void *cl, uint32_t flags) { @@ -313,7 +301,6 @@ return (0); } -#endif static __inline u_int flits_to_desc(u_int n) @@ -2501,10 +2488,10 @@ uint32_t len = G_RSPD_LEN(len_cq); uint32_t flags = ntohl(r->flags); uint8_t sopeop = G_RSPD_SOP_EOP(flags); - struct mbuf *m; - uint32_t *ref; + caddr_t cl; + struct mbuf *m, *m0; int ret = 0; - + prefetch(sd->rxsd_cl); fl->credits--; @@ -2517,20 +2504,20 @@ memcpy(cl, sd->data, len); recycle_rx_buf(adap, fl, fl->cidx); m = m0; + m0->m_len = len; } else { skip_recycle: - int flags = 0; + bus_dmamap_unload(fl->entry_tag, sd->map); cl = sd->rxsd_cl; m = m0 = (struct mbuf *)cl; - m0->m_len = len; if ((sopeop == RSPQ_SOP_EOP) || (sopeop == RSPQ_SOP)) flags = M_PKTHDR; init_cluster_mbuf(cl, flags, fl->type, fl->zone); + m0->m_len = len; } - switch(sopeop) { case RSPQ_SOP_EOP: DBG(DBG_RX, ("get_packet: SOP-EOP m %p\n", m)); @@ -2541,7 +2528,7 @@ case RSPQ_NSOP_NEOP: DBG(DBG_RX, ("get_packet: NO_SOP-NO_EOP m %p\n", m)); if (mh->mh_tail == NULL) { - printf("discarding intermediate descriptor entry\n"); + log(LOG_ERR, "discarding intermediate descriptor entry\n"); m_freem(m); break; } @@ -2738,41 +2725,26 @@ } else if (flags & F_RSPD_IMM_DATA_VALID) { struct mbuf *m = NULL; - -#ifdef DISABLE_MBUF_IOVEC - DPRINTF("IMM DATA VALID opcode=0x%x rspq->cidx=%d\n", - r->rss_hdr.opcode, rspq->cidx); - - m = rspq->rspq_mh.mh_head = m_gethdr(M_DONTWAIT, MT_DATA); - if (m == NULL) { - rspq->next_holdoff = NOMEM_INTR_DELAY; - budget_left--; - break; - } - get_imm_packet(adap, r, &rspq->rspq_mh); - eop = 1; -#else DPRINTF("IMM DATA VALID opcode=0x%x rspq->cidx=%d\n", r->rss_hdr.opcode, rspq->cidx); - if (rspq->rspq_mbuf == NULL) - rspq->rspq_mbuf = m_gethdr(M_DONTWAIT, MT_DATA); + if (rspq->rspq_mh.mh_head == NULL) + rspq->rspq_mh.mh_head = m_gethdr(M_DONTWAIT, MT_DATA); else m = m_gethdr(M_DONTWAIT, MT_DATA); /* * XXX revisit me */ - if (rspq->rspq_mbuf == NULL && m == NULL) { + if (rspq->rspq_mh.mh_head == NULL && m == NULL) { rspq->next_holdoff = NOMEM_INTR_DELAY; budget_left--; break; } - get_imm_packet(adap, r, rspq->rspq_mbuf, m, flags); + get_imm_packet(adap, r, rspq->rspq_mh.mh_head, m, flags); eop = 1; rspq->imm_data++; -#endif } else if (r->len_cq) { int drop_thresh = eth ? SGE_RX_DROP_THRES : 0; ==== //depot/projects/toehead/sys/dev/cxgb/ulp/tom/cxgb_tcp.h#2 (text+ko) ==== @@ -25,12 +25,15 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/cxgb/ulp/tom/cxgb_tcp.h,v 1.1 2007/12/17 08:17:50 kmacy Exp $ + * $FreeBSD: src/sys/dev/cxgb/ulp/tom/cxgb_tcp.h,v 1.2 2008/01/27 04:39:38 kmacy Exp $ */ #ifndef CXGB_TCP_H_ #define CXGB_TCP_H_ - +#ifdef TCP_USRREQS_OVERLOAD struct tcpcb *cxgb_tcp_drop(struct tcpcb *tp, int errno); +#else +#define cxgb_tcp_drop tcp_drop +#endif void cxgb_tcp_ctlinput(int cmd, struct sockaddr *sa, void *vip); struct tcpcb *cxgb_tcp_close(struct tcpcb *tp); ==== //depot/projects/toehead/sys/netinet/toedev.h#3 (text+ko) ====