PERFORCE change 89185 for review
Kip Macy
kmacy at FreeBSD.org
Wed Jan 4 14:16:25 PST 2006
http://perforce.freebsd.org/chv.cgi?CH=89185
Change 89185 by kmacy at 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(
More information about the p4-projects
mailing list