]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
It turns out that too many drivers are not only parsing the L2/3/4
authorBjoern A. Zeeb <bz@FreeBSD.org>
Mon, 28 May 2012 09:30:13 +0000 (09:30 +0000)
committerBjoern A. Zeeb <bz@FreeBSD.org>
Mon, 28 May 2012 09:30:13 +0000 (09:30 +0000)
commit356ab07e2dba0f8e7300f2ffc2cf1c175aad34a8
tree5f5a5c87a324064ee224e0476ab7846e52c50a3d
parent81174e787263a18dbd1fcc6b8cf211d314d170ae
It turns out that too many drivers are not only parsing the L2/3/4
headers for TSO but also for generic checksum offloading.  Ideally we
would only have one common function shared amongst all drivers, and
perhaps when updating them for IPv6 we should introduce that.
Eventually we should provide the meta information along with mbufs to
avoid (re-)parsing entirely.

To not break IPv6 (checksums and offload) and to be able to MFC the
changes without risking to hurt 3rd party drivers, duplicate the v4
framework, as other OSes have done as well.

Introduce interface capability flags for TX/RX checksum offload with
IPv6, to allow independent toggling (where possible).  Add CSUM_*_IPV6
flags for UDP/TCP over IPv6, and reserve further for SCTP, and IPv6
fragmentation.  Define CSUM_DELAY_DATA_IPV6 as we do for legacy IP and
add an alias for CSUM_DATA_VALID_IPV6.

This pretty much brings IPv6 handling in line with IPv4.
TSO is still handled in a different way and not via if_hwassist.

Update ifconfig to allow (un)setting of the new capability flags.
Update loopback to announce the new capabilities and if_hwassist flags.

Individual driver updates will have to follow, as will SCTP.

Reported by: gallatin, dim, ..
Reviewed by: gallatin (glanced at?)
MFC after: 3 days
X-MFC with: r235961,235959,235958
14 files changed:
sbin/ifconfig/ifconfig.8
sbin/ifconfig/ifconfig.c
sys/net/if.h
sys/net/if_loop.c
sys/netinet/tcp_input.c
sys/netinet/tcp_output.c
sys/netinet/tcp_subr.c
sys/netinet/tcp_syncache.c
sys/netinet/tcp_timewait.c
sys/netinet6/ip6_forward.c
sys/netinet6/ip6_ipsec.c
sys/netinet6/ip6_output.c
sys/netinet6/udp6_usrreq.c
sys/sys/mbuf.h