cvs commit: src/sys/dev/netif/nfe if_nfe.c
Matthew Dillon
dillon at apollo.backplane.com
Fri Aug 10 11:13:03 PDT 2007
:+ /* this doesn't work */
: if (flags &
: (NFE_RX_UDP_CSUMOK_V2 | NFE_RX_TCP_CSUMOK_V2)) {
: m->m_pkthdr.csum_flags |= CSUM_DATA_VALID |
: CSUM_PSEUDO_HDR;
: m->m_pkthdr.csum_data = 0xffff;
: }
I think I found the problem. Well, two problems.
First, take a look at ip_input.c line 1292. If CSUM_DATA_VALID and
CSUM_PSEUDO_HDR are set in all the fragments, the m->m_pkthdr.csum_data
calculation in ip_input will case csum_data to be invalid (i.e. it
will not remain 0xffff) and cause the UDP checksum test, which XORs
csum_data with 0xffff, to fail.
The second problem is the fact that the ethernet interface is setting
UDP/TCP CSUMOK on a packet fragment in the first place. There is no
way that NFE could possibly know whether the UDP/TCP checksum is
correct on a fragment.
I dont want our network interfaces to get into the business of
interpreting the contents of the packet, though, so I'm not sure
what the solution is. Perhaps we should adjust our IP defragmenter
to just clean out the CSUM_DATA_VALID and CSUM_PSEUDO_HDR flags.
-Matt
Matthew Dillon
<dillon at backplane.com>
More information about the Commits
mailing list