mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-13 14:40:22 +00:00
Fix TX bug: when using TCP/IP checksum offload on TX, we tell the chip
we want the checksums calculated on a per-packet basis using control bits in the extsts field of the DMA descriptor structure. For TX, the chip seems to want these bits set in the field of the first descriptor in a fragment chain, not the last.
This commit is contained in:
parent
cf5e44f88e
commit
1bacd83aea
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=78286
@ -1546,16 +1546,16 @@ static int nge_encap(sc, m_head, txidx)
|
||||
if (m != NULL)
|
||||
return(ENOBUFS);
|
||||
|
||||
sc->nge_ldata->nge_tx_list[cur].nge_extsts = 0;
|
||||
sc->nge_ldata->nge_tx_list[*txidx].nge_extsts = 0;
|
||||
if (m_head->m_pkthdr.csum_flags) {
|
||||
if (m_head->m_pkthdr.csum_flags & CSUM_IP)
|
||||
sc->nge_ldata->nge_tx_list[cur].nge_extsts |=
|
||||
sc->nge_ldata->nge_tx_list[*txidx].nge_extsts |=
|
||||
NGE_TXEXTSTS_IPCSUM;
|
||||
if (m_head->m_pkthdr.csum_flags & CSUM_TCP)
|
||||
sc->nge_ldata->nge_tx_list[cur].nge_extsts |=
|
||||
sc->nge_ldata->nge_tx_list[*txidx].nge_extsts |=
|
||||
NGE_TXEXTSTS_TCPCSUM;
|
||||
if (m_head->m_pkthdr.csum_flags & CSUM_UDP)
|
||||
sc->nge_ldata->nge_tx_list[cur].nge_extsts |=
|
||||
sc->nge_ldata->nge_tx_list[*txidx].nge_extsts |=
|
||||
NGE_TXEXTSTS_UDPCSUM;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user