summaryrefslogtreecommitdiffstats
path: root/sys/dev/e1000/if_igb.c
diff options
context:
space:
mode:
authortuexen <tuexen@FreeBSD.org>2016-01-17 14:16:26 +0000
committertuexen <tuexen@FreeBSD.org>2016-01-17 14:16:26 +0000
commit1a1e0a276e2e48fe7e83af6afc4ab1a04bb0a0e2 (patch)
tree63add70b07d3fe6ab8c7a85d29a805a41a8196b7 /sys/dev/e1000/if_igb.c
parent1dededab5da0fca1176382ffdac8030a7ac3cbce (diff)
downloadFreeBSD-src-1a1e0a276e2e48fe7e83af6afc4ab1a04bb0a0e2.zip
FreeBSD-src-1a1e0a276e2e48fe7e83af6afc4ab1a04bb0a0e2.tar.gz
MFC r290641:
Add support for SCTP checksum offloading for the 82580 controller similar to the 82576 controller. Tested with Intel i340 cards.
Diffstat (limited to 'sys/dev/e1000/if_igb.c')
-rw-r--r--sys/dev/e1000/if_igb.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/dev/e1000/if_igb.c b/sys/dev/e1000/if_igb.c
index 6ad045b..2e23d9d 100644
--- a/sys/dev/e1000/if_igb.c
+++ b/sys/dev/e1000/if_igb.c
@@ -1323,7 +1323,8 @@ igb_init_locked(struct adapter *adapter)
if (ifp->if_capenable & IFCAP_TXCSUM) {
ifp->if_hwassist |= (CSUM_TCP | CSUM_UDP);
#if __FreeBSD_version >= 800000
- if (adapter->hw.mac.type == e1000_82576)
+ if ((adapter->hw.mac.type == e1000_82576) ||
+ (adapter->hw.mac.type == e1000_82580))
ifp->if_hwassist |= CSUM_SCTP;
#endif
}
@@ -4609,8 +4610,9 @@ igb_initialize_receive_units(struct adapter *adapter)
rxcsum |= E1000_RXCSUM_PCSD;
#if __FreeBSD_version >= 800000
/* For SCTP Offload */
- if ((hw->mac.type == e1000_82576)
- && (ifp->if_capenable & IFCAP_RXCSUM))
+ if (((hw->mac.type == e1000_82576) ||
+ (hw->mac.type == e1000_82580)) &&
+ (ifp->if_capenable & IFCAP_RXCSUM))
rxcsum |= E1000_RXCSUM_CRCOFL;
#endif
} else {
@@ -4618,7 +4620,8 @@ igb_initialize_receive_units(struct adapter *adapter)
if (ifp->if_capenable & IFCAP_RXCSUM) {
rxcsum |= E1000_RXCSUM_IPPCSE;
#if __FreeBSD_version >= 800000
- if (adapter->hw.mac.type == e1000_82576)
+ if ((adapter->hw.mac.type == e1000_82576) ||
+ (adapter->hw.mac.type == e1000_82580))
rxcsum |= E1000_RXCSUM_CRCOFL;
#endif
} else
OpenPOWER on IntegriCloud