From: Thomas Graf <tgraf@suug.ch>
To: davem@davemloft.net
Cc: netdev@oss.sgi.com
Subject: [PATCH 4/4] [PKT_SCHED] Fix numeric comparison in meta ematch
Date: Fri, 03 Jun 2005 23:12:45 +0200 [thread overview]
Message-ID: <20050603211315.972265000@axs> (raw)
In-Reply-To: 20050603211241.593114000@axs
[-- Attachment #1: meta_compare_fix --]
[-- Type: text/plain, Size: 645 bytes --]
This patch is brought to you by the department of applied stupidity.
Signed-off-by: Thomas Graf <tgraf@suug.ch>
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;
next prev parent reply other threads:[~2005-06-03 21:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-03 21:12 [PATCHSET] PKT_SCHED related fixes and a meta ematch completion Thomas Graf
2005-06-03 21:12 ` [PATCH 1/4] [PKT_SCHED] Fix typo in NET_EMATCH_STACK help text Thomas Graf
2005-06-03 21:12 ` [PATCH 2/4] [PKT_SCHED] Allow socket attributes to be matched on via meta ematch Thomas Graf
2005-06-03 21:12 ` [PATCH 3/4] [PKT_SCHED] Dump classification result for basic classifier Thomas Graf
2005-06-03 21:12 ` Thomas Graf [this message]
2005-06-06 22:29 ` [PATCHSET] PKT_SCHED related fixes and a meta ematch completion David S. Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050603211315.972265000@axs \
--to=tgraf@suug.ch \
--cc=davem@davemloft.net \
--cc=netdev@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).