From owner-svn-src-user@FreeBSD.ORG Sat Nov 15 08:50:34 2008 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 95EBB1065674; Sat, 15 Nov 2008 08:50:34 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 848FC8FC12; Sat, 15 Nov 2008 08:50:34 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAF8oYCu015166; Sat, 15 Nov 2008 08:50:34 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAF8oYFH015165; Sat, 15 Nov 2008 08:50:34 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200811150850.mAF8oYFH015165@svn.freebsd.org> From: Kip Macy Date: Sat, 15 Nov 2008 08:50:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184987 - user/kmacy/HEAD_fast_multi_xmit/sys/dev/cxgb/sys X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Nov 2008 08:50:34 -0000 Author: kmacy Date: Sat Nov 15 08:50:34 2008 New Revision: 184987 URL: http://svn.freebsd.org/changeset/base/184987 Log: - fix compile error - set type in iovec after copying header Modified: user/kmacy/HEAD_fast_multi_xmit/sys/dev/cxgb/sys/uipc_mvec.c Modified: user/kmacy/HEAD_fast_multi_xmit/sys/dev/cxgb/sys/uipc_mvec.c ============================================================================== --- user/kmacy/HEAD_fast_multi_xmit/sys/dev/cxgb/sys/uipc_mvec.c Sat Nov 15 08:02:12 2008 (r184986) +++ user/kmacy/HEAD_fast_multi_xmit/sys/dev/cxgb/sys/uipc_mvec.c Sat Nov 15 08:50:34 2008 (r184987) @@ -199,8 +199,6 @@ busdma_map_sg_collapse(struct mbuf **m, struct mbuf_vec *mv; int skipped, freed; - - KASSERT(n->m_pkthdr.len, ("packet has zero header len")); if (n->m_flags & M_PKTHDR && !SLIST_EMPTY(&n->m_pkthdr.tags)) @@ -216,7 +214,7 @@ retry: return (0); } - skipped = freed; + skipped = freed = 0; while (n && seg_count < TX_MAX_SEGS) { marray[seg_count] = n; @@ -314,12 +312,13 @@ busdma_map_sg_vec(struct mbuf **m, struc if ((m0 = mcl_alloc(pkt_count, &type)) == NULL) return (ENOMEM); - m0->m_type = type; memcpy(m0, *m, sizeof(struct m_hdr) + sizeof(struct pkthdr)); + m0->m_type = type; mv = mtomv(m0); mv->mv_count = pkt_count; mv->mv_first = 0; - for (mp = m, i = 0, mi = mv->mv_vec; i < pkt_count; mp++, segs++, mi++, i++) { + for (mp = m, i = 0, mi = mv->mv_vec; i < pkt_count; + mp++, segs++, mi++, i++) { if ((*mp)->m_flags & M_PKTHDR && !SLIST_EMPTY(&(*mp)->m_pkthdr.tags)) m_tag_delete_chain(*mp, NULL); @@ -348,6 +347,7 @@ mb_free_ext_fast(struct mbuf_iovec *mi, int dofree; caddr_t cl; + cl = mi->mi_base; switch (type) { case EXT_PACKET: cxgb_pack_outstanding--; @@ -371,7 +371,6 @@ mb_free_ext_fast(struct mbuf_iovec *mi, if (dofree == 0) return; - cl = mi->mi_base; switch (type) { case EXT_CLUSTER: cxgb_cache_put(zone_clust, cl);