]> git.pld-linux.org Git - packages/linux-libc-headers.git/blob - linux-libc-headers-wrr.patch
- fix pkt_sched.h
[packages/linux-libc-headers.git] / linux-libc-headers-wrr.patch
1 diff -urN linux-libc-headers-2.6.7.0.org/include/linux/pkt_sched.h linux-libc-headers-2.6.7.0/include/linux/pkt_sched.h
2 --- linux-libc-headers-2.6.7.0.org/include/linux/pkt_sched.h    2004-08-04 19:36:56.953369088 +0200
3 +++ linux-libc-headers-2.6.7.0/include/linux/pkt_sched.h        2004-08-04 19:45:15.968507256 +0200
4 @@ -2,7 +2,8 @@
5  #define __LINUX_PKT_SCHED_H
6  
7  #include <asm/types.h>
8 -
9 +#include <sys/time.h>
10 +#include <linux/if_ether.h>
11  
12  /* Logical priority bands not depending on specific packet scheduler.
13     Every scheduler will map them to real traffic classes, if it has
14 @@ -432,6 +433,115 @@
15  
16  #define TCA_ATM_MAX    TCA_ATM_STATE
17  
18 +/* WRR section */
19 +
20 +// A sub weight and of a class
21 +// All numbers are represented as parts of (2^64-1).
22 +struct tc_wrr_class_weight {
23 +  __u64 val;  // Current value                        (0 is not valid)
24 +  __u64 decr; // Value pr bytes                       (2^64-1 is not valid)
25 +  __u64 incr; // Value pr seconds                     (2^64-1 is not valid)
26 +  __u64 min;  // Minimal value                        (0 is not valid)
27 +  __u64 max;  // Minimal value                        (0 is not valid)
28 +
29 +  // The time where the above information was correct:
30 +  time_t tim;
31 +};
32 +
33 +// Pakcet send when modifying a class:
34 +struct tc_wrr_class_modf {
35 +  // Not-valid values are ignored.
36 +  struct tc_wrr_class_weight weight1;
37 +  struct tc_wrr_class_weight weight2;
38 +};
39 +
40 +// Packet returned when quering a class:
41 +struct tc_wrr_class_stats {
42 +  char used; // If this is false the information below is invalid
43 +
44 +  struct tc_wrr_class_modf class_modf;
45 +
46 +  unsigned char addr[ETH_ALEN];
47 +  char usemac;    // True if addr is a MAC address, else it is an IP address
48 +                  // (this value is only for convience, it is always the same
49 +                 //  value as in the qdisc)
50 +  int heappos;    // Current heap position or 0 if not in heap  
51 +  __u64 penal_ls; // Penalty value in heap (ls)
52 +  __u64 penal_ms; // Penalty value in heap (ms)
53 +};
54 +
55 +// Qdisc-wide penalty information (boolean values - 2 not valid)
56 +struct tc_wrr_qdisc_weight {
57 +  char weight_mode; // 0=No automatic change to weight
58 +                    // 1=Decrease normally
59 +                   // 2=Also multiply with number of machines
60 +                   // 3=Instead multiply with priority divided
61 +                   //   with priority of the other.
62 +                   // -1=no change
63 +};
64 +
65 +// Packet send when modifing a qdisc:
66 +struct tc_wrr_qdisc_modf {
67 +  // Not-valid values are ignored:
68 +  struct tc_wrr_qdisc_weight weight1;
69 +  struct tc_wrr_qdisc_weight weight2;
70 +};
71 +
72 +// Packet send when creating a qdisc:
73 +struct tc_wrr_qdisc_crt {
74 +  struct tc_wrr_qdisc_modf qdisc_modf;
75 +  
76 +  char srcaddr;      // 1=lookup source, 0=lookup destination
77 +  char usemac;       // 1=Classify on MAC addresses, 0=classify on IP
78 +  char usemasq;      // 1=Classify based on masqgrading - only valid
79 +                     //   if usemac is zero
80 +  int bands_max;     // Maximal number of bands (i.e.: classes)  
81 +  int proxy_maxconn; // If differnt from 0 then we support proxy remapping
82 +                     // of packets. And this is the number of maximal
83 +                    // concurrent proxy connections.
84 +};
85 +
86 +// Packet returned when quering a qdisc:
87 +struct tc_wrr_qdisc_stats {
88 +  struct tc_wrr_qdisc_crt qdisc_crt;
89 +  int proxy_curconn;                
90 +  int nodes_in_heap;  // Current number of bands wanting to send something
91 +  int bands_cur;      // Current number of bands used (i.e.: MAC/IP addresses seen)
92 +  int bands_reused;   // Number of times this band has been reused.
93 +  int packets_requed; // Number of times packets have been requeued.
94 +  __u64 priosum;      // Sum of priorities in heap where 1 is 2^32
95 +};
96 +
97 +struct tc_wrr_qdisc_modf_std {
98 +  // This indicates which of the tc_wrr_qdisc_modf structers this is:
99 +  char proxy; // 0=This struct
100 +
101 +  // Should we also change a class?
102 +  char change_class;
103 +
104 +  // Only valid if change_class is false
105 +  struct tc_wrr_qdisc_modf qdisc_modf;
106 +
107 +  // Only valid if change_class is true:
108 +  unsigned char addr[ETH_ALEN]; // Class to change (non-used bytes should be 0)
109 +  struct tc_wrr_class_modf class_modf; // The change    
110 +};
111 +
112 +// Used for proxyrempping:
113 +struct tc_wrr_qdisc_modf_proxy {
114 +  // This indicates which of the tc_wrr_qdisc_modf structers this is:
115 +  char proxy; // 1=This struct
116 +  
117 +  // This is 1 if the proxyremap information should be reset
118 +  char reset;
119 +  
120 +  // changec is the number of elements in changes.
121 +  int changec; 
122 +  
123 +  // This is an array of type ProxyRemapBlock:
124 +  long changes[0];  
125 +};
126 +
127  /* Delay section */
128  struct tc_dly_qopt
129  {
This page took 0.075011 seconds and 4 git commands to generate.