SOURCES (KERNEL): linux-libc-headers-wrr.patch - updated from LINU...

qboosh qboosh at pld-linux.org
Mon Apr 2 20:17:18 CEST 2007


Author: qboosh                       Date: Mon Apr  2 18:17:18 2007 GMT
Module: SOURCES                       Tag: KERNEL
---- Log message:
- updated from LINUX_2_6_20 (+include <sys/time.h> if !__KERNEL__)

---- Files affected:
SOURCES:
   linux-libc-headers-wrr.patch (1.5 -> 1.5.4.1) 

---- Diffs:

================================================================
Index: SOURCES/linux-libc-headers-wrr.patch
diff -u SOURCES/linux-libc-headers-wrr.patch:1.5 SOURCES/linux-libc-headers-wrr.patch:1.5.4.1
--- SOURCES/linux-libc-headers-wrr.patch:1.5	Sun Nov  7 22:30:19 2004
+++ SOURCES/linux-libc-headers-wrr.patch	Mon Apr  2 20:17:13 2007
@@ -1,126 +1,113 @@
---- linux-libc-headers-2.6.9.1/include/linux/pkt_sched.h.orig	2004-11-07 21:03:14.924678496 +0100
-+++ linux-libc-headers-2.6.9.1/include/linux/pkt_sched.h	2004-11-07 21:04:53.666667432 +0100
-@@ -2,7 +2,8 @@
- #define __LINUX_PKT_SCHED_H
+diff -urN linux-2.6.20.orig/include/linux/pkt_sched.h linux-2.6.20/include/linux/pkt_sched.h
+--- linux-2.6.20.orig/include/linux/pkt_sched.h	2007-02-04 19:44:54.000000000 +0100
++++ linux-2.6.20/include/linux/pkt_sched.h	2007-02-09 09:38:50.000000000 +0100
+@@ -23,6 +23,11 @@
  
- #include <asm/types.h>
--
+ #define TC_PRIO_MAX			15
+ 
++#ifndef __KERNEL__
 +#include <sys/time.h>
++#endif
 +#include <linux/if_ether.h>
- 
- /* Logical priority bands not depending on specific packet scheduler.
-    Every scheduler will map them to real traffic classes, if it has
-@@ -444,4 +445,113 @@
++
+ /* Generic queue statistics, available for all the elements.
+    Particular schedulers may have also their private records.
+  */
+@@ -466,4 +468,97 @@
  
  #define NETEM_DIST_SCALE	8192
  
++
 +/* WRR section */
 +
-+// A sub weight and of a class
-+// All numbers are represented as parts of (2^64-1).
++/*
++ * 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)
-+
-+  // The time where the above information was correct:
-+  time_t tim;
++	__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)
++	time_t	tim;	// The time where the above information was correct
 +};
 +
-+// 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:
++/* Packet returned when quering a class */
 +struct tc_wrr_class_stats {
-+  char used; // If this is false the information below is invalid
-+
-+  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)
++	char	used;			/* If this is false the information below is invalid */
++	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) */
 +};
 +
-+// Qdisc-wide penalty information (boolean values - 2 not valid)
++/* 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
++	signed 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:
++/* 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:
++/* 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:
++/* 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
-+
-+  // 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    
++	char	proxy;		/* This indicates which of the tc_wrr_qdisc_modf structers this is. 0=This struct */
++	char	change_class;	/* Should we also change a class? */
++	struct tc_wrr_qdisc_modf qdisc_modf; /* Only valid if change_class is false */
++	unsigned char addr[ETH_ALEN]; /* Class to change (non-used bytes should be 0). Valid only of change_class is true */
++	struct tc_wrr_class_modf class_modf; /* The change */
 +};
 +
-+// Used for proxyrempping:
++/* Used for proxyremapping */
 +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];  
++	char	proxy;		/* This indicates which of the tc_wrr_qdisc_modf structers this is. 1=This struct */
++	char	reset;		/* This is 1 if the proxyremap information should be reset */
++	int	changec;	/* changec is the number of elements in changes. */
++	long	changes[0];	/* This is an array of type ProxyRemapBlock */
 +};
 +
  #endif
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/linux-libc-headers-wrr.patch?r1=1.5&r2=1.5.4.1&f=u



More information about the pld-cvs-commit mailing list