Deleted Added
full compact
ixgbe_netmap.h (245570) ixgbe_netmap.h (245579)
1/*
2 * Copyright (C) 2011 Matteo Landi, Luigi Rizzo. 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 Matteo Landi, Luigi Rizzo. 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/ixgbe_netmap.h 245570 2013-01-17 19:27:12Z luigi $
27 * $FreeBSD: head/sys/dev/netmap/ixgbe_netmap.h 245579 2013-01-17 22:14:58Z luigi $
28 * $Id: ixgbe_netmap.h 10627 2012-02-23 19:37:15Z luigi $
29 *
30 * netmap modifications for ixgbe
31 *
32 * This file is meant to be a reference on how to implement
33 * netmap support for a network driver.
34 * This file contains code but only static or inline functions
35 * that are used by a single driver. To avoid replication of

--- 442 unchanged lines hidden (view full) ---

478 * l = rxr->next_to_check;
479 * and
480 * j == (l + kring->nkr_hwofs) % ring_size
481 *
482 * rxr->next_to_check is set to 0 on a ring reinit
483 */
484 if (netmap_no_pendintr || force_update) {
485 int crclen = ix_crcstrip ? 0 : 4;
28 * $Id: ixgbe_netmap.h 10627 2012-02-23 19:37:15Z luigi $
29 *
30 * netmap modifications for ixgbe
31 *
32 * This file is meant to be a reference on how to implement
33 * netmap support for a network driver.
34 * This file contains code but only static or inline functions
35 * that are used by a single driver. To avoid replication of

--- 442 unchanged lines hidden (view full) ---

478 * l = rxr->next_to_check;
479 * and
480 * j == (l + kring->nkr_hwofs) % ring_size
481 *
482 * rxr->next_to_check is set to 0 on a ring reinit
483 */
484 if (netmap_no_pendintr || force_update) {
485 int crclen = ix_crcstrip ? 0 : 4;
486 uint16_t slot_flags = kring->nkr_slot_flags;
486
487 l = rxr->next_to_check;
488 j = netmap_idx_n2k(kring, l);
489
490 for (n = 0; ; n++) {
491 union ixgbe_adv_rx_desc *curr = &rxr->rx_base[l];
492 uint32_t staterr = le32toh(curr->wb.upper.status_error);
493
494 if ((staterr & IXGBE_RXD_STAT_DD) == 0)
495 break;
496 ring->slot[j].len = le16toh(curr->wb.upper.length) - crclen;
487
488 l = rxr->next_to_check;
489 j = netmap_idx_n2k(kring, l);
490
491 for (n = 0; ; n++) {
492 union ixgbe_adv_rx_desc *curr = &rxr->rx_base[l];
493 uint32_t staterr = le32toh(curr->wb.upper.status_error);
494
495 if ((staterr & IXGBE_RXD_STAT_DD) == 0)
496 break;
497 ring->slot[j].len = le16toh(curr->wb.upper.length) - crclen;
498 ring->slot[j].flags = slot_flags;
497 bus_dmamap_sync(rxr->ptag,
498 rxr->rx_buffers[l].pmap, BUS_DMASYNC_POSTREAD);
499 j = (j == lim) ? 0 : j + 1;
500 l = (l == lim) ? 0 : l + 1;
501 }
502 if (n) { /* update the state variables */
503 if (netmap_no_pendintr && !force_update) {
504 /* diagnostics */

--- 105 unchanged lines hidden ---
499 bus_dmamap_sync(rxr->ptag,
500 rxr->rx_buffers[l].pmap, BUS_DMASYNC_POSTREAD);
501 j = (j == lim) ? 0 : j + 1;
502 l = (l == lim) ? 0 : l + 1;
503 }
504 if (n) { /* update the state variables */
505 if (netmap_no_pendintr && !force_update) {
506 /* diagnostics */

--- 105 unchanged lines hidden ---