summaryrefslogtreecommitdiffstats
path: root/sys/dev/ixl/if_ixl.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/ixl/if_ixl.c')
-rwxr-xr-xsys/dev/ixl/if_ixl.c45
1 files changed, 6 insertions, 39 deletions
diff --git a/sys/dev/ixl/if_ixl.c b/sys/dev/ixl/if_ixl.c
index de3f817..e381f4e 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);
@@ -2300,7 +2288,7 @@ ixl_setup_interface(device_t dev, struct ixl_vsi *vsi)
/*
* Tell the upper layer(s) we support long frames.
*/
- ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);
+ ifp->if_hdrlen = sizeof(struct ether_vlan_header);
ifp->if_capabilities |= IFCAP_HWCSUM;
ifp->if_capabilities |= IFCAP_HWCSUM_IPV6;
@@ -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);
@@ -4016,11 +3983,11 @@ ixl_print_debug_info(struct ixl_pf *pf)
u32 reg;
- printf("Queue irqs = %lx\n", que->irqs);
- printf("AdminQ irqs = %lx\n", pf->admin_irq);
+ printf("Queue irqs = %jx\n", (uintmax_t)que->irqs);
+ printf("AdminQ irqs = %jx\n", (uintmax_t)pf->admin_irq);
printf("RX next check = %x\n", rxr->next_check);
- printf("RX not ready = %lx\n", rxr->not_done);
- printf("RX packets = %lx\n", rxr->rx_packets);
+ printf("RX not ready = %jx\n", (uintmax_t)rxr->not_done);
+ printf("RX packets = %jx\n", (uintmax_t)rxr->rx_packets);
printf("TX desc avail = %x\n", txr->avail);
reg = rd32(hw, I40E_GLV_GORCL(0xc));
@@ -4161,7 +4128,7 @@ ixl_stat_update48(struct i40e_hw *hw, u32 hireg, u32 loreg,
{
u64 new_data;
-#if __FreeBSD__ >= 10 && __amd64__
+#if defined(__FreeBSD__) && (__FreeBSD_version >= 1000000) && defined(__amd64__)
new_data = rd64(hw, loreg);
#else
/*
OpenPOWER on IntegriCloud