svn commit: r202731 - stable/7/sys/dev/bge

Pyun YongHyeon yongari at FreeBSD.org
Thu Jan 21 00:54:22 UTC 2010


Author: yongari
Date: Thu Jan 21 00:54:22 2010
New Revision: 202731
URL: http://svn.freebsd.org/changeset/base/202731

Log:
  MFC r202406:
    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)

Modified:
  stable/7/sys/dev/bge/if_bge.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/dev/bge/if_bge.c
==============================================================================
--- stable/7/sys/dev/bge/if_bge.c	Thu Jan 21 00:53:00 2010	(r202730)
+++ stable/7/sys/dev/bge/if_bge.c	Thu Jan 21 00:54:22 2010	(r202731)
@@ -3944,11 +3944,8 @@ bge_encap(struct bge_softc *sc, struct m
 			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;
 	}
 


More information about the svn-src-stable-7 mailing list