1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00

Don't free mbuf chains when bge(4) fails to collapse the mbuf

chains. This part of code is to enhance performance so failing the
collapsing should not free TX frames. Otherwise bge(4) will
unnecessarily drop frames which in turn can freeze the network
connection.

Reported by:	Igor Sysoev (is <> rambler-co dot ru)
Tested by:	Igor Sysoev (is <> rambler-co dot ru)
This commit is contained in:
Pyun YongHyeon 2010-01-15 17:55:18 +00:00
parent a26cb6d547
commit 261f04d654
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=202406

View File

@ -3950,11 +3950,8 @@ bge_encap(struct bge_softc *sc, struct mbuf **m_head, uint32_t *txidx)
m = m_defrag(m, M_DONTWAIT);
else
m = m_collapse(m, M_DONTWAIT, sc->bge_forced_collapse);
if (m == NULL) {
m_freem(*m_head);
*m_head = NULL;
return (ENOBUFS);
}
if (m == NULL)
m = *m_head;
*m_head = m;
}