SOURCES: iproute2-2.2.4-wrr.patch - little bit different version f...
cactus
cactus at pld-linux.org
Thu May 17 22:32:46 CEST 2007
Author: cactus Date: Thu May 17 20:32:46 2007 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- little bit different version for 2.6.20
---- Files affected:
SOURCES:
iproute2-2.2.4-wrr.patch (1.2 -> 1.3)
---- Diffs:
================================================================
Index: SOURCES/iproute2-2.2.4-wrr.patch
diff -u SOURCES/iproute2-2.2.4-wrr.patch:1.2 SOURCES/iproute2-2.2.4-wrr.patch:1.3
--- SOURCES/iproute2-2.2.4-wrr.patch:1.2 Mon Apr 11 09:40:30 2005
+++ SOURCES/iproute2-2.2.4-wrr.patch Thu May 17 22:32:40 2007
@@ -1,7 +1,7 @@
-diff -uNrbB org/tc/Makefile new/tc/Makefile
---- org/tc/Makefile Fri Feb 25 20:51:57 2000
-+++ new/tc/Makefile Mon Feb 12 17:24:48 2001
-@@ -9,6 +9,7 @@
+diff -urN iproute-2.6.20-070313-orig/tc/Makefile iproute-2.6.20-070313/tc/Makefile
+--- iproute-2.6.20-070313-orig/tc/Makefile 2007-03-13 22:50:56.000000000 +0100
++++ iproute-2.6.20-070313/tc/Makefile 2007-04-15 20:52:33.000000000 +0200
+@@ -11,6 +11,7 @@
TCMODULES += q_prio.o
TCMODULES += q_tbf.o
TCMODULES += q_cbq.o
@@ -9,27 +9,14 @@
TCMODULES += f_rsvp.o
TCMODULES += f_u32.o
TCMODULES += f_route.o
-diff -uNrbB org/tc/q_wrr.c new/tc/q_wrr.c
---- org/tc/q_wrr.c Thu Jan 1 01:00:00 1970
-+++ new/tc/q_wrr.c Sun Sep 9 12:44:28 2001
-@@ -0,0 +1,437 @@
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <unistd.h>
-+#include <syslog.h>
-+#include <fcntl.h>
-+#include <sys/socket.h>
-+#include <netinet/in.h>
-+#include <arpa/inet.h>
-+#include <string.h>
-+#include <math.h>
-+
-+#include "utils.h"
-+#include "tc_util.h"
-+
-+#define usage() return(-1)
-+
-+#ifdef NEED_WRR_DEFS
+
+diff -urN iproute-2.6.20-070313-orig/include/linux/pkt_sched.h iproute-2.6.20-070313/include/linux/pkt_sched.h
+--- iproute-2.6.20-070313-orig/include/linux/pkt_sched.h 2007-03-13 22:50:56.000000000 +0100
++++ iproute-2.6.20-070313/include/linux/pkt_sched.h 2007-04-15 20:52:33.000000000 +0200
+@@ -466,4 +498,116 @@
+
+ #define NETEM_DIST_SCALE 8192
+
+/* WRR section */
+
+/* Other includes */
@@ -38,110 +25,131 @@
+// A sub weight and of a class
+// All numbers are represented as parts of (2^64-1).
+struct tc_wrr_class_weight {
-+ __u64 val; // Current value (0 is not valid)
-+ __u64 decr; // Value pr bytes (2^64-1 is not valid)
-+ __u64 incr; // Value pr seconds (2^64-1 is not valid)
-+ __u64 min; // Minimal value (0 is not valid)
-+ __u64 max; // Minimal value (0 is not valid)
++ __u64 val; // Current value (0 is not valid)
++ __u64 decr; // Value pr bytes (2^64-1 is not valid)
++ __u64 incr; // Value pr seconds (2^64-1 is not valid)
++ __u64 min; // Minimal value (0 is not valid)
++ __u64 max; // Minimal value (0 is not valid)
+
-+ // The time where the above information was correct:
-+ time_t tim;
++// The time where the above information was correct:
++ time_t tim;
+};
+
-+// Pakcet send when modifying a class:
++// Packet send when modifying a class:
+struct tc_wrr_class_modf {
-+ // Not-valid values are ignored.
-+ struct tc_wrr_class_weight weight1;
-+ struct tc_wrr_class_weight weight2;
++ // Not-valid values are ignored.
++ struct tc_wrr_class_weight weight1;
++ struct tc_wrr_class_weight weight2;
+};
+
+// Packet returned when quering a class:
+struct tc_wrr_class_stats {
-+ char used; // If this is false the information below is invalid
++ char used; // If this is false the information below is invalid
+
-+ struct tc_wrr_class_modf class_modf;
++ struct tc_wrr_class_modf class_modf;
+
-+ unsigned char addr[ETH_ALEN];
-+ char usemac; // True if addr is a MAC address, else it is an IP address
-+ // (this value is only for convience, it is always the same
-+ // value as in the qdisc)
-+ int heappos; // Current heap position or 0 if not in heap
-+ __u64 penal_ls; // Penalty value in heap (ls)
-+ __u64 penal_ms; // Penalty value in heap (ms)
++ unsigned char addr[ETH_ALEN];
++ char usemac; // True if addr is a MAC address, else it is an IP address
++ // (this value is only for convience, it is always the same
++ // value as in the qdisc)
++ int heappos; // Current heap position or 0 if not in heap
++ __u64 penal_ls; // Penalty value in heap (ls)
++ __u64 penal_ms; // Penalty value in heap (ms)
+};
+
+// Qdisc-wide penalty information (boolean values - 2 not valid)
+struct tc_wrr_qdisc_weight {
-+ char weight_mode; // 0=No automatic change to weight
-+ // 1=Decrease normally
-+ // 2=Also multiply with number of machines
-+ // 3=Instead multiply with priority divided
-+ // with priority of the other.
-+ // -1=no change
++ char weight_mode; // 0=No automatic change to weight
++ // 1=Decrease normally
++ // 2=Also multiply with number of machines
++ // 3=Instead multiply with priority divided
++ // with priority of the other.
++ // -1=no change
+};
+
+// Packet send when modifing a qdisc:
+struct tc_wrr_qdisc_modf {
-+ // Not-valid values are ignored:
-+ struct tc_wrr_qdisc_weight weight1;
-+ struct tc_wrr_qdisc_weight weight2;
++ // Not-valid values are ignored:
++ struct tc_wrr_qdisc_weight weight1;
++ struct tc_wrr_qdisc_weight weight2;
+};
+
+// Packet send when creating a qdisc:
+struct tc_wrr_qdisc_crt {
-+ struct tc_wrr_qdisc_modf qdisc_modf;
-+
-+ char srcaddr; // 1=lookup source, 0=lookup destination
-+ char usemac; // 1=Classify on MAC addresses, 0=classify on IP
-+ char usemasq; // 1=Classify based on masqgrading - only valid
-+ // if usemac is zero
-+ int bands_max; // Maximal number of bands (i.e.: classes)
-+ int proxy_maxconn; // If differnt from 0 then we support proxy remapping
-+ // of packets. And this is the number of maximal
-+ // concurrent proxy connections.
++ struct tc_wrr_qdisc_modf qdisc_modf;
++
++ char srcaddr; // 1=lookup source, 0=lookup destination
++ char usemac; // 1=Classify on MAC addresses, 0=classify on IP
++ char usemasq; // 1=Classify based on masqgrading - only valid
++ // if usemac is zero
++ int bands_max; // Maximal number of bands (i.e.: classes)
++ int proxy_maxconn;// If differnt from 0 then we support proxy remapping
++ // of packets. And this is the number of maximal
++ // concurrent proxy connections.
+};
+
+// Packet returned when quering a qdisc:
+struct tc_wrr_qdisc_stats {
-+ struct tc_wrr_qdisc_crt qdisc_crt;
-+ int proxy_curconn;
-+ int nodes_in_heap; // Current number of bands wanting to send something
-+ int bands_cur; // Current number of bands used (i.e.: MAC/IP addresses seen)
-+ int bands_reused; // Number of times this band has been reused.
-+ int packets_requed; // Number of times packets have been requeued.
-+ __u64 priosum; // Sum of priorities in heap where 1 is 2^32
++ struct tc_wrr_qdisc_crt qdisc_crt;
++ int proxy_curconn;
++ int nodes_in_heap; // Current number of bands wanting to send something
++ int bands_cur; // Current number of bands used (i.e.: MAC/IP addresses seen)
++ int bands_reused; // Number of times this band has been reused.
++ int packets_requed; // Number of times packets have been requeued.
++ __u64 priosum; // Sum of priorities in heap where 1 is 2^32
+};
+
+struct tc_wrr_qdisc_modf_std {
-+ // This indicates which of the tc_wrr_qdisc_modf structers this is:
-+ char proxy; // 0=This struct
++ // This indicates which of the tc_wrr_qdisc_modf structers this is:
++ char proxy; // 0=This struct
+
-+ // Should we also change a class?
-+ char change_class;
++ // Should we also change a class?
++ char change_class;
+
-+ // Only valid if change_class is false
-+ struct tc_wrr_qdisc_modf qdisc_modf;
-+
-+ // Only valid if change_class is true:
-+ unsigned char addr[ETH_ALEN]; // Class to change (non-used bytes should be 0)
-+ struct tc_wrr_class_modf class_modf; // The change
++ // Only valid if change_class is false
++ struct tc_wrr_qdisc_modf qdisc_modf;
++
++ // Only valid if change_class is true:
++ unsigned char addr[ETH_ALEN]; // Class to change (non-used bytes should be 0)
++ struct tc_wrr_class_modf class_modf; // The change
+};
+
+// Used for proxyrempping:
+struct tc_wrr_qdisc_modf_proxy {
-+ // This indicates which of the tc_wrr_qdisc_modf structers this is:
-+ char proxy; // 1=This struct
-+
-+ // This is 1 if the proxyremap information should be reset
-+ char reset;
-+
-+ // changec is the number of elements in changes.
-+ int changec;
-+
-+ // This is an array of type ProxyRemapBlock:
-+ long changes[0];
++ // This indicates which of the tc_wrr_qdisc_modf structers this is:
++ char proxy; // 1=This struct
++
++ // This is 1 if the proxyremap information should be reset
++ char reset;
++
++ // changec is the number of elements in changes.
++ int changec;
++
++ // This is an array of type ProxyRemapBlock:
++ long changes[0];
+};
-+#endif /* NEED_WRR_DEFS */
++
+ #endif
+
+diff -urN iproute-2.6.20-070313-orig/tc/q_wrr.c iproute-2.6.20-070313/tc/q_wrr.c
+--- iproute-2.6.20-070313-orig/tc/q_wrr.c 1970-01-01 01:00:00.000000000 +0100
++++ iproute-2.6.20-070313/tc/q_wrr.c 2007-04-15 20:52:33.000000000 +0200
+@@ -0,0 +1,322 @@
++#include <stdio.h>
++#include <stdlib.h>
++#include <unistd.h>
++#include <syslog.h>
++#include <fcntl.h>
++#include <sys/socket.h>
++#include <netinet/in.h>
++#include <arpa/inet.h>
++#include <string.h>
++#include <math.h>
++
++#include "utils.h"
++#include "tc_util.h"
++
++#define usage() return(-1)
+
+// Returns -1 on error
+static int wrr_parse_qdisc_weight(int argc, char** argv,
@@ -442,11 +450,10 @@
+
+
+struct qdisc_util wrr_qdisc_util = {
-+ NULL,
-+ "wrr",
-+ wrr_parse_opt,
-+ wrr_print_opt,
-+ wrr_print_xstats,
-+ wrr_parse_copt,
-+ wrr_print_copt
++ .id = "wrr",
++ .parse_qopt = wrr_parse_opt,
++ .print_qopt = wrr_print_opt,
++ .print_xstats = wrr_print_xstats,
++ .parse_copt = wrr_parse_copt,
++ .print_copt = wrr_print_copt
+};
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SOURCES/iproute2-2.2.4-wrr.patch?r1=1.2&r2=1.3&f=u
More information about the pld-cvs-commit
mailing list