svn commit: r242425 - head/sys/dev/ti
Author: yongari Date: Thu Nov 1 05:39:21 2012 New Revision: 242425 URL: http://svn.freebsd.org/changeset/base/242425 Log: 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 Modified: head/sys/dev/ti/if_ti.c Modified: head/sys/dev/ti/if_ti.c == --- head/sys/dev/ti/if_ti.c Thu Nov 1 04:07:08 2012(r242424) +++ head/sys/dev/ti/if_ti.c Thu Nov 1 05:39:21 2012(r242425) @@ -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 mbu 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++) { ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r242425 - head/sys/dev/ti
so where'd this happen? interleaved TX nowdays via if_transmit() ? Adrian On 31 October 2012 22:39, Pyun YongHyeon yong...@freebsd.org wrote: Author: yongari Date: Thu Nov 1 05:39:21 2012 New Revision: 242425 URL: http://svn.freebsd.org/changeset/base/242425 Log: 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 Modified: head/sys/dev/ti/if_ti.c Modified: head/sys/dev/ti/if_ti.c == --- head/sys/dev/ti/if_ti.c Thu Nov 1 04:07:08 2012(r242424) +++ head/sys/dev/ti/if_ti.c Thu Nov 1 05:39:21 2012(r242425) @@ -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 mbu 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++) { ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r242425 - head/sys/dev/ti
On Wed, Oct 31, 2012 at 11:16:43PM -0700, Adrian Chadd wrote: so where'd this happen? interleaved TX nowdays via if_transmit() ? if_output after fragmentation. Adrian On 31 October 2012 22:39, Pyun YongHyeon yong...@freebsd.org wrote: Author: yongari Date: Thu Nov 1 05:39:21 2012 New Revision: 242425 URL: http://svn.freebsd.org/changeset/base/242425 Log: 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. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org