aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJack F Vogel <jfv@FreeBSD.org>2014-08-28 22:52:20 +0000
committerJack F Vogel <jfv@FreeBSD.org>2014-08-28 22:52:20 +0000
commit1f873f180566d722982727857548913c56fd6589 (patch)
tree29545a279ef3bc2d84c60e8ac55e4eac9085b79f /sys/dev
parent5c34b900df4e2a2a97badc4c88ae275d2cde3cd1 (diff)
downloadsrc-1f873f180566d722982727857548913c56fd6589.tar.gz
src-1f873f180566d722982727857548913c56fd6589.zip
Remove the DEV_NETMAP code from the ixl drivers, it was a placeholder
and not yet ready to be defined, and its causing build errors. MFC after: 3 days
Notes
Notes: svn path=/head/; revision=270773
Diffstat (limited to 'sys/dev')
-rwxr-xr-xsys/dev/ixl/if_ixl.c33
-rw-r--r--sys/dev/ixl/ixl.h3
-rwxr-xr-xsys/dev/ixl/ixl_txrx.c102
3 files changed, 8 insertions, 130 deletions
diff --git a/sys/dev/ixl/if_ixl.c b/sys/dev/ixl/if_ixl.c
index de3f81770409..af375811384e 100755
--- a/sys/dev/ixl/if_ixl.c
+++ b/sys/dev/ixl/if_ixl.c
@@ -276,10 +276,6 @@ int ixl_atr_rate = 20;
TUNABLE_INT("hw.ixl.atr_rate", &ixl_atr_rate);
#endif
-#ifdef DEV_NETMAP
-#include <dev/netmap/if_ixl_netmap.h>
-#endif /* DEV_NETMAP */
-
static char *ixl_fc_string[6] = {
"None",
"Rx",
@@ -652,10 +648,6 @@ ixl_attach(device_t dev)
vsi->vlan_detach = EVENTHANDLER_REGISTER(vlan_unconfig,
ixl_unregister_vlan, vsi, EVENTHANDLER_PRI_FIRST);
-#ifdef DEV_NETMAP
- ixl_netmap_attach(pf);
-#endif /* DEV_NETMAP */
-
INIT_DEBUGOUT("ixl_attach: end");
return (0);
@@ -733,10 +725,6 @@ ixl_detach(device_t dev)
ether_ifdetach(vsi->ifp);
callout_drain(&pf->timer);
-#ifdef DEV_NETMAP
- netmap_detach(vsi->ifp);
-#endif /* DEV_NETMAP */
-
ixl_free_pci_resources(pf);
bus_generic_detach(dev);
if_free(vsi->ifp);
@@ -2552,12 +2540,6 @@ ixl_initialize_vsi(struct ixl_vsi *vsi)
rctx.tphdata_ena = 0;
rctx.tphhead_ena = 0;
rctx.lrxqthresh = 2;
-#ifdef DEV_NETMAP
- /* "CRC strip in netmap is conditional" */
- if (vsi->ifp->if_capenable & IFCAP_NETMAP && !ixl_crcstrip)
- rctx.crcstrip = 0;
- else
-#endif /* DEV_NETMAP */
rctx.crcstrip = 1;
rctx.l2tsel = 1;
rctx.showiv = 1;
@@ -2581,21 +2563,6 @@ ixl_initialize_vsi(struct ixl_vsi *vsi)
break;
}
wr32(vsi->hw, I40E_QRX_TAIL(que->me), 0);
-#ifdef DEV_NETMAP
- /* TODO appropriately comment
- * Code based on netmap code in ixgbe_init_locked()
- * Messes with what the software sets as queue
- * descriptor tail in hardware.
- */
- if (vsi->ifp->if_capenable & IFCAP_NETMAP)
- {
- struct netmap_adapter *na = NA(vsi->ifp);
- struct netmap_kring *kring = &na->rx_rings[que->me];
- int t = na->num_rx_desc - 1 - kring->nr_hwavail;
-
- wr32(vsi->hw, I40E_QRX_TAIL(que->me), t);
- } else
-#endif /* DEV_NETMAP */
wr32(vsi->hw, I40E_QRX_TAIL(que->me), que->num_desc - 1);
}
return (err);
diff --git a/sys/dev/ixl/ixl.h b/sys/dev/ixl/ixl.h
index 7e99858b2a9e..69be0085f07b 100644
--- a/sys/dev/ixl/ixl.h
+++ b/sys/dev/ixl/ixl.h
@@ -295,9 +295,6 @@ struct ixl_rx_buf {
struct mbuf *fmp;
bus_dmamap_t hmap;
bus_dmamap_t pmap;
-#ifdef DEV_NETMAP
- u64 addr;
-#endif
};
/*
diff --git a/sys/dev/ixl/ixl_txrx.c b/sys/dev/ixl/ixl_txrx.c
index 80678cab827e..0e21421dcc51 100755
--- a/sys/dev/ixl/ixl_txrx.c
+++ b/sys/dev/ixl/ixl_txrx.c
@@ -454,17 +454,9 @@ ixl_init_tx_ring(struct ixl_queue *que)
{
struct tx_ring *txr = &que->txr;
struct ixl_tx_buf *buf;
-#ifdef DEV_NETMAP
- struct ixl_vsi *vsi = que->vsi;
- struct netmap_adapter *na = NA(vsi->ifp);
- struct netmap_slot *slot;
-#endif /* DEV_NETMAP */
/* Clear the old ring contents */
IXL_TX_LOCK(txr);
-#ifdef DEV_NETMAP
- slot = netmap_reset(na, NR_TX, que->me, 0);
-#endif
bzero((void *)txr->base,
(sizeof(struct i40e_tx_desc)) * que->num_desc);
@@ -488,13 +480,6 @@ ixl_init_tx_ring(struct ixl_queue *que)
m_freem(buf->m_head);
buf->m_head = NULL;
}
-#ifdef DEV_NETMAP
- if (slot)
- {
- int si = netmap_idx_n2k(&na->tx_rings[que->me], i);
- netmap_load_map(txr->tag, buf->map, NMB(slot + si));
- }
-#endif
/* Clear the EOP index */
buf->eop_index = -1;
}
@@ -573,9 +558,13 @@ ixl_tx_setup_offload(struct ixl_queue *que,
struct mbuf *mp, u32 *cmd, u32 *off)
{
struct ether_vlan_header *eh;
+#ifdef INET
struct ip *ip = NULL;
+#endif
struct tcphdr *th = NULL;
+#ifdef INET6
struct ip6_hdr *ip6;
+#endif
int elen, ip_hlen = 0, tcp_hlen;
u16 etype;
u8 ipproto = 0;
@@ -681,8 +670,12 @@ ixl_tso_setup(struct ixl_queue *que, struct mbuf *mp)
u16 etype;
int idx, elen, ip_hlen, tcp_hlen;
struct ether_vlan_header *eh;
+#ifdef INET
struct ip *ip;
+#endif
+#ifdef INET6
struct ip6_hdr *ip6;
+#endif
struct tcphdr *th;
u64 type_cmd_tso_mss;
@@ -794,36 +787,6 @@ ixl_txeof(struct ixl_queue *que)
mtx_assert(&txr->mtx, MA_OWNED);
-#ifdef DEV_NETMAP
- if (ifp->if_capenable & IFCAP_NETMAP) {
- struct netmap_adapter *na = NA(ifp);
- struct netmap_kring *kring = &na->tx_rings[que->me];
- tx_desc = txr->base;
- bus_dmamap_sync(txr->dma.tag, txr->dma.map,
- BUS_DMASYNC_POSTREAD);
- if (!netmap_mitigate ||
- (kring->nr_kflags < kring->nkr_num_slots &&
- tx_desc[kring->nr_kflags].cmd_type_offset_bsz &
- htole32(I40E_TX_DESC_DTYPE_DESC_DONE)))
- {
-#if NETMAP_API < 4
- struct ixl_pf *pf = vsi->pf;
- kring->nr_kflags = kring->nkr_num_slots;
- selwakeuppri(&na->tx_rings[que->me].si, PI_NET);
- IXL_TX_UNLOCK(txr);
- IXL_PF_LOCK(pf);
- selwakeuppri(&na->tx_si, PI_NET);
- IXL_PF_UNLOCK(pf);
- IXL_TX_LOCK(txr);
-#else /* NETMAP_API >= 4 */
- netmap_tx_irq(ifp, txr->que->me);
-#endif /* NETMAP_API */
- }
- // XXX guessing there is no more work to be done
- return FALSE;
- }
-#endif /* DEV_NETMAP */
-
/* These are not the descriptors you seek, move along :) */
if (txr->avail == que->num_desc) {
que->busy = 0;
@@ -1011,12 +974,8 @@ no_split:
buf->m_pack = mp;
bus_dmamap_sync(rxr->ptag, buf->pmap,
BUS_DMASYNC_PREREAD);
-#ifdef DEV_NETMAP
- rxr->base[i].read.pkt_addr = buf->addr;
-#else /* !DEV_NETMAP */
rxr->base[i].read.pkt_addr =
htole64(pseg[0].ds_addr);
-#endif /* DEV_NETMAP */
/* Used only when doing header split */
rxr->base[i].read.hdr_addr = 0;
@@ -1127,15 +1086,8 @@ ixl_init_rx_ring(struct ixl_queue *que)
struct ixl_rx_buf *buf;
bus_dma_segment_t pseg[1], hseg[1];
int rsize, nsegs, error = 0;
-#ifdef DEV_NETMAP
- struct netmap_adapter *na = NA(ifp);
- struct netmap_slot *slot;
-#endif /* DEV_NETMAP */
IXL_RX_LOCK(rxr);
-#ifdef DEV_NETMAP
- slot = netmap_reset(na, NR_RX, que->me, 0);
-#endif
/* Clear the ring contents */
rsize = roundup2(que->num_desc *
sizeof(union i40e_rx_desc), DBA_ALIGN);
@@ -1169,21 +1121,6 @@ ixl_init_rx_ring(struct ixl_queue *que)
struct mbuf *mh, *mp;
buf = &rxr->buffers[j];
-#ifdef DEV_NETMAP
- if (slot)
- {
- int sj = netmap_idx_n2k(&na->rx_rings[que->me], j);
- u64 paddr;
- void *addr;
-
- addr = PNMB(slot + sj, &paddr);
- netmap_load_map(rxr->ptag, buf->pmap, addr);
- /* Update descriptor and cached value */
- rxr->base[j].read.pkt_addr = htole64(paddr);
- buf->addr = htole64(paddr);
- continue;
- }
-#endif /* DEV_NETMAP */
/*
** Don't allocate mbufs if not
** doing header split, its wasteful
@@ -1416,29 +1353,6 @@ ixl_rxeof(struct ixl_queue *que, int count)
IXL_RX_LOCK(rxr);
-#ifdef DEV_NETMAP
-#if NETMAP_API < 4
- if (ifp->if_capenable & IFCAP_NETMAP)
- {
- struct netmap_adapter *na = NA(ifp);
-
- na->rx_rings[que->me].nr_kflags |= NKR_PENDINTR;
- selwakeuppri(&na->rx_rings[que->me].si, PI_NET);
- IXL_RX_UNLOCK(rxr);
- IXL_PF_LOCK(vsi->pf);
- selwakeuppri(&na->rx_si, PI_NET);
- IXL_PF_UNLOCK(vsi->pf);
- return (FALSE);
- }
-#else /* NETMAP_API >= 4 */
- if (netmap_rx_irq(ifp, que->me, &processed))
- {
- IXL_RX_UNLOCK(rxr);
- return (FALSE);
- }
-#endif /* NETMAP_API */
-#endif /* DEV_NETMAP */
-
for (i = rxr->next_check; count != 0;) {
struct mbuf *sendmp, *mh, *mp;
u32 rsc, status, error;