]> git.pld-linux.org Git - packages/linux-libc-headers.git/blob - linux-libc-headers-wrr.patch
- updated to 5.16.0
[packages/linux-libc-headers.git] / linux-libc-headers-wrr.patch
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
3 @@ -26,6 +26,11 @@
4  
5  #define TC_PRIO_MAX                    15
6  
7 +#ifndef __KERNEL__
8 +#include <sys/time.h>
9 +#endif
10 +#include <linux/if_ether.h>
11 +
12  /* Generic queue statistics, available for all the elements.
13     Particular schedulers may have also their private records.
14   */
15 @@ -959,4 +964,96 @@
16  
17  #define TCA_ETS_MAX (__TCA_ETS_MAX - 1)
18  
19 +/* WRR section */
20 +
21 +/*
22 + * A sub weight and of a class
23 + * All numbers are represented as parts of (2^64-1).
24 + */
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
32 +};
33 +
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;
39 +};
40 +
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) */
52 +};
53 +
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
57 +                                          1=Decrease normally
58 +                                          2=Also multiply with number of machines
59 +                                          3=Instead multiply with priority divided
60 +                                            with priority of the other.
61 +                                          -1=no change */
62 +};
63 +
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;
69 +};
70 +
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. */
82 +};
83 +
84 +/* Packet returned when quering a qdisc */
85 +struct tc_wrr_qdisc_stats {
86 +       struct tc_wrr_qdisc_crt qdisc_crt;
87 +       int     proxy_curconn;               
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 */
93 +};
94 +
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 */
101 +};
102 +
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 */
109 +};
110 +
111  #endif
This page took 0.057162 seconds and 3 git commands to generate.