Per jlemon: add code to nge_rxeof() to allow verification of TCP and
UDP checksums too, not just IP. The chip only tells us if the checksum is ok, it does not give us a copy of the partial checksum for later processing. We have to deal with this the right way, but we can deal with it.
This commit is contained in:
parent
49ca4f3f52
commit
2195de46d3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=77440
@ -1293,6 +1293,14 @@ static void nge_rxeof(sc)
|
||||
m->m_pkthdr.csum_flags |= CSUM_IP_CHECKED;
|
||||
if (!(extsts & NGE_RXEXTSTS_IPCSUMERR))
|
||||
m->m_pkthdr.csum_flags |= CSUM_IP_VALID;
|
||||
if ((extsts & NGE_RXEXTSTS_TCPPKT &&
|
||||
!(extsts & NGE_RXEXTSTS_TCPCSUMERR)) ||
|
||||
(extsts & NGE_RXEXTSTS_UDPPKT &&
|
||||
!(extsts & NGE_RXEXTSTS_UDPCSUMERR))) {
|
||||
m->m_pkthdr.csum_flags |=
|
||||
CSUM_DATA_VALID|CSUM_PSEUDO_HDR;
|
||||
m->m_pkthdr.csum_data = 0;
|
||||
}
|
||||
}
|
||||
|
||||
#if NVLAN > 0
|
||||
|
Loading…
Reference in New Issue
Block a user