diff options
author | glebius <glebius@FreeBSD.org> | 2014-09-19 09:01:19 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2014-09-19 09:01:19 +0000 |
commit | 72f04611ecabbe285f19e3d4976b5a12fda23dc0 (patch) | |
tree | 2346dc2a57057cf36e1f65ce69915934b9e9b825 /sys/netgraph | |
parent | 85e6d8134a2e10b38acdc198135c6a72083ac01c (diff) | |
download | FreeBSD-src-72f04611ecabbe285f19e3d4976b5a12fda23dc0.zip FreeBSD-src-72f04611ecabbe285f19e3d4976b5a12fda23dc0.tar.gz |
Remove ifq_drops from struct ifqueue. Now queue drops are accounted in
struct ifnet if_oqdrops.
Some netgraph modules used ifqueue w/o ifnet. Accounting of queue drops
is simply removed from them. There were no API to read this statistic.
Sponsored by: Netflix
Sponsored by: Nginx, Inc.
Diffstat (limited to 'sys/netgraph')
-rw-r--r-- | sys/netgraph/bluetooth/drivers/bt3c/ng_bt3c_pccard.c | 2 | ||||
-rw-r--r-- | sys/netgraph/bluetooth/drivers/h4/ng_h4.c | 1 | ||||
-rw-r--r-- | sys/netgraph/ng_device.c | 1 | ||||
-rw-r--r-- | sys/netgraph/ng_iface.c | 5 | ||||
-rw-r--r-- | sys/netgraph/ng_tty.c | 1 |
5 files changed, 1 insertions, 9 deletions
diff --git a/sys/netgraph/bluetooth/drivers/bt3c/ng_bt3c_pccard.c b/sys/netgraph/bluetooth/drivers/bt3c/ng_bt3c_pccard.c index f2930ab..9b174bb 100644 --- a/sys/netgraph/bluetooth/drivers/bt3c/ng_bt3c_pccard.c +++ b/sys/netgraph/bluetooth/drivers/bt3c/ng_bt3c_pccard.c @@ -560,7 +560,6 @@ ng_bt3c_rcvdata(hook_p hook, item_p item) NG_BT3C_ERR(sc->dev, "Outgoing queue is full. Dropping mbuf, len=%d\n", m->m_pkthdr.len); - _IF_DROP(&sc->outq); NG_BT3C_STAT_OERROR(sc->stat); NG_FREE_M(m); @@ -939,7 +938,6 @@ bt3c_receive(bt3c_softc_p sc) NG_BT3C_ERR(sc->dev, "Incoming queue is full. Dropping mbuf, len=%d\n", sc->m->m_pkthdr.len); - _IF_DROP(&sc->inq); NG_BT3C_STAT_IERROR(sc->stat); NG_FREE_M(sc->m); diff --git a/sys/netgraph/bluetooth/drivers/h4/ng_h4.c b/sys/netgraph/bluetooth/drivers/h4/ng_h4.c index 97cee2e..5cb0386 100644 --- a/sys/netgraph/bluetooth/drivers/h4/ng_h4.c +++ b/sys/netgraph/bluetooth/drivers/h4/ng_h4.c @@ -798,7 +798,6 @@ ng_h4_rcvdata(hook_p hook, item_p item) NG_NODE_NAME(sc->node), m->m_pkthdr.len); NG_H4_STAT_OERROR(sc->stat); - _IF_DROP(&sc->outq); NG_H4_UNLOCK(sc); diff --git a/sys/netgraph/ng_device.c b/sys/netgraph/ng_device.c index 723fbca..cb40e69 100644 --- a/sys/netgraph/ng_device.c +++ b/sys/netgraph/ng_device.c @@ -270,7 +270,6 @@ ng_device_rcvdata(hook_p hook, item_p item) IF_LOCK(&priv->readq); if (_IF_QFULL(&priv->readq)) { - _IF_DROP(&priv->readq); IF_UNLOCK(&priv->readq); NG_FREE_M(m); return (ENOBUFS); diff --git a/sys/netgraph/ng_iface.c b/sys/netgraph/ng_iface.c index ea83b97..7326d3e 100644 --- a/sys/netgraph/ng_iface.c +++ b/sys/netgraph/ng_iface.c @@ -393,10 +393,7 @@ ng_iface_output(struct ifnet *ifp, struct mbuf *m, if (ALTQ_IS_ENABLED(&ifp->if_snd)) { M_PREPEND(m, sizeof(sa_family_t), M_NOWAIT); if (m == NULL) { - IFQ_LOCK(&ifp->if_snd); - IFQ_INC_DROPS(&ifp->if_snd); - IFQ_UNLOCK(&ifp->if_snd); - if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); + if_inc_counter(ifp, IFCOUNTER_OQDROPS, 1); return (ENOBUFS); } *(sa_family_t *)m->m_data = af; diff --git a/sys/netgraph/ng_tty.c b/sys/netgraph/ng_tty.c index 35e1734..5e794a8 100644 --- a/sys/netgraph/ng_tty.c +++ b/sys/netgraph/ng_tty.c @@ -327,7 +327,6 @@ ngt_rcvdata(hook_p hook, item_p item) IF_LOCK(&sc->outq); if (_IF_QFULL(&sc->outq)) { - _IF_DROP(&sc->outq); IF_UNLOCK(&sc->outq); NG_FREE_M(m); return (ENOBUFS); |