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>
This commit is contained in:
committed by
David S. Miller
parent
9f26f547a5
commit
bc135b23d0
@@ -76,6 +76,21 @@ struct Qdisc {
|
||||
struct rcu_head rcu_head;
|
||||
};
|
||||
|
||||
static inline bool qdisc_is_running(struct Qdisc *qdisc)
|
||||
{
|
||||
return test_bit(__QDISC_STATE_RUNNING, &qdisc->state);
|
||||
}
|
||||
|
||||
static inline bool qdisc_run_begin(struct Qdisc *qdisc)
|
||||
{
|
||||
return !test_and_set_bit(__QDISC_STATE_RUNNING, &qdisc->state);
|
||||
}
|
||||
|
||||
static inline void qdisc_run_end(struct Qdisc *qdisc)
|
||||
{
|
||||
clear_bit(__QDISC_STATE_RUNNING, &qdisc->state);
|
||||
}
|
||||
|
||||
struct Qdisc_class_ops {
|
||||
/* Child qdisc manipulation */
|
||||
struct netdev_queue * (*select_queue)(struct Qdisc *, struct tcmsg *);
|
||||
|
Reference in New Issue
Block a user