summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>2001-06-15 19:02:55 +0000
committerwpaul <wpaul@FreeBSD.org>2001-06-15 19:02:55 +0000
commit89fb81a8c41236577dfc1355f0da5d1cf670b37a (patch)
treeb522531997682fddced9c87e9afa42ae067f7220 /sys
parentd524f968646bb58b7756f0a1338163c8cf27a1dc (diff)
downloadFreeBSD-src-89fb81a8c41236577dfc1355f0da5d1cf670b37a.zip
FreeBSD-src-89fb81a8c41236577dfc1355f0da5d1cf670b37a.tar.gz
Turn TCP and UDP hardware RX checksumming back on. jlemon pointed out where
I'd gone wrong before: we have to set csum_data to 0xffff, not 0.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/lge/if_lge.c5
-rw-r--r--sys/dev/nge/if_nge.c4
2 files changed, 3 insertions, 6 deletions
diff --git a/sys/dev/lge/if_lge.c b/sys/dev/lge/if_lge.c
index 35cdc4d..ea91f9b 100644
--- a/sys/dev/lge/if_lge.c
+++ b/sys/dev/lge/if_lge.c
@@ -1023,16 +1023,15 @@ static void lge_rxeof(sc, cnt)
m->m_pkthdr.csum_flags |= CSUM_IP_CHECKED;
if (!(rxsts & LGE_RXSTS_IPCSUMERR))
m->m_pkthdr.csum_flags |= CSUM_IP_VALID;
-#ifdef notyet
if ((rxsts & LGE_RXSTS_ISTCP &&
!(rxsts & LGE_RXSTS_TCPCSUMERR)) ||
(rxsts & LGE_RXSTS_ISUDP &&
!(rxsts & LGE_RXSTS_UDPCSUMERR))) {
m->m_pkthdr.csum_flags |=
CSUM_DATA_VALID|CSUM_PSEUDO_HDR;
- m->m_pkthdr.csum_data = 0;
+ m->m_pkthdr.csum_data = 0xffff;
}
-#endif
+
ether_input(ifp, eh, m);
}
diff --git a/sys/dev/nge/if_nge.c b/sys/dev/nge/if_nge.c
index 7b5baa6..ff1b53d 100644
--- a/sys/dev/nge/if_nge.c
+++ b/sys/dev/nge/if_nge.c
@@ -1293,16 +1293,14 @@ static void nge_rxeof(sc)
m->m_pkthdr.csum_flags |= CSUM_IP_CHECKED;
if (!(extsts & NGE_RXEXTSTS_IPCSUMERR))
m->m_pkthdr.csum_flags |= CSUM_IP_VALID;
-#ifdef notdef
if ((extsts & NGE_RXEXTSTS_TCPPKT &&
!(extsts & NGE_RXEXTSTS_TCPCSUMERR)) ||
(extsts & NGE_RXEXTSTS_UDPPKT &&
!(extsts & NGE_RXEXTSTS_UDPCSUMERR))) {
m->m_pkthdr.csum_flags |=
CSUM_DATA_VALID|CSUM_PSEUDO_HDR;
- m->m_pkthdr.csum_data = 0;
+ m->m_pkthdr.csum_data = 0xffff;
}
-#endif
}
#if NVLAN > 0
OpenPOWER on IntegriCloud