mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
net: sched: add an offload dump helper
Qdisc dump operation of offload-capable qdiscs performs a few extra steps which are identical among all the qdiscs. Add a helper to share this code. Signed-off-by: Jakub Kicinski <[email protected]> Reviewed-by: John Hurley <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
80b6265c0f
commit
b592843c67
4 changed files with 35 additions and 31 deletions
|
|
@ -579,6 +579,18 @@ void qdisc_put(struct Qdisc *qdisc);
|
|||
void qdisc_put_unlocked(struct Qdisc *qdisc);
|
||||
void qdisc_tree_reduce_backlog(struct Qdisc *qdisc, unsigned int n,
|
||||
unsigned int len);
|
||||
#ifdef CONFIG_NET_SCHED
|
||||
int qdisc_offload_dump_helper(struct Qdisc *q, enum tc_setup_type type,
|
||||
void *type_data);
|
||||
#else
|
||||
static inline int
|
||||
qdisc_offload_dump_helper(struct Qdisc *q, enum tc_setup_type type,
|
||||
void *type_data)
|
||||
{
|
||||
q->flags &= ~TCQ_F_OFFLOADED;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
struct Qdisc *qdisc_alloc(struct netdev_queue *dev_queue,
|
||||
const struct Qdisc_ops *ops,
|
||||
struct netlink_ext_ack *extack);
|
||||
|
|
|
|||
Loading…
Reference in a new issue