Implement transmit checksum offload.
authorAndrew Gallatin <gallatin@google.com>
Thu, 19 Jun 2014 19:29:11 +0000 (12:29 -0700)
committerAndrew Gallatin <gallatin@google.com>
Fri, 20 Jun 2014 16:41:34 +0000 (09:41 -0700)
commit102245e626a981733f344c0597934ece99fa5837
treedce3382190fe9fc6405a76facaf568e8ce6f8f50
parentccbc5610a1b59af9ad16d8cca7bcbb2234b0b43f
Implement transmit checksum offload.

The basic strategy is to put the pseudo hdr sum into the packet
at the TCP/UDP layer and assume we can do checksum offload.
Then when we know we cannot do checksum offload (ip frags,
sending on ether medium to a device which cannot offload,
or sending on a non-loopback medium), we complete the full
checksum.

I have only implemented hardware checksum offload on
an out-of-tree device.

Reviewed-by: rminnich@gmail.com
Signed-off-by: Andrew Gallatin <gallatin@google.com>
kern/drivers/dev/ether.c
kern/include/ip.h
kern/include/ns.h
kern/src/net/ip.c
kern/src/net/netdevmedium.c
kern/src/net/pktmedium.c
kern/src/net/pppmedium.c
kern/src/net/tcp.c
kern/src/net/udp.c
kern/src/ns/qio.c