summaryrefslogtreecommitdiffstats
path: root/sys/dev/netmap/if_em_netmap.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/netmap/if_em_netmap.h')
-rw-r--r--sys/dev/netmap/if_em_netmap.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/dev/netmap/if_em_netmap.h b/sys/dev/netmap/if_em_netmap.h
index eae4f8c..28f2dd4 100644
--- a/sys/dev/netmap/if_em_netmap.h
+++ b/sys/dev/netmap/if_em_netmap.h
@@ -148,7 +148,7 @@ em_netmap_txsync(struct netmap_kring *kring, int flags)
/* device-specific */
struct e1000_tx_desc *curr = &txr->tx_base[nic_i];
- struct em_buffer *txbuf = &txr->tx_buffers[nic_i];
+ struct em_txbuffer *txbuf = &txr->tx_buffers[nic_i];
int flags = (slot->flags & NS_REPORT ||
nic_i == 0 || nic_i == report_frequency) ?
E1000_TXD_CMD_RS : 0;
@@ -239,12 +239,12 @@ em_netmap_rxsync(struct netmap_kring *kring, int flags)
nm_i = netmap_idx_n2k(kring, nic_i);
for (n = 0; ; n++) { // XXX no need to count
- struct e1000_rx_desc *curr = &rxr->rx_base[nic_i];
- uint32_t staterr = le32toh(curr->status);
+ union e1000_rx_desc_extended *curr = &rxr->rx_base[nic_i];
+ uint32_t staterr = le32toh(curr->wb.upper.status_error);
if ((staterr & E1000_RXD_STAT_DD) == 0)
break;
- ring->slot[nm_i].len = le16toh(curr->length);
+ ring->slot[nm_i].len = le16toh(curr->wb.upper.length);
ring->slot[nm_i].flags = slot_flags;
bus_dmamap_sync(rxr->rxtag, rxr->rx_buffers[nic_i].map,
BUS_DMASYNC_POSTREAD);
@@ -271,19 +271,19 @@ em_netmap_rxsync(struct netmap_kring *kring, int flags)
uint64_t paddr;
void *addr = PNMB(na, slot, &paddr);
- struct e1000_rx_desc *curr = &rxr->rx_base[nic_i];
- struct em_buffer *rxbuf = &rxr->rx_buffers[nic_i];
+ union e1000_rx_desc_extended *curr = &rxr->rx_base[nic_i];
+ struct em_rxbuffer *rxbuf = &rxr->rx_buffers[nic_i];
if (addr == NETMAP_BUF_BASE(na)) /* bad buf */
goto ring_reset;
if (slot->flags & NS_BUF_CHANGED) {
/* buffer has changed, reload map */
- curr->buffer_addr = htole64(paddr);
+ curr->read.buffer_addr = htole64(paddr);
netmap_reload_map(na, rxr->rxtag, rxbuf->map, addr);
slot->flags &= ~NS_BUF_CHANGED;
}
- curr->status = 0;
+ curr->wb.upper.status_error = 0;
bus_dmamap_sync(rxr->rxtag, rxbuf->map,
BUS_DMASYNC_PREREAD);
nm_i = nm_next(nm_i, lim);
OpenPOWER on IntegriCloud