if_igb_netmap.h (238985) | if_igb_netmap.h (245579) |
---|---|
1/* 2 * Copyright (C) 2011 Universita` di Pisa. All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. --- 10 unchanged lines hidden (view full) --- 19 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23 * SUCH DAMAGE. 24 */ 25 26/* | 1/* 2 * Copyright (C) 2011 Universita` di Pisa. All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. --- 10 unchanged lines hidden (view full) --- 19 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23 * SUCH DAMAGE. 24 */ 25 26/* |
27 * $FreeBSD: head/sys/dev/netmap/if_igb_netmap.h 238985 2012-08-02 11:59:43Z luigi $ | 27 * $FreeBSD: head/sys/dev/netmap/if_igb_netmap.h 245579 2013-01-17 22:14:58Z luigi $ |
28 * $Id: if_igb_netmap.h 10627 2012-02-23 19:37:15Z luigi $ 29 * 30 * Netmap support for igb, partly contributed by Ahmed Kooli 31 * For details on netmap support please see ixgbe_netmap.h 32 */ 33 34 35#include <net/netmap.h> --- 222 unchanged lines hidden (view full) --- 258 259 /* 260 * import newly received packets into the netmap ring. 261 * j is an index in the netmap ring, l in the NIC ring. 262 */ 263 l = rxr->next_to_check; 264 j = netmap_idx_n2k(kring, l); 265 if (netmap_no_pendintr || force_update) { | 28 * $Id: if_igb_netmap.h 10627 2012-02-23 19:37:15Z luigi $ 29 * 30 * Netmap support for igb, partly contributed by Ahmed Kooli 31 * For details on netmap support please see ixgbe_netmap.h 32 */ 33 34 35#include <net/netmap.h> --- 222 unchanged lines hidden (view full) --- 258 259 /* 260 * import newly received packets into the netmap ring. 261 * j is an index in the netmap ring, l in the NIC ring. 262 */ 263 l = rxr->next_to_check; 264 j = netmap_idx_n2k(kring, l); 265 if (netmap_no_pendintr || force_update) { |
266 uint16_t slot_flags = kring->nkr_slot_flags; 267 |
|
266 for (n = 0; ; n++) { 267 union e1000_adv_rx_desc *curr = &rxr->rx_base[l]; 268 uint32_t staterr = le32toh(curr->wb.upper.status_error); 269 270 if ((staterr & E1000_RXD_STAT_DD) == 0) 271 break; 272 ring->slot[j].len = le16toh(curr->wb.upper.length); | 268 for (n = 0; ; n++) { 269 union e1000_adv_rx_desc *curr = &rxr->rx_base[l]; 270 uint32_t staterr = le32toh(curr->wb.upper.status_error); 271 272 if ((staterr & E1000_RXD_STAT_DD) == 0) 273 break; 274 ring->slot[j].len = le16toh(curr->wb.upper.length); |
275 ring->slot[j].flags = slot_flags; |
|
273 bus_dmamap_sync(rxr->ptag, 274 rxr->rx_buffers[l].pmap, BUS_DMASYNC_POSTREAD); 275 j = (j == lim) ? 0 : j + 1; 276 l = (l == lim) ? 0 : l + 1; 277 } 278 if (n) { /* update the state variables */ 279 rxr->next_to_check = l; 280 kring->nr_hwavail += n; --- 76 unchanged lines hidden --- | 276 bus_dmamap_sync(rxr->ptag, 277 rxr->rx_buffers[l].pmap, BUS_DMASYNC_POSTREAD); 278 j = (j == lim) ? 0 : j + 1; 279 l = (l == lim) ? 0 : l + 1; 280 } 281 if (n) { /* update the state variables */ 282 rxr->next_to_check = l; 283 kring->nr_hwavail += n; --- 76 unchanged lines hidden --- |