All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <1139538806.15476.33.camel@ras>

diff --git a/a/1.txt b/N1/1.txt
index fa1c7bf..447245c 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -1,5 +1,6 @@
 PATCH 1
-===
+=======
+
 On my machine tc does not parse filter "sample" for the u32
 filter.  Eg:
 
@@ -24,7 +25,8 @@ diff -Nur iproute-20051007.keep/tc/f_u32.c iproute-20051007/tc/f_u32.c
 
 
 PATCH 2
-===
+=======
+
 In tc, the u32 sample clause uses the 2.4 hashing algorithm.
 The hashing algorithm used by the kernel changed in 2.6,
 consequently "sample" hasn't work since then.
@@ -44,7 +46,7 @@ diff -Nur iproute-20051007.keep/tc/f_u32.c iproute-20051007/tc/f_u32.c
  #include <string.h>
 @@ -874,6 +875,7 @@
  				htid = (handle&0xFFFFF000);
- 		} else if (strcmp(*argv, "sample") = 0) {
+ 		} else if (strcmp(*argv, "sample") == 0) {
  			__u32 hash;
 +			struct utsname utsname;
  			struct {
@@ -57,7 +59,7 @@ diff -Nur iproute-20051007.keep/tc/f_u32.c iproute-20051007/tc/f_u32.c
 -			hash ^= hash>>16;
 -			hash ^= hash>>8;
 +			uname(&utsname);
-+			if (strncmp(utsname.release, "2.4.", 4) = 0) {
++			if (strncmp(utsname.release, "2.4.", 4) == 0) {
 +				hash ^= hash>>16;
 +				hash ^= hash>>8;
 +			}
@@ -75,7 +77,8 @@ diff -Nur iproute-20051007.keep/tc/f_u32.c iproute-20051007/tc/f_u32.c
 
 
 PATCH 3
-===
+=======
+
 "tc" does not allow you to specify the divisor for the
 "sample" clause, it always assumes a divisor of 256.  
 If the divisor isn't 256, (ie it is something less),
@@ -100,7 +103,7 @@ diff -Nur iproute-20051007.keep/tc/f_u32.c iproute-20051007/tc/f_u32.c
 @@ -835,7 +835,7 @@
  			unsigned divisor;
  			NEXT_ARG();
- 			if (get_unsigned(&divisor, *argv, 0) || divisor = 0 ||
+ 			if (get_unsigned(&divisor, *argv, 0) || divisor == 0 ||
 -			    divisor > 0x100) {
 +			    divisor > 0x100 || (divisor - 1 & divisor)) {
  				fprintf(stderr, "Illegal \"divisor\"\n");
@@ -108,7 +111,7 @@ diff -Nur iproute-20051007.keep/tc/f_u32.c iproute-20051007/tc/f_u32.c
  			}
 @@ -875,6 +875,7 @@
  				htid = (handle&0xFFFFF000);
- 		} else if (strcmp(*argv, "sample") = 0) {
+ 		} else if (strcmp(*argv, "sample") == 0) {
  			__u32 hash;
 +			unsigned divisor = 0x100;
  			struct utsname utsname;
@@ -118,9 +121,9 @@ diff -Nur iproute-20051007.keep/tc/f_u32.c iproute-20051007/tc/f_u32.c
  				fprintf(stderr, "\"sample\" must contain exactly ONE key.\n");
  				return -1;
  			}
-+			if (*argv != 0 && strcmp(*argv, "divisor") = 0) {
++			if (*argv != 0 && strcmp(*argv, "divisor") == 0) {
 +				NEXT_ARG();
-+				if (get_unsigned(&divisor, *argv, 0) || divisor = 0 ||
++				if (get_unsigned(&divisor, *argv, 0) || divisor == 0 ||
 +				    divisor > 0x100 || (divisor - 1 & divisor)) {
 +					fprintf(stderr, "Illegal sample \"divisor\"\n");
 +					return -1;
@@ -129,7 +132,7 @@ diff -Nur iproute-20051007.keep/tc/f_u32.c iproute-20051007/tc/f_u32.c
 +			}
  			hash = sel2.sel.keys[0].val&sel2.sel.keys[0].mask;
  			uname(&utsname);
- 			if (strncmp(utsname.release, "2.4.", 4) = 0) {
+ 			if (strncmp(utsname.release, "2.4.", 4) == 0) {
 @@ -904,7 +913,7 @@
  				}
  				hash &= 0xFF;
@@ -138,9 +141,4 @@ diff -Nur iproute-20051007.keep/tc/f_u32.c iproute-20051007/tc/f_u32.c
 +			htid = ((hash%divisor)<<12)|(htid&0xFFF00000);
  			sample_ok = 1;
  			continue;
- 		} else if (strcmp(*argv, "indev") = 0) {
-
-_______________________________________________
-LARTC mailing list
-LARTC@mailman.ds9a.nl
-http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
+ 		} else if (strcmp(*argv, "indev") == 0) {
diff --git a/a/content_digest b/N1/content_digest
index 7e7ec61..8ce174a 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -1,13 +1,14 @@
  "From\0Russell Stuart <russell-lartc@stuart.id.au>\0"
- "Subject\0[LARTC] [PATCH] TC: bug fixes to the \"sample\" clause\0"
- "Date\0Fri, 10 Feb 2006 02:33:26 +0000\0"
+ "Subject\0[PATCH] TC: bug fixes to the \"sample\" clause\0"
+ "Date\0Fri, 10 Feb 2006 12:33:26 +1000\0"
  "To\0netdev@vger.kernel.org"
   lartc@mailman.ds9a.nl
  " shemminger@osdl.org\0"
  "\00:1\0"
  "b\0"
  "PATCH 1\n"
- "===\n"
+ "=======\n"
+ "\n"
  "On my machine tc does not parse filter \"sample\" for the u32\n"
  "filter.  Eg:\n"
  "\n"
@@ -32,7 +33,8 @@
  "\n"
  "\n"
  "PATCH 2\n"
- "===\n"
+ "=======\n"
+ "\n"
  "In tc, the u32 sample clause uses the 2.4 hashing algorithm.\n"
  "The hashing algorithm used by the kernel changed in 2.6,\n"
  "consequently \"sample\" hasn't work since then.\n"
@@ -52,7 +54,7 @@
  " #include <string.h>\n"
  "@@ -874,6 +875,7 @@\n"
  " \t\t\t\thtid = (handle&0xFFFFF000);\n"
- " \t\t} else if (strcmp(*argv, \"sample\") = 0) {\n"
+ " \t\t} else if (strcmp(*argv, \"sample\") == 0) {\n"
  " \t\t\t__u32 hash;\n"
  "+\t\t\tstruct utsname utsname;\n"
  " \t\t\tstruct {\n"
@@ -65,7 +67,7 @@
  "-\t\t\thash ^= hash>>16;\n"
  "-\t\t\thash ^= hash>>8;\n"
  "+\t\t\tuname(&utsname);\n"
- "+\t\t\tif (strncmp(utsname.release, \"2.4.\", 4) = 0) {\n"
+ "+\t\t\tif (strncmp(utsname.release, \"2.4.\", 4) == 0) {\n"
  "+\t\t\t\thash ^= hash>>16;\n"
  "+\t\t\t\thash ^= hash>>8;\n"
  "+\t\t\t}\n"
@@ -83,7 +85,8 @@
  "\n"
  "\n"
  "PATCH 3\n"
- "===\n"
+ "=======\n"
+ "\n"
  "\"tc\" does not allow you to specify the divisor for the\n"
  "\"sample\" clause, it always assumes a divisor of 256.  \n"
  "If the divisor isn't 256, (ie it is something less),\n"
@@ -108,7 +111,7 @@
  "@@ -835,7 +835,7 @@\n"
  " \t\t\tunsigned divisor;\n"
  " \t\t\tNEXT_ARG();\n"
- " \t\t\tif (get_unsigned(&divisor, *argv, 0) || divisor = 0 ||\n"
+ " \t\t\tif (get_unsigned(&divisor, *argv, 0) || divisor == 0 ||\n"
  "-\t\t\t    divisor > 0x100) {\n"
  "+\t\t\t    divisor > 0x100 || (divisor - 1 & divisor)) {\n"
  " \t\t\t\tfprintf(stderr, \"Illegal \\\"divisor\\\"\\n\");\n"
@@ -116,7 +119,7 @@
  " \t\t\t}\n"
  "@@ -875,6 +875,7 @@\n"
  " \t\t\t\thtid = (handle&0xFFFFF000);\n"
- " \t\t} else if (strcmp(*argv, \"sample\") = 0) {\n"
+ " \t\t} else if (strcmp(*argv, \"sample\") == 0) {\n"
  " \t\t\t__u32 hash;\n"
  "+\t\t\tunsigned divisor = 0x100;\n"
  " \t\t\tstruct utsname utsname;\n"
@@ -126,9 +129,9 @@
  " \t\t\t\tfprintf(stderr, \"\\\"sample\\\" must contain exactly ONE key.\\n\");\n"
  " \t\t\t\treturn -1;\n"
  " \t\t\t}\n"
- "+\t\t\tif (*argv != 0 && strcmp(*argv, \"divisor\") = 0) {\n"
+ "+\t\t\tif (*argv != 0 && strcmp(*argv, \"divisor\") == 0) {\n"
  "+\t\t\t\tNEXT_ARG();\n"
- "+\t\t\t\tif (get_unsigned(&divisor, *argv, 0) || divisor = 0 ||\n"
+ "+\t\t\t\tif (get_unsigned(&divisor, *argv, 0) || divisor == 0 ||\n"
  "+\t\t\t\t    divisor > 0x100 || (divisor - 1 & divisor)) {\n"
  "+\t\t\t\t\tfprintf(stderr, \"Illegal sample \\\"divisor\\\"\\n\");\n"
  "+\t\t\t\t\treturn -1;\n"
@@ -137,7 +140,7 @@
  "+\t\t\t}\n"
  " \t\t\thash = sel2.sel.keys[0].val&sel2.sel.keys[0].mask;\n"
  " \t\t\tuname(&utsname);\n"
- " \t\t\tif (strncmp(utsname.release, \"2.4.\", 4) = 0) {\n"
+ " \t\t\tif (strncmp(utsname.release, \"2.4.\", 4) == 0) {\n"
  "@@ -904,7 +913,7 @@\n"
  " \t\t\t\t}\n"
  " \t\t\t\thash &= 0xFF;\n"
@@ -146,11 +149,6 @@
  "+\t\t\thtid = ((hash%divisor)<<12)|(htid&0xFFF00000);\n"
  " \t\t\tsample_ok = 1;\n"
  " \t\t\tcontinue;\n"
- " \t\t} else if (strcmp(*argv, \"indev\") = 0) {\n"
- "\n"
- "_______________________________________________\n"
- "LARTC mailing list\n"
- "LARTC@mailman.ds9a.nl\n"
- http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
+ " \t\t} else if (strcmp(*argv, \"indev\") == 0) {"
 
-fd17d802c009d337482e7e0d5e244ef925014c1fc5ded48899e749a6fa552cac
+b86c7f7f8205854d3f2c2866a9241b794f29f7c3d3ad563a86506ab6f0ed4812

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.