From owner-p4-projects@FreeBSD.ORG Wed Jul 28 08:21:47 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 14B6A1066340; Wed, 28 Jul 2010 08:21:39 +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 EAEE31065748 for ; Wed, 28 Jul 2010 08:21:37 +0000 (UTC) (envelope-from afiveg@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B75B08FC27 for ; Wed, 28 Jul 2010 08:21:37 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.4/8.14.4) with ESMTP id o6S8LboM009202 for ; Wed, 28 Jul 2010 08:21:37 GMT (envelope-from afiveg@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.4/8.14.4/Submit) id o6S8Lbko009200 for perforce@freebsd.org; Wed, 28 Jul 2010 08:21:37 GMT (envelope-from afiveg@FreeBSD.org) Date: Wed, 28 Jul 2010 08:21:37 GMT Message-Id: <201007280821.o6S8Lbko009200@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to afiveg@FreeBSD.org using -f From: Alexandre Fiveg To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 181478 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jul 2010 08:21:47 -0000 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) ====