diff options
author | yongari <yongari@FreeBSD.org> | 2008-03-07 04:55:58 +0000 |
---|---|---|
committer | yongari <yongari@FreeBSD.org> | 2008-03-07 04:55:58 +0000 |
commit | 203bcbf2294c9307a4f5a32d3b9d7af15b0f8428 (patch) | |
tree | 6cea6b7dfb3f69bdfef57c8e11f7b4e28e5f6110 /sys/dev/msk | |
parent | 6de20f8883ef98ddddd52292641151e20433c748 (diff) | |
download | FreeBSD-src-203bcbf2294c9307a4f5a32d3b9d7af15b0f8428.zip FreeBSD-src-203bcbf2294c9307a4f5a32d3b9d7af15b0f8428.tar.gz |
To overcome hardware checksum offload bug msk(4) used to compute
TCP/UDP checksum in driver for short frames. For frames that requires
hardware VLAN tag insertion, the checksum offload trick does not
work due to changes of checksum offset in mbuf after the VLAN tag.
Disable hardware checksum offload for VLAN interface to fix the bug.
Reported by: Christopher Cowart < ccowart AT rescomp DOT berkeley DOT edu >
Tested by: Christopher Cowart < ccowart AT rescomp DOT berkeley DOT edu >
MFC after: 5 days
Diffstat (limited to 'sys/dev/msk')
-rw-r--r-- | sys/dev/msk/if_msk.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/msk/if_msk.c b/sys/dev/msk/if_msk.c index bb4ba13..6b315dd 100644 --- a/sys/dev/msk/if_msk.c +++ b/sys/dev/msk/if_msk.c @@ -1488,8 +1488,12 @@ msk_attach(device_t dev) /* VLAN capability setup */ ifp->if_capabilities |= IFCAP_VLAN_MTU | IFCAP_VLAN_HWTAGGING; - if (ifp->if_capabilities & IFCAP_HWCSUM) - ifp->if_capabilities |= IFCAP_VLAN_HWCSUM; + /* + * Due to Tx checksum offload hardware bugs, msk(4) manually + * computes checksum for short frames. For VLAN tagged frames + * this workaround does not work so disable checksum offload + * for VLAN interface. + */ ifp->if_capenable = ifp->if_capabilities; /* |