aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2010-06-02 06:23:51 -0400
committerDavid S. Miller <davem@davemloft.net>2010-06-02 06:23:51 -0400
commitbc135b23d01acf7ee926aaf75b0020c86d3869f9 (patch)
tree29b338a0c54c00880720d808f2fede7c605f516d /net/core/dev.c
parent9f26f547a587ce9015ffe495d2af604580b4b784 (diff)
net: Define accessors to manipulate QDISC_STATE_RUNNING
Define three helpers to manipulate QDISC_STATE_RUNNIG flag, that a second patch will move on another location. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/dev.c')
-rw-r--r--net/core/dev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 983a3c1d65c4..2733226d90b2 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2047,7 +2047,7 @@ static inline int __dev_xmit_skb(struct sk_buff *skb, struct Qdisc *q,
2047 kfree_skb(skb); 2047 kfree_skb(skb);
2048 rc = NET_XMIT_DROP; 2048 rc = NET_XMIT_DROP;
2049 } else if ((q->flags & TCQ_F_CAN_BYPASS) && !qdisc_qlen(q) && 2049 } else if ((q->flags & TCQ_F_CAN_BYPASS) && !qdisc_qlen(q) &&
2050 !test_and_set_bit(__QDISC_STATE_RUNNING, &q->state)) { 2050 qdisc_run_begin(q)) {
2051 /* 2051 /*
2052 * This is a work-conserving queue; there are no old skbs 2052 * This is a work-conserving queue; there are no old skbs
2053 * waiting to be sent out; and the qdisc is not running - 2053 * waiting to be sent out; and the qdisc is not running -
@@ -2059,7 +2059,7 @@ static inline int __dev_xmit_skb(struct sk_buff *skb, struct Qdisc *q,
2059 if (sch_direct_xmit(skb, q, dev, txq, root_lock)) 2059 if (sch_direct_xmit(skb, q, dev, txq, root_lock))
2060 __qdisc_run(q); 2060 __qdisc_run(q);
2061 else 2061 else
2062 clear_bit(__QDISC_STATE_RUNNING, &q->state); 2062 qdisc_run_end(q);
2063 2063
2064 rc = NET_XMIT_SUCCESS; 2064 rc = NET_XMIT_SUCCESS;
2065 } else { 2065 } else {