| To: | davem@xxxxxxxxxxxxx |
|---|---|
| Subject: | [PATCH 4/4] [PKT_SCHED] Fix numeric comparison in meta ematch |
| From: | Thomas Graf <tgraf@xxxxxxx> |
| Date: | Fri, 03 Jun 2005 23:12:45 +0200 |
| Cc: | netdev@xxxxxxxxxxx |
| References: | <20050603211241.593114000@axs> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
This patch is brought to you by the department of applied stupidity.
Signed-off-by: Thomas Graf <tgraf@xxxxxxx>
Index: ematch/net/sched/em_meta.c
===================================================================
--- ematch.orig/net/sched/em_meta.c
+++ ematch/net/sched/em_meta.c
@@ -639,9 +639,9 @@ static int meta_int_compare(struct meta_
/* Let gcc optimize it, the unlikely is not really based on
* some numbers but jump free code for mismatches seems
* more logical. */
- if (unlikely(a == b))
+ if (unlikely(a->value == b->value))
return 0;
- else if (a < b)
+ else if (a->value < b->value)
return -1;
else
return 1;
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH 3/4] [PKT_SCHED] Dump classification result for basic classifier, Thomas Graf |
|---|---|
| Next by Date: | Re: RFC: NAPI packet weighting patch, Michael Chan |
| Previous by Thread: | [PATCH 3/4] [PKT_SCHED] Dump classification result for basic classifier, Thomas Graf |
| Next by Thread: | Re: [PATCHSET] PKT_SCHED related fixes and a meta ematch completion, David S. Miller |
| Indexes: | [Date] [Thread] [Top] [All Lists] |