Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Jan 2010 17:55:19 +0000 (UTC)
From:      Pyun YongHyeon <yongari@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r202406 - head/sys/dev/bge
Message-ID:  <201001151755.o0FHtJDF046742@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: yongari
Date: Fri Jan 15 17:55:18 2010
New Revision: 202406
URL: http://svn.freebsd.org/changeset/base/202406

Log:
  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:
  head/sys/dev/bge/if_bge.c

Modified: head/sys/dev/bge/if_bge.c
==============================================================================
--- head/sys/dev/bge/if_bge.c	Fri Jan 15 16:57:53 2010	(r202405)
+++ head/sys/dev/bge/if_bge.c	Fri Jan 15 17:55:18 2010	(r202406)
@@ -3950,11 +3950,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;
 	}
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001151755.o0FHtJDF046742>