Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Nov 2013 22:40:33 +0000 (UTC)
From:      Marko Zec <zec@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r257868 - head/sys/netgraph
Message-ID:  <201311082240.rA8MeXJC085177@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: zec
Date: Fri Nov  8 22:40:33 2013
New Revision: 257868
URL: http://svnweb.freebsd.org/changeset/base/257868

Log:
  Eliminate duplicated & dead code.
  
  MFC after:	3 days

Modified:
  head/sys/netgraph/ng_pipe.c

Modified: head/sys/netgraph/ng_pipe.c
==============================================================================
--- head/sys/netgraph/ng_pipe.c	Fri Nov  8 22:29:07 2013	(r257867)
+++ head/sys/netgraph/ng_pipe.c	Fri Nov  8 22:40:33 2013	(r257868)
@@ -705,35 +705,6 @@ ngp_rcvdata(hook_p hook, item_p item)
 		}
 		hinfo->run.qin_frames--;
 		hinfo->stats.in_disc_frames++;
-	} else if (hinfo->run.qin_frames > hinfo->cfg.qin_size_limit) {
-		struct mbuf *m1;
-		int longest = 0;
-
-		/* Find the longest queue */
-		TAILQ_FOREACH(ngp_f1, &hinfo->fifo_head, fifo_le)
-			if (ngp_f1->packets > longest) {
-				longest = ngp_f1->packets;
-				ngp_f = ngp_f1;
-			}
-
-		/* Drop a frame from the queue head/tail, depending on cfg */
-		if (hinfo->cfg.drophead) 
-			ngp_h = TAILQ_FIRST(&ngp_f->packet_head);
-		else 
-			ngp_h = TAILQ_LAST(&ngp_f->packet_head, p_head);
-		TAILQ_REMOVE(&ngp_f->packet_head, ngp_h, ngp_link);
-		m1 = ngp_h->m;
-		uma_zfree(ngp_zone, ngp_h);
-		hinfo->run.qin_octets -= m1->m_pkthdr.len;
-		hinfo->stats.in_disc_octets += m1->m_pkthdr.len;
-		m_freem(m1);
-		if (--(ngp_f->packets) == 0) {
-			TAILQ_REMOVE(&hinfo->fifo_head, ngp_f, fifo_le);
-			uma_zfree(ngp_zone, ngp_f);
-			hinfo->run.fifo_queues--;
-		}
-		hinfo->run.qin_frames--;
-		hinfo->stats.in_disc_frames++;
 	}
 
 	/*



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