Summary
In struct Qdisc, there are two similar fileds.
running flag is stored in __state of struct Qdisc, NOT state.
Every time, when we send a packet from qdisc, the running flag is
set by qdisc_run_begin, and after that, it is removed by qdisc_run_end.
1 | 84 unsigned long state; |
todo
why need busylock?
The values of state.
1 | 24 enum qdisc_state_t { |
The value of __state.
1 | 33 enum qdisc___state_t { |
Running flag
check Qdisc running
1 | 96 static inline bool qdisc_is_running(const struct Qdisc *qdisc) |
Set Qdisc running
1 | 101 static inline bool qdisc_run_begin(struct Qdisc *qdisc) |
Unset Qdisc running
1 | 109 static inline void qdisc_run_end(struct Qdisc *qdisc) |