created | 2022-02-13T19:41:41Z |
---|---|
begin | 2022-02-08T00:00:00Z |
end | 2022-02-08T03:38:00Z |
path | src/sys |
commits | 1 |
date | 2022-02-08T03:38:00Z | |||
---|---|---|---|---|
author | dlg | |||
files | src/sys/dev/pci/if_ix.c | log | diff | annotate |
src/sys/dev/pci/ixgbe.h | log | diff | annotate | |
message |
rework checksum/vlan offloading, and enable it for ipv6 too. this is based on work by jan@ and bluhm@. the most interesting change on top of their work is to move the parsing of the IP packets to figure out ip and udp/tcp offsets before a possible call to m_defrag. if an l4 offload is requested, it's only requested by the stack when the payload is correctly aligned and with each header contiguous in memory. this means you can use m_getptr and cast the packet data to the relevant headers to read them directly because that's what the stack does when it's working on them. this makes it cheap to work on them too. however, if you m_defrag, it ignores the alignment and ends up making it unsafe to dereference the ip and tcp/udp payloads on strict alignment architectures. if we want to look at the headers after m_defrag, we'd likely have to copy them onto the stack first. we got away with this before because we were lucky with the code that's generated on strict alignment archs for looking at the ip hl and proto fields. that luck might run out though. while here i've also tweaked the vlan handling code, and generally tried to make it more readable. ok bluhm@ jmatthew@ |