summaryrefslogtreecommitdiffstats
path: root/sys/netgraph
diff options
context:
space:
mode:
authorharti <harti@FreeBSD.org>2004-01-26 14:46:35 +0000
committerharti <harti@FreeBSD.org>2004-01-26 14:46:35 +0000
commit08907392794ac599412d77613cdc3dcd309f1df5 (patch)
treeb791cd6a0ce2ee6dadb3cf44acd2c223605e92f9 /sys/netgraph
parentcc7ffd1cabeb4a543e86d6b3d1c245d05f82d0a5 (diff)
downloadFreeBSD-src-08907392794ac599412d77613cdc3dcd309f1df5.zip
FreeBSD-src-08907392794ac599412d77613cdc3dcd309f1df5.tar.gz
Should use the non-locking versions of the ifqueue macros to
fiddle around with private queues, because their mutex is not needed. All this processing should be protected by the netgraph locking.
Diffstat (limited to 'sys/netgraph')
-rw-r--r--sys/netgraph/ng_source.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/netgraph/ng_source.c b/sys/netgraph/ng_source.c
index c9fdd01..744b7c1 100644
--- a/sys/netgraph/ng_source.c
+++ b/sys/netgraph/ng_source.c
@@ -396,7 +396,7 @@ ng_source_rcvdata(hook_p hook, item_p item)
/* enque packet */
/* XXX should we check IF_QFULL() ? */
- IF_ENQUEUE(&sc->snd_queue, m);
+ _IF_ENQUEUE(&sc->snd_queue, m);
sc->queueOctets += m->m_pkthdr.len;
return (0);
@@ -539,7 +539,7 @@ ng_source_clr_data (sc_p sc)
struct mbuf *m;
for (;;) {
- IF_DEQUEUE(&sc->snd_queue, m);
+ _IF_DEQUEUE(&sc->snd_queue, m);
if (m == NULL)
break;
NG_FREE_M(m);
@@ -633,7 +633,7 @@ ng_source_send (sc_p sc, int tosend, int *sent_p)
bzero (&tmp_queue, sizeof (tmp_queue));
for (sent = 0; error == 0 && sent < tosend; ++sent) {
s = splnet();
- IF_DEQUEUE(&sc->snd_queue, m);
+ _IF_DEQUEUE(&sc->snd_queue, m);
splx(s);
if (m == NULL)
break;
@@ -642,7 +642,7 @@ ng_source_send (sc_p sc, int tosend, int *sent_p)
m2 = m_copypacket(m, M_DONTWAIT);
if (m2 == NULL) {
s = splnet();
- IF_PREPEND(&sc->snd_queue, m);
+ _IF_PREPEND(&sc->snd_queue, m);
splx(s);
error = ENOBUFS;
break;
@@ -650,17 +650,17 @@ ng_source_send (sc_p sc, int tosend, int *sent_p)
/* re-enqueue the original packet for us */
s = splnet();
- IF_ENQUEUE(&sc->snd_queue, m);
+ _IF_ENQUEUE(&sc->snd_queue, m);
splx(s);
/* queue the copy for sending at smplimp */
- IF_ENQUEUE(&tmp_queue, m2);
+ _IF_ENQUEUE(&tmp_queue, m2);
}
sent = 0;
s = splimp();
for (;;) {
- IF_DEQUEUE(&tmp_queue, m2);
+ _IF_DEQUEUE(&tmp_queue, m2);
if (m2 == NULL)
break;
if (error == 0) {
OpenPOWER on IntegriCloud