66 lines
1.9 KiB
C
66 lines
1.9 KiB
C
#ifndef _NET_RX_CGROUP_H
|
|
#define _NET_RX_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_rx_stat(struct cgroup_subsys_state *css, struct seq_file *sf);
|
|
|
|
int write_rx_min_rwnd_segs(struct cgroup_subsys_state *css, struct cftype *cft, u64 value);
|
|
u64 read_rx_min_rwnd_segs(struct cgroup_subsys_state *css, struct cftype *cft);
|
|
int write_rx_online_bps_max(int ifindex, u64 max);
|
|
int write_rx_online_bps_min(struct cgroup_cls_state *cs, int ifindex, u64 rate);
|
|
int rx_online_list_del(struct cgroup_cls_state *cs);
|
|
int write_rx_bps_minmax(int index, u64 min, u64 max, int all);
|
|
extern int rx_throttle_all_enabled;
|
|
void dump_rx_tb(struct seq_file *m);
|
|
void dump_rx_bps_limit_tb(struct cgroup_subsys_state *css, struct seq_file *sf);
|
|
|
|
#else
|
|
|
|
int read_rx_stat(struct cgroup_subsys_state *css, struct seq_file *sf) {
|
|
return 0;
|
|
}
|
|
|
|
int write_rx_min_rwnd_segs(struct cgroup_subsys_state *css, struct cftype *cft, u64 value) {
|
|
return 0;
|
|
}
|
|
u64 read_rx_min_rwnd_segs(struct cgroup_subsys_state *css, struct cftype *cft) {
|
|
return 0;
|
|
}
|
|
int write_rx_online_bps_max(int ifindex, u64 max) {
|
|
return 0;
|
|
}
|
|
int write_rx_online_bps_min(struct cgroup_cls_state *cs, int ifindex, u64 rate) {
|
|
return 0;
|
|
}
|
|
int rx_online_list_del(struct cgroup_cls_state *cs) {
|
|
return 0;
|
|
}
|
|
int write_rx_bps_minmax(int index, u64 min, u64 max, int all) {
|
|
return 0;
|
|
}
|
|
u32 cls_cgroup_adjust_wnd(struct sock *sk, u32 wnd, u32 mss, u16 wscale) {
|
|
return wnd;
|
|
}
|
|
int cls_cgroup_factor(const struct sock *sk) {
|
|
return WND_DIVISOR;
|
|
}
|
|
bool is_low_prio(struct sock *sk) {
|
|
return false;
|
|
}
|
|
int rx_throttle_all_enabled = 0;
|
|
int sysctl_net_qos_enable = 0;
|
|
void dump_rx_tb(struct seq_file *m) {}
|
|
void dump_rx_bps_limit_tb(struct cgroup_subsys_state *css, struct seq_file *sf) {}
|
|
void cgroup_set_rx_limit(struct cls_token_bucket *tb, u64 rate) {}
|
|
|
|
#endif
|
|
|
|
#endif /* _NET_RX_CGROUP_H */
|