42 lines
1.3 KiB
C
42 lines
1.3 KiB
C
#ifndef _NET_TX_CGROUP_H
|
|
#define _NET_TX_CGROUP_H
|
|
#include <linux/types.h>
|
|
#include <linux/kernel.h>
|
|
#include <net/pkt_sched.h>
|
|
#include <net/cls_cgroup.h>
|
|
#include <linux/skbuff.h>
|
|
#include <linux/seq_file.h>
|
|
|
|
#ifdef CONFIG_NET_QOS
|
|
int read_tx_stat(struct cgroup_subsys_state *css, struct seq_file *sf);
|
|
int write_tx_online_bps_max(int ifindex, u64 max);
|
|
int write_tx_online_bps_min(struct cgroup_cls_state *cs, int ifindex, u64 rate);
|
|
int tx_online_list_del(struct cgroup_cls_state *cs);
|
|
int write_tx_bps_minmax(int index, u64 min, u64 max, int all);
|
|
extern int tx_throttle_all_enabled;
|
|
void dump_tx_tb(struct seq_file *m);
|
|
void dump_tx_bps_limit_tb(struct cgroup_subsys_state *css, struct seq_file *sf);
|
|
#else
|
|
int read_tx_stat(struct cgroup_subsys_state *css, struct seq_file *sf) {
|
|
return 0;
|
|
}
|
|
int write_tx_online_bps_max(int ifindex, u64 max) {
|
|
return 0;
|
|
}
|
|
int write_tx_online_bps_min(struct cgroup_cls_state *cs, int ifindex, u64 rate) {
|
|
return 0;
|
|
}
|
|
int tx_online_list_del(struct cgroup_cls_state *cs) {
|
|
return 0;
|
|
}
|
|
int write_tx_bps_minmax(int index, u64 min, u64 max, int all) {
|
|
return 0;
|
|
}
|
|
int tx_throttle_all_enabled = 0;
|
|
void dump_tx_tb(struct seq_file *m) {}
|
|
void dump_tx_bps_limit_tb(struct cgroup_subsys_state *css, struct seq_file *sf) {}
|
|
void cgroup_set_tx_limit(struct cls_token_bucket *tb, u64 rate) {}
|
|
#endif
|
|
|
|
#endif /* _NET_TX_CGROUP_H */
|