Date: Wed, 4 Jan 2006 22:16:14 GMT From: Kip Macy <kmacy@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 89185 for review Message-ID: <200601042216.k04MGE5G035763@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=89185 Change 89185 by kmacy@kmacy:freebsd7_xen3 on 2006/01/04 22:15:54 fix the network rx path, mbufs were not being set by allocated id Affected files ... .. //depot/projects/xen3/src/sys/dev/xen/netfront/netfront.c#2 edit Differences ... ==== //depot/projects/xen3/src/sys/dev/xen/netfront/netfront.c#2 (text+ko) ==== @@ -284,11 +284,11 @@ }; #endif #define IPRINTK(fmt, args...) \ - printk("[XEN] " fmt, ##args) + printf("[XEN] " fmt, ##args) #define WPRINTK(fmt, args...) \ - printk("[XEN] " fmt, ##args) + printf("[XEN] " fmt, ##args) #define DPRINTK(fmt, args...) \ - printk("[XEN] " fmt, ##args) + printf("[XEN] " fmt, ##args) static __inline struct mbuf* makembuf (struct mbuf *buf) @@ -619,7 +619,7 @@ * ourself and for other kernel subsystems. */ batch_target = sc->rx_target - (req_prod - sc->rx.rsp_cons); - for ( i = sc->xn_rx_batchlen; i < batch_target; i++, sc->xn_rx_batchlen++) { + for (i = sc->xn_rx_batchlen; i < batch_target; i++, sc->xn_rx_batchlen++) { MGETHDR(m_new, M_DONTWAIT, MT_DATA); if (m_new == NULL) break; @@ -654,10 +654,10 @@ id = GET_ID_FROM_FREELIST(sc->xn_rx_free_idxs); KASSERT(id != 0, ("alloc_rx_buffers: found free receive index of 0\n")); - sc->xn_cdata.xn_rx_chain[i] = m_new; + sc->xn_cdata.xn_rx_chain[id] = m_new; - RING_GET_REQUEST(&sc->rx, req_prod + i)->id = id; + RING_GET_REQUEST(&sc->rx, req_prod + i)->id = id; ref = gnttab_claim_grant_reference(&sc->gref_rx_head); PANIC_IF((signed short)ref < 0); sc->grant_rx_ref[id] = ref; @@ -888,6 +888,7 @@ id = RING_GET_RESPONSE(&np->tx, i)->id; m = np->xn_cdata.xn_tx_chain[id]; + ifp->if_opackets++; KASSERT(m != NULL, ("mbuf not found in xn_tx_chain")); M_ASSERTVALID(m); if (unlikely(gnttab_query_foreign_access(
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200601042216.k04MGE5G035763>