diff options
author | arybchik <arybchik@FreeBSD.org> | 2015-05-21 09:24:35 +0000 |
---|---|---|
committer | arybchik <arybchik@FreeBSD.org> | 2015-05-21 09:24:35 +0000 |
commit | 66c1c10ecbc89594d2a78688d1b27fb7d3c8cf22 (patch) | |
tree | 2faa8f5953b35da7fb5acd7b4b962bf9c0a810e4 /sys | |
parent | 6caf0aa6e9f527ada27dfba28b9895f66733cb98 (diff) | |
download | FreeBSD-src-66c1c10ecbc89594d2a78688d1b27fb7d3c8cf22.zip FreeBSD-src-66c1c10ecbc89594d2a78688d1b27fb7d3c8cf22.tar.gz |
MFC: r283051
sfxge: do not advertise LRO capability if LRO is compiled out
Sponsored by: Solarflare Communications, Inc.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/sfxge/sfxge.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/dev/sfxge/sfxge.c b/sys/dev/sfxge/sfxge.c index 1c8e7f4..b504d5e 100644 --- a/sys/dev/sfxge/sfxge.c +++ b/sys/dev/sfxge/sfxge.c @@ -62,7 +62,7 @@ __FBSDID("$FreeBSD$"); IFCAP_RXCSUM | IFCAP_TXCSUM | \ IFCAP_RXCSUM_IPV6 | IFCAP_TXCSUM_IPV6 | \ IFCAP_TSO4 | IFCAP_TSO6 | \ - IFCAP_JUMBO_MTU | IFCAP_LRO | \ + IFCAP_JUMBO_MTU | \ IFCAP_VLAN_HWTSO | IFCAP_LINKSTATE) #define SFXGE_CAP_ENABLE SFXGE_CAP #define SFXGE_CAP_FIXED (IFCAP_VLAN_MTU | \ @@ -88,7 +88,6 @@ SYSCTL_INT(_hw_sfxge, OID_AUTO, tx_ring, CTLFLAG_RDTUN, &sfxge_tx_ring_entries, 0, "Maximum number of descriptors in a transmit ring"); - static void sfxge_reset(void *arg, int npending); @@ -376,6 +375,12 @@ sfxge_ifnet_init(struct ifnet *ifp, struct sfxge_softc *sc) ifp->if_capabilities = SFXGE_CAP; ifp->if_capenable = SFXGE_CAP_ENABLE; + +#ifdef SFXGE_LRO + ifp->if_capabilities |= IFCAP_LRO; + ifp->if_capenable |= IFCAP_LRO; +#endif + ifp->if_hwassist = CSUM_TCP | CSUM_UDP | CSUM_IP | CSUM_TSO | CSUM_TCP_IPV6 | CSUM_UDP_IPV6; |