summaryrefslogtreecommitdiffstats
path: root/sys/dev/ti
diff options
context:
space:
mode:
authoryongari <yongari@FreeBSD.org>2012-11-01 05:39:21 +0000
committeryongari <yongari@FreeBSD.org>2012-11-01 05:39:21 +0000
commitb74553a000b49c1fef59a0d42866bff5c18589e6 (patch)
tree111fbd73d785270b4d5d09792286342909fec447 /sys/dev/ti
parent17ead000b575c7ce3afe8be8c407ecccce71aa96 (diff)
downloadFreeBSD-src-b74553a000b49c1fef59a0d42866bff5c18589e6.zip
FreeBSD-src-b74553a000b49c1fef59a0d42866bff5c18589e6.tar.gz
Remove TCP/UDP checksum offloading feature for IP fragmented
datagrams. Traditionally upper stack fragmented packets without computing TCP/UDP checksum and these datagrams were passed to driver. But there are chances that other packets slip into the interface queue in SMP world. If this happens firmware running on MIPS 4000 processor in the controller would see mixed packets and it shall send out corrupted packets. While I'm here simplify checksum offloading setup. MFC After: 1 week
Diffstat (limited to 'sys/dev/ti')
-rw-r--r--sys/dev/ti/if_ti.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/sys/dev/ti/if_ti.c b/sys/dev/ti/if_ti.c
index ead6901..aadd88c 100644
--- a/sys/dev/ti/if_ti.c
+++ b/sys/dev/ti/if_ti.c
@@ -127,7 +127,7 @@ __FBSDID("$FreeBSD$");
#include <sys/sysctl.h>
-#define TI_CSUM_FEATURES (CSUM_IP | CSUM_TCP | CSUM_UDP | CSUM_IP_FRAGS)
+#define TI_CSUM_FEATURES (CSUM_IP | CSUM_TCP | CSUM_UDP)
/*
* We can only turn on header splitting if we're using extended receive
* BDs.
@@ -3082,16 +3082,10 @@ ti_encap(struct ti_softc *sc, struct mbuf **m_head)
m = *m_head;
csum_flags = 0;
- if (m->m_pkthdr.csum_flags) {
- if (m->m_pkthdr.csum_flags & CSUM_IP)
- csum_flags |= TI_BDFLAG_IP_CKSUM;
- if (m->m_pkthdr.csum_flags & (CSUM_TCP | CSUM_UDP))
- csum_flags |= TI_BDFLAG_TCP_UDP_CKSUM;
- if (m->m_flags & M_LASTFRAG)
- csum_flags |= TI_BDFLAG_IP_FRAG_END;
- else if (m->m_flags & M_FRAG)
- csum_flags |= TI_BDFLAG_IP_FRAG;
- }
+ if (m->m_pkthdr.csum_flags & CSUM_IP)
+ csum_flags |= TI_BDFLAG_IP_CKSUM;
+ if (m->m_pkthdr.csum_flags & (CSUM_TCP | CSUM_UDP))
+ csum_flags |= TI_BDFLAG_TCP_UDP_CKSUM;
frag = sc->ti_tx_saved_prodidx;
for (i = 0; i < nseg; i++) {
OpenPOWER on IntegriCloud