summaryrefslogtreecommitdiffstats
path: root/sys/dev/netmap/ixgbe_netmap.h
diff options
context:
space:
mode:
authorluigi <luigi@FreeBSD.org>2012-04-13 16:03:07 +0000
committerluigi <luigi@FreeBSD.org>2012-04-13 16:03:07 +0000
commit39cda1ca4325c5b7ed65df26537fc6176664b0e7 (patch)
tree6df9197348ba0a60d72f07d20731dcaf1dbfbb31 /sys/dev/netmap/ixgbe_netmap.h
parent9780a82bfd79651ab52a185ece1816f12c7acacb (diff)
downloadFreeBSD-src-39cda1ca4325c5b7ed65df26537fc6176664b0e7.zip
FreeBSD-src-39cda1ca4325c5b7ed65df26537fc6176664b0e7.tar.gz
A bit of cleanup in the names of fields of netmap-related structures.
Use the name 'ring' instead of 'queue' in all fields. Bump NETMAP_API.
Diffstat (limited to 'sys/dev/netmap/ixgbe_netmap.h')
-rw-r--r--sys/dev/netmap/ixgbe_netmap.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/sys/dev/netmap/ixgbe_netmap.h b/sys/dev/netmap/ixgbe_netmap.h
index b448f95..4f52ed8 100644
--- a/sys/dev/netmap/ixgbe_netmap.h
+++ b/sys/dev/netmap/ixgbe_netmap.h
@@ -63,6 +63,9 @@
* This is tricky, much better to use TDH for now.
*/
SYSCTL_DECL(_dev_netmap);
+static int ix_write_len;
+SYSCTL_INT(_dev_netmap, OID_AUTO, ix_write_len,
+ CTLFLAG_RW, &ix_write_len, 0, "write rx len");
static int ix_rx_miss, ix_rx_miss_bufs, ix_use_dd, ix_crcstrip;
SYSCTL_INT(_dev_netmap, OID_AUTO, ix_crcstrip,
CTLFLAG_RW, &ix_crcstrip, 0, "strip CRC on rx frames");
@@ -121,6 +124,9 @@ set_crcstrip(struct ixgbe_hw *hw, int onoff)
hl = IXGBE_READ_REG(hw, IXGBE_HLREG0);
rxc = IXGBE_READ_REG(hw, IXGBE_RDRXCTL);
+ if (netmap_verbose)
+ D("%s read HLREG 0x%x rxc 0x%x",
+ onoff ? "enter" : "exit", hl, rxc);
/* hw requirements ... */
rxc &= ~IXGBE_RDRXCTL_RSCFRSTSIZE;
rxc |= IXGBE_RDRXCTL_RSCACKC;
@@ -133,6 +139,9 @@ set_crcstrip(struct ixgbe_hw *hw, int onoff)
hl |= IXGBE_HLREG0_RXCRCSTRP;
rxc |= IXGBE_RDRXCTL_CRCSTRIP;
}
+ if (netmap_verbose)
+ D("%s write HLREG 0x%x rxc 0x%x",
+ onoff ? "enter" : "exit", hl, rxc);
IXGBE_WRITE_REG(hw, IXGBE_HLREG0, hl);
IXGBE_WRITE_REG(hw, IXGBE_RDRXCTL, rxc);
}
@@ -479,7 +488,7 @@ ixgbe_netmap_rxsync(struct ifnet *ifp, u_int ring_nr, int do_lock)
* of CRCSTRIP. The data sheets say differently.
* Very strange.
*/
- int crclen = 0; // ix_crcstrip ? 0 : 4;
+ int crclen = ix_crcstrip ? 0 : 4;
l = rxr->next_to_check;
j = netmap_idx_n2k(kring, l);
@@ -490,6 +499,8 @@ ixgbe_netmap_rxsync(struct ifnet *ifp, u_int ring_nr, int do_lock)
if ((staterr & IXGBE_RXD_STAT_DD) == 0)
break;
ring->slot[j].len = le16toh(curr->wb.upper.length) - crclen;
+ if (ix_write_len)
+ D("rx[%d] len %d", j, ring->slot[j].len);
bus_dmamap_sync(rxr->ptag,
rxr->rx_buffers[l].pmap, BUS_DMASYNC_POSTREAD);
j = (j == lim) ? 0 : j + 1;
OpenPOWER on IntegriCloud