Date: Sat, 28 Jul 2012 20:31:39 +0000 (UTC) From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r238871 - head/sys/net Message-ID: <201207282031.q6SKVd6H065020@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bz Date: Sat Jul 28 20:31:39 2012 New Revision: 238871 URL: http://svn.freebsd.org/changeset/base/238871 Log: Hardcode the loopback rx/tx checkum options for IPv6 to on without checking. This allows the FreeBSD 9.1 release process to move forward. Work around the problem that loopback connections to local addresses not on loopback interfaces and not on interfaces w/ IPv6 checksum offloading enabled would not work. A proper fix to allow us to disable the "checksum offload" on loopback for testing, measurements, ... as we allow for IPv4 needs to put in place later. Reported by: tuexen, Matthew Seaman (m.seaman infracaninophile.co.uk) Reported by: Mike Andrews (mandrews bit0.com), kib, ... PR: kern/170070 MFC after: 1 day X-MFC after: re approval Modified: head/sys/net/if_loop.c Modified: head/sys/net/if_loop.c ============================================================================== --- head/sys/net/if_loop.c Sat Jul 28 20:08:14 2012 (r238870) +++ head/sys/net/if_loop.c Sat Jul 28 20:31:39 2012 (r238871) @@ -257,10 +257,20 @@ looutput(struct ifnet *ifp, struct mbuf m->m_pkthdr.csum_flags &= ~LO_CSUM_FEATURES; break; case AF_INET6: +#if 0 + /* + * XXX-BZ for now always claim the checksum is good despite + * any interface flags. This is a workaround for 9.1-R and + * a proper solution ought to be sought later. + */ if (ifp->if_capenable & IFCAP_RXCSUM_IPV6) { m->m_pkthdr.csum_data = 0xffff; m->m_pkthdr.csum_flags = LO_CSUM_SET; } +#else + m->m_pkthdr.csum_data = 0xffff; + m->m_pkthdr.csum_flags = LO_CSUM_SET; +#endif m->m_pkthdr.csum_flags &= ~LO_CSUM_FEATURES6; break; case AF_IPX: @@ -446,15 +456,29 @@ loioctl(struct ifnet *ifp, u_long cmd, c ifp->if_capenable ^= IFCAP_RXCSUM; if ((mask & IFCAP_TXCSUM) != 0) ifp->if_capenable ^= IFCAP_TXCSUM; - if ((mask & IFCAP_RXCSUM_IPV6) != 0) + if ((mask & IFCAP_RXCSUM_IPV6) != 0) { +#if 0 ifp->if_capenable ^= IFCAP_RXCSUM_IPV6; - if ((mask & IFCAP_TXCSUM_IPV6) != 0) +#else + error = EOPNOTSUPP; + break; +#endif + } + if ((mask & IFCAP_TXCSUM_IPV6) != 0) { +#if 0 ifp->if_capenable ^= IFCAP_TXCSUM_IPV6; +#else + error = EOPNOTSUPP; + break; +#endif + } ifp->if_hwassist = 0; if (ifp->if_capenable & IFCAP_TXCSUM) ifp->if_hwassist = LO_CSUM_FEATURES; +#if 0 if (ifp->if_capenable & IFCAP_TXCSUM_IPV6) ifp->if_hwassist |= LO_CSUM_FEATURES6; +#endif break; default:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201207282031.q6SKVd6H065020>