summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authortuexen <tuexen@FreeBSD.org>2016-02-25 19:21:46 +0000
committertuexen <tuexen@FreeBSD.org>2016-02-25 19:21:46 +0000
commitbc35a041ddda285713bc6a855e010a3fcde21d3c (patch)
tree8678aba9e105d82929f977bd19ffce6ddff763b2 /sys/dev
parentfee8ce16d0e5a564121a92eacc94ea3d29187dec (diff)
downloadFreeBSD-src-bc35a041ddda285713bc6a855e010a3fcde21d3c.zip
FreeBSD-src-bc35a041ddda285713bc6a855e010a3fcde21d3c.tar.gz
MFC r295273:
In FreeBSD 10 and higher the driver announces SCTP checksum offloading support also for 82598, which doesn't support it. The legacy code has a check for it, which was missed when the code for dealing with CSUM_IP6_* was added. Add the same check for FreeBSD 10 and higher. Approved by: re (marius) Differential Revision: D5192
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ixgbe/if_ix.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c
index 65e868a..b06c485 100644
--- a/sys/dev/ixgbe/if_ix.c
+++ b/sys/dev/ixgbe/if_ix.c
@@ -1024,6 +1024,7 @@ static void
ixgbe_set_if_hwassist(struct adapter *adapter)
{
struct ifnet *ifp = adapter->ifp;
+ struct ixgbe_hw *hw = &adapter->hw;
ifp->if_hwassist = 0;
#if __FreeBSD_version >= 1000000
@@ -1031,18 +1032,21 @@ ixgbe_set_if_hwassist(struct adapter *adapter)
ifp->if_hwassist |= CSUM_IP_TSO;
if (ifp->if_capenable & IFCAP_TSO6)
ifp->if_hwassist |= CSUM_IP6_TSO;
- if (ifp->if_capenable & IFCAP_TXCSUM)
- ifp->if_hwassist |= (CSUM_IP | CSUM_IP_UDP | CSUM_IP_TCP |
- CSUM_IP_SCTP);
- if (ifp->if_capenable & IFCAP_TXCSUM_IPV6)
- ifp->if_hwassist |= (CSUM_IP6_UDP | CSUM_IP6_TCP |
- CSUM_IP6_SCTP);
+ if (ifp->if_capenable & IFCAP_TXCSUM) {
+ ifp->if_hwassist |= (CSUM_IP | CSUM_IP_UDP | CSUM_IP_TCP);
+ if (hw->mac.type != ixgbe_mac_82598EB)
+ ifp->if_hwassist |= CSUM_IP_SCTP;
+ }
+ if (ifp->if_capenable & IFCAP_TXCSUM_IPV6) {
+ ifp->if_hwassist |= (CSUM_IP6_UDP | CSUM_IP6_TCP);
+ if (hw->mac.type != ixgbe_mac_82598EB)
+ ifp->if_hwassist |= CSUM_IP6_SCTP;
+ }
#else
if (ifp->if_capenable & IFCAP_TSO)
ifp->if_hwassist |= CSUM_TSO;
if (ifp->if_capenable & IFCAP_TXCSUM) {
ifp->if_hwassist |= (CSUM_TCP | CSUM_UDP);
- struct ixgbe_hw *hw = &adapter->hw;
if (hw->mac.type != ixgbe_mac_82598EB)
ifp->if_hwassist |= CSUM_SCTP;
}
OpenPOWER on IntegriCloud