* fuzzy.patch and fuzzy.patch.ipv6 - again.
2003-06-05 10:34 [PATCH] first version of optimized mark_source_chains() Harald Welte
@ 2003-06-06 13:31 ` Wojciech "Sas" Cieciwa
2003-06-14 14:12 ` Martin Josefsson
0 siblings, 1 reply; 4+ messages in thread
From: Wojciech "Sas" Cieciwa @ 2003-06-06 13:31 UTC (permalink / raw)
To: Harald Welte; +Cc: Netfilter Development Mailinglist
Hi,
I try to build p-o-m [2003 06 05] on PPC and I take some unresolved symbols.
I don't know, that I send patch which resole this problem.
If yes, please appaly this.
If not here is the patch.
diff -Nur netfilter.org/patch-o-matic/base/fuzzy.patch netfilter/patch-o-matic/base/fuzzy.patch
--- netfilter.org/patch-o-matic/base/fuzzy.patch Wed Sep 4 16:11:30 2002
+++ netfilter/patch-o-matic/base/fuzzy.patch Fri Jun 6 15:19:57 2003
@@ -59,7 +59,7 @@
+ Expressed in percentage
+*/
+
-+#define PAR_LOW 0.01
++#define PAR_LOW 1/100
+#define PAR_HIGH 1
+
+static spinlock_t fuzzy_lock = SPIN_LOCK_UNLOCKED ;
@@ -138,7 +138,7 @@
+ howlow = mf_low(info->mean_rate,info->minimum_rate,info->maximum_rate);
+
+ info->acceptance_rate = (u_int8_t) \
-+ ( PAR_LOW*howhigh + PAR_HIGH*howlow ) ;
++ ( howhigh*PAR_LOW + PAR_HIGH*howlow ) ;
+
+ /* In fact , the above defuzzification would require a denominator
+ proportional to (howhigh+howlow) but , in this particular case ,
@@ -158,7 +158,7 @@
+ get_random_bytes((void *)(&random_number), 1);
+
+ /* If within the acceptance , it can pass => don't match */
-+ if ( random_number <= 2.55 * info->acceptance_rate )
++ if ( random_number <= (255 * info->acceptance_rate) / 100 )
+ return 0 ;
+ else
+ return 1; /* It can't pass ( It matches ) */
diff -Nur netfilter.org/patch-o-matic/base/fuzzy6.patch.ipv6 netfilter/patch-o-matic/base/fuzzy6.patch.ipv6
--- netfilter.org/patch-o-matic/base/fuzzy6.patch.ipv6 Fri Apr 11 12:27:54 2003
+++ netfilter/patch-o-matic/base/fuzzy6.patch.ipv6 Fri Jun 6 15:20:49 2003
@@ -60,7 +60,7 @@
+ Expressed in percentage
+*/
+
-+#define PAR_LOW 0.01
++#define PAR_LOW 1/100
+#define PAR_HIGH 1
+
+static spinlock_t fuzzy_lock = SPIN_LOCK_UNLOCKED;
@@ -138,7 +138,7 @@
+ howlow = mf_low(info->mean_rate,info->minimum_rate,info->maximum_rate);
+
+ info->acceptance_rate = (u_int8_t) \
-+ (PAR_LOW * howhigh + PAR_HIGH * howlow);
++ (howhigh * PAR_LOW + PAR_HIGH * howlow);
+
+ /* In fact, the above defuzzification would require a denominator
+ * proportional to (howhigh+howlow) but, in this particular case,
@@ -158,7 +158,7 @@
+ get_random_bytes((void *)(&random_number), 1);
+
+ /* If within the acceptance , it can pass => don't match */
-+ if (random_number <= 2.55 * info->acceptance_rate)
++ if (random_number <= (255 * info->acceptance_rate) / 100)
+ return 0;
+ else
+ return 1; /* It can't pass (It matches) */
--
{Wojciech 'Sas' Cieciwa} {Member of PLD Team }
{e-mail: cieciwa@alpha.zarz.agh.edu.pl, http://www2.zarz.agh.edu.pl/~cieciwa}
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: fuzzy.patch and fuzzy.patch.ipv6 - again.
@ 2003-06-06 17:54 Hime Junior
2003-06-06 19:04 ` Maciej Soltysiak
0 siblings, 1 reply; 4+ messages in thread
From: Hime Junior @ 2003-06-06 17:54 UTC (permalink / raw)
To: Cieciwa, laforge; +Cc: netfilter-devel
Hi Harald !
Have you applied that patch ?
As I said before , the new behavior is , in practice , equivalent to the old one.
Regards.
----- Original Message -----
From: "Wojciech \"Sas\" Cieciwa" <cieciwa@alpha.zarz.agh.edu.pl>
Date: Fri, 6 Jun 2003 15:31:42 +0200 (CEST)
To: Harald Welte <laforge@netfilter.org>
Subject: fuzzy.patch and fuzzy.patch.ipv6 - again.
> Hi,
>
> I try to build p-o-m [2003 06 05] on PPC and I take some unresolved symbols.
> I don't know, that I send patch which resole this problem.
>
> If yes, please appaly this.
> If not here is the patch.
>
> diff -Nur netfilter.org/patch-o-matic/base/fuzzy.patch netfilter/patch-o-matic/base/fuzzy.patch
> --- netfilter.org/patch-o-matic/base/fuzzy.patch Wed Sep 4 16:11:30 2002
> +++ netfilter/patch-o-matic/base/fuzzy.patch Fri Jun 6 15:19:57 2003
> @@ -59,7 +59,7 @@
> + Expressed in percentage
> +*/
> +
> -+#define PAR_LOW 0.01
> ++#define PAR_LOW 1/100
> +#define PAR_HIGH 1
> +
> +static spinlock_t fuzzy_lock = SPIN_LOCK_UNLOCKED ;
> @@ -138,7 +138,7 @@
> + howlow = mf_low(info->mean_rate,info->minimum_rate,info->maximum_rate);
> +
> + info->acceptance_rate = (u_int8_t) \
> -+ ( PAR_LOW*howhigh + PAR_HIGH*howlow ) ;
> ++ ( howhigh*PAR_LOW + PAR_HIGH*howlow ) ;
> +
> + /* In fact , the above defuzzification would require a denominator
> + proportional to (howhigh+howlow) but , in this particular case ,
> @@ -158,7 +158,7 @@
> + get_random_bytes((void *)(&random_number), 1);
> +
> + /* If within the acceptance , it can pass => don't match */
> -+ if ( random_number <= 2.55 * info->acceptance_rate )
> ++ if ( random_number <= (255 * info->acceptance_rate) / 100 )
> + return 0 ;
> + else
> + return 1; /* It can't pass ( It matches ) */
> diff -Nur netfilter.org/patch-o-matic/base/fuzzy6.patch.ipv6 netfilter/patch-o-matic/base/fuzzy6.patch.ipv6
> --- netfilter.org/patch-o-matic/base/fuzzy6.patch.ipv6 Fri Apr 11 12:27:54 2003
> +++ netfilter/patch-o-matic/base/fuzzy6.patch.ipv6 Fri Jun 6 15:20:49 2003
> @@ -60,7 +60,7 @@
> + Expressed in percentage
> +*/
> +
> -+#define PAR_LOW 0.01
> ++#define PAR_LOW 1/100
> +#define PAR_HIGH 1
> +
> +static spinlock_t fuzzy_lock = SPIN_LOCK_UNLOCKED;
> @@ -138,7 +138,7 @@
> + howlow = mf_low(info->mean_rate,info->minimum_rate,info->maximum_rate);
> +
> + info->acceptance_rate = (u_int8_t) \
> -+ (PAR_LOW * howhigh + PAR_HIGH * howlow);
> ++ (howhigh * PAR_LOW + PAR_HIGH * howlow);
> +
> + /* In fact, the above defuzzification would require a denominator
> + * proportional to (howhigh+howlow) but, in this particular case,
> @@ -158,7 +158,7 @@
> + get_random_bytes((void *)(&random_number), 1);
> +
> + /* If within the acceptance , it can pass => don't match */
> -+ if (random_number <= 2.55 * info->acceptance_rate)
> ++ if (random_number <= (255 * info->acceptance_rate) / 100)
> + return 0;
> + else
> + return 1; /* It can't pass (It matches) */
>
> --
> {Wojciech 'Sas' Cieciwa} {Member of PLD Team }
> {e-mail: cieciwa@alpha.zarz.agh.edu.pl, http://www2.zarz.agh.edu.pl/~cieciwa}
>
>
Hime Junior
___________________________
Electronic and Control Engineer
--
__________________________________________________________
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: fuzzy.patch and fuzzy.patch.ipv6 - again.
2003-06-06 17:54 fuzzy.patch and fuzzy.patch.ipv6 - again Hime Junior
@ 2003-06-06 19:04 ` Maciej Soltysiak
0 siblings, 0 replies; 4+ messages in thread
From: Maciej Soltysiak @ 2003-06-06 19:04 UTC (permalink / raw)
To: Hime Junior; +Cc: Cieciwa, laforge, netfilter-devel
Hi,
> Hi Harald !
>
> Have you applied that patch ?
The patch has not been applied yet.
You can subscribe to netfilet-cvslog to follow the changes to CVS
https://lists.netfilter.org/mailman/listinfo/netfilter-cvslog
Regards,
Maciej
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: fuzzy.patch and fuzzy.patch.ipv6 - again.
2003-06-06 13:31 ` fuzzy.patch and fuzzy.patch.ipv6 - again Wojciech "Sas" Cieciwa
@ 2003-06-14 14:12 ` Martin Josefsson
0 siblings, 0 replies; 4+ messages in thread
From: Martin Josefsson @ 2003-06-14 14:12 UTC (permalink / raw)
To: Wojciech "Sas" Cieciwa; +Cc: Netfilter Development Mailinglist
On Fri, 2003-06-06 at 15:31, Wojciech "Sas" Cieciwa wrote:
> Hi,
>
> I try to build p-o-m [2003 06 05] on PPC and I take some unresolved symbols.
> I don't know, that I send patch which resole this problem.
Thanks, applied
--
/Martin
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-06-14 14:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-06 17:54 fuzzy.patch and fuzzy.patch.ipv6 - again Hime Junior
2003-06-06 19:04 ` Maciej Soltysiak
-- strict thread matches above, loose matches on Subject: below --
2003-06-05 10:34 [PATCH] first version of optimized mark_source_chains() Harald Welte
2003-06-06 13:31 ` fuzzy.patch and fuzzy.patch.ipv6 - again Wojciech "Sas" Cieciwa
2003-06-14 14:12 ` Martin Josefsson
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.