1 --- linux-4.15/include/uapi/linux/pkt_sched.h.orig 2018-02-02 18:40:34.642685783 +0100
2 +++ linux-4.15/include/uapi/linux/pkt_sched.h 2018-02-02 18:46:35.879348325 +0100
10 +#include <linux/if_ether.h>
12 /* Generic queue statistics, available for all the elements.
13 Particular schedulers may have also their private records.
17 #define TCA_ETS_MAX (__TCA_ETS_MAX - 1)
22 + * A sub weight and of a class
23 + * All numbers are represented as parts of (2^64-1).
25 +struct tc_wrr_class_weight {
26 + __u64 val; // Current value (0 is not valid)
27 + __u64 decr; // Value pr bytes (2^64-1 is not valid)
28 + __u64 incr; // Value pr seconds (2^64-1 is not valid)
29 + __u64 min; // Minimal value (0 is not valid)
30 + __u64 max; // Minimal value (0 is not valid)
31 + time_t tim; // The time where the above information was correct
34 +/* Packet send when modifying a class */
35 +struct tc_wrr_class_modf {
36 + /* Not-valid values are ignored */
37 + struct tc_wrr_class_weight weight1;
38 + struct tc_wrr_class_weight weight2;
41 +/* Packet returned when quering a class */
42 +struct tc_wrr_class_stats {
43 + char used; /* If this is false the information below is invalid */
44 + struct tc_wrr_class_modf class_modf;
45 + unsigned char addr[ETH_ALEN];
46 + char usemac; /* True if addr is a MAC address, else it is an IP address
47 + (this value is only for convience, it is always the same
48 + value as in the qdisc) */
49 + int heappos; /* Current heap position or 0 if not in heap */
50 + __u64 penal_ls; /* Penalty value in heap (ls) */
51 + __u64 penal_ms; /* Penalty value in heap (ms) */
54 +/* Qdisc-wide penalty information (boolean values - 2 not valid) */
55 +struct tc_wrr_qdisc_weight {
56 + signed char weight_mode; /* 0=No automatic change to weight
58 + 2=Also multiply with number of machines
59 + 3=Instead multiply with priority divided
60 + with priority of the other.
64 +/* Packet send when modifing a qdisc */
65 +struct tc_wrr_qdisc_modf {
66 + /* Not-valid values are ignored */
67 + struct tc_wrr_qdisc_weight weight1;
68 + struct tc_wrr_qdisc_weight weight2;
71 +/* Packet send when creating a qdisc */
72 +struct tc_wrr_qdisc_crt {
73 + struct tc_wrr_qdisc_modf qdisc_modf;
74 + char srcaddr; /* 1=lookup source, 0=lookup destination */
75 + char usemac; /* 1=Classify on MAC addresses, 0=classify on IP */
76 + char usemasq; /* 1=Classify based on masqgrading - only valid
77 + if usemac is zero */
78 + int bands_max; /* Maximal number of bands (i.e.: classes) */
79 + int proxy_maxconn; /* If differnt from 0 then we support proxy remapping
80 + of packets. And this is the number of maximal
81 + concurrent proxy connections. */
84 +/* Packet returned when quering a qdisc */
85 +struct tc_wrr_qdisc_stats {
86 + struct tc_wrr_qdisc_crt qdisc_crt;
88 + int nodes_in_heap; /* Current number of bands wanting to send something */
89 + int bands_cur; /* Current number of bands used (i.e.: MAC/IP addresses seen) */
90 + int bands_reused; /* Number of times this band has been reused. */
91 + int packets_requed; /* Number of times packets have been requeued. */
92 + __u64 priosum; /* Sum of priorities in heap where 1 is 2^32 */
95 +struct tc_wrr_qdisc_modf_std {
96 + char proxy; /* This indicates which of the tc_wrr_qdisc_modf structers this is. 0=This struct */
97 + char change_class; /* Should we also change a class? */
98 + struct tc_wrr_qdisc_modf qdisc_modf; /* Only valid if change_class is false */
99 + unsigned char addr[ETH_ALEN]; /* Class to change (non-used bytes should be 0). Valid only of change_class is true */
100 + struct tc_wrr_class_modf class_modf; /* The change */
103 +/* Used for proxyremapping */
104 +struct tc_wrr_qdisc_modf_proxy {
105 + char proxy; /* This indicates which of the tc_wrr_qdisc_modf structers this is. 1=This struct */
106 + char reset; /* This is 1 if the proxyremap information should be reset */
107 + int changec; /* changec is the number of elements in changes. */
108 + long changes[0]; /* This is an array of type ProxyRemapBlock */