summaryrefslogtreecommitdiffstats
path: root/sys/netgraph/ng_pipe.c
diff options
context:
space:
mode:
authorzec <zec@FreeBSD.org>2013-11-08 22:40:33 +0000
committerzec <zec@FreeBSD.org>2013-11-08 22:40:33 +0000
commit8dc17b647d0f928a9aac0537525c985bc2398e9e (patch)
tree1167b668763d71dd5dfd7fa5ef9fb7968891776a /sys/netgraph/ng_pipe.c
parent6b902f8b1212479a095e4ffb379bb87416cbc5ac (diff)
downloadFreeBSD-src-8dc17b647d0f928a9aac0537525c985bc2398e9e.zip
FreeBSD-src-8dc17b647d0f928a9aac0537525c985bc2398e9e.tar.gz
Eliminate duplicated & dead code.
MFC after: 3 days
Diffstat (limited to 'sys/netgraph/ng_pipe.c')
-rw-r--r--sys/netgraph/ng_pipe.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/sys/netgraph/ng_pipe.c b/sys/netgraph/ng_pipe.c
index 11ea814..72c3b87 100644
--- a/sys/netgraph/ng_pipe.c
+++ b/sys/netgraph/ng_pipe.c
@@ -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++;
}
/*
OpenPOWER on IntegriCloud