Date: Wed, 28 Jul 2010 08:21:37 GMT From: Alexandre Fiveg <afiveg@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 181478 for review Message-ID: <201007280821.o6S8Lbko009200@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@181478?ac=10 Change 181478 by afiveg@ringmap-2 on 2010/07/27 15:58:15 Bugfixing. The problem with dirty data in the ring doesn't solved yet Affected files ... .. //depot/projects/soc2010/ringmap/current/contrib/libpcap/ringmap_pcap.c#24 edit .. //depot/projects/soc2010/ringmap/current/sys/dev/ixgbe/ixgbe.c#9 edit .. //depot/projects/soc2010/ringmap/current/sys/dev/ixgbe/ixgbe.h#8 edit .. //depot/projects/soc2010/ringmap/current/sys/dev/ixgbe/ringmap_8259.h#7 edit .. //depot/projects/soc2010/ringmap/current/sys/dev/ixgbe/ringmap_ixgbe.c#8 edit .. //depot/projects/soc2010/ringmap/current/sys/net/ringmap.c#38 edit .. //depot/projects/soc2010/ringmap/current/sys/net/ringmap.h#38 edit .. //depot/projects/soc2010/ringmap/current/sys/net/ringmap_kernel.h#8 edit .. //depot/projects/soc2010/ringmap/scripts/build_ringmap.sh#19 edit .. //depot/projects/soc2010/ringmap/scripts/set_ringmap.sh#20 edit .. //depot/projects/soc2010/ringmap/scripts/tailf_ringmap_msgs.sh#14 edit .. //depot/projects/soc2010/ringmap/tests/ringmap/close.c#7 edit .. //depot/projects/soc2010/ringmap/tests/ringmap/ioctl.c#7 edit .. //depot/projects/soc2010/ringmap/tests/ringmap/main.c#9 edit .. //depot/projects/soc2010/ringmap/tests/ringmap/mmap.c#9 edit .. //depot/projects/soc2010/ringmap/tests/ringmap/open.c#9 edit .. //depot/projects/soc2010/ringmap/tests/ringmap/tests.h#7 edit Differences ... ==== //depot/projects/soc2010/ringmap/current/contrib/libpcap/ringmap_pcap.c#24 (text+ko) ==== @@ -252,14 +252,19 @@ if ( RING_IS_EMPTY(ring) ) { #if (__RINGMAP_DEB) + PRINT_RING_PTRS(ring); RINGMAP_FUNC_DEBUG(Ring is empty. Sleep...); - PRINT_RING_PTRS(ring); #endif /* Sleep and wait for new incoming packets */ ioctl(ringmap_cdev_fd, IOCTL_SLEEP_WAIT); goto again; } +#if (__RINGMAP_DEB) + RINGMAP_FUNC_DEBUG(Ring is NOT empty:); + PRINT_RING_PTRS(ring); +#endif + if ( (cnt == -1) || (cnt == 0) ) cnt = SW_TAIL_TO_HEAD_DIST(p->ring); @@ -274,11 +279,10 @@ } curr_slot = R_MODULO( SW_TAIL(ring) + 1 ); - if (!(ring->slot[curr_slot].is_ok)) { + if (ring->slot[curr_slot].is_ok == 0) { #if (__RINGMAP_DEB) printf("Slot %d was not accepted by driver!\n", curr_slot); #endif - printf("Slot %d was not accepted by driver!\n", curr_slot); goto out; } ==== //depot/projects/soc2010/ringmap/current/sys/dev/ixgbe/ixgbe.c#9 (text+ko) ==== @@ -1455,7 +1455,6 @@ #ifdef RINGMAP IXGBE_RX_LOCK(que->rxr); adapter->rm->funcs->sync_head(que); - IXGBE_RX_UNLOCK(que->rxr); /* TODO: Only our co not all */ SLIST_FOREACH(co, &adapter->rm->object_list, objects) { @@ -1463,6 +1462,7 @@ wakeup(co->ring); } } + IXGBE_RX_UNLOCK(que->rxr); #endif /* Do AIM now? */ @@ -3506,6 +3506,7 @@ goto update; mp->m_pkthdr.len = mp->m_len = adapter->rx_mbuf_sz; /* Get the memory mapping */ + error = bus_dmamap_load_mbuf_sg(rxr->ptag, rxbuf->pmap, mp, pseg, &nsegs, BUS_DMA_NOWAIT); if (error != 0) { ==== //depot/projects/soc2010/ringmap/current/sys/dev/ixgbe/ixgbe.h#8 (text+ko) ==== ==== //depot/projects/soc2010/ringmap/current/sys/dev/ixgbe/ringmap_8259.h#7 (text+ko) ==== ==== //depot/projects/soc2010/ringmap/current/sys/dev/ixgbe/ringmap_ixgbe.c#8 (text+ko) ==== @@ -161,6 +161,7 @@ { struct ix_queue *que = (struct ix_queue *)context; struct adapter *adapter = (struct adapter *)que->adapter; + struct ixgbe_rx_buf *rxbuf; struct ringmap *rm = adapter->rm;; struct capt_object *co = NULL; @@ -177,14 +178,20 @@ co = get_capt_obj(que); if (co != NULL) { + co->ring->slot[slot_num].intr_num = co->ring->intr_num; + co->ring->slot[slot_num].ts = co->ring->last_ts; + co->ring->slot[slot_num].is_ok = 1; + + rxbuf = &que->rxr->rx_buffers[slot_num]; + bus_dmamap_sync(que->rxr->htag, rxbuf->hmap, + BUS_DMASYNC_POSTREAD); + #if (RINGMAP_INTR_DEB) printf(RINGMAP_PREFIX"[%s] Slot = %d\n", __func__, slot_num); - rm_8259_print_ring_pointers(que); + PRINT_SLOT(co->ring, slot_num); PRINT_RING_PTRS(co->ring); #endif - co->ring->slot[slot_num].intr_num = co->ring->intr_num; - co->ring->slot[slot_num].ts = co->ring->last_ts; - co->ring->slot[slot_num].is_ok = 1; + } } ==== //depot/projects/soc2010/ringmap/current/sys/net/ringmap.c#38 (text+ko) ==== ==== //depot/projects/soc2010/ringmap/current/sys/net/ringmap.h#38 (text+ko) ==== @@ -246,19 +246,19 @@ * DEBUG OUTPUT */ #ifndef RINGMAP_IOCTL_DEB -#define RINGMAP_IOCTL_DEB 0 +#define RINGMAP_IOCTL_DEB 1 #else #define RINGMAP_IOCTL_DEB 1 #endif #ifndef RINGMAP_INTR_DEB -#define RINGMAP_INTR_DEB 0 +#define RINGMAP_INTR_DEB 1 #else #define RINGMAP_INTR_DEB 1 #endif #ifndef __RINGMAP_DEB -#define __RINGMAP_DEB 0 +#define __RINGMAP_DEB 1 #endif #define RINGMAP_PREFIX "--> RINGMAP: " ==== //depot/projects/soc2010/ringmap/current/sys/net/ringmap_kernel.h#8 (text+ko) ==== ==== //depot/projects/soc2010/ringmap/scripts/build_ringmap.sh#19 (text+ko) ==== ==== //depot/projects/soc2010/ringmap/scripts/set_ringmap.sh#20 (text+ko) ==== ==== //depot/projects/soc2010/ringmap/scripts/tailf_ringmap_msgs.sh#14 (text+ko) ==== ==== //depot/projects/soc2010/ringmap/tests/ringmap/close.c#7 (text+ko) ==== ==== //depot/projects/soc2010/ringmap/tests/ringmap/ioctl.c#7 (text+ko) ==== ==== //depot/projects/soc2010/ringmap/tests/ringmap/main.c#9 (text+ko) ==== ==== //depot/projects/soc2010/ringmap/tests/ringmap/mmap.c#9 (text+ko) ==== ==== //depot/projects/soc2010/ringmap/tests/ringmap/open.c#9 (text+ko) ==== ==== //depot/projects/soc2010/ringmap/tests/ringmap/tests.h#7 (text+ko) ====
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201007280821.o6S8Lbko009200>