Skip to contentSkip to conversation

fuzzy.patch and fuzzy6.patch.ipv6

PATCH Hime Junior 1 participant 1 message Apr 30, 2003 netfilter

lore
Share & tools
lore
#0 lore raw

Hi Harald :

My comments go along the original message...

----- Original Message -----
From: Harald Welte <[email protected]>
Date: Wed, 30 Apr 2003 17:57:36 +0200
To: Wojciech Sas Cieciwa <[email protected]>
Subject: Re: [PATCH] fuzzy.patch and fuzzy6.patch.ipv6

Quoted 6 lines · Wojciech Sas Cieciwa
Quoted 4 lines

Hi,
This is small patch to fix toruble on PPC with netfilter in module. [Without this compiler generate "unresolved symbols"]

I´m curious about what "unresolved symbols" are those and why,
by changing the VALUE of a symbolic constant,the problem vanishes...

Quoted 1 line

indeed, there is no need for using floating point arithmetics at all.

OK . The floating point instructions are eliminated by applying this patch .

Quoted 4 lines

Hime, would the proposed changes be fine with you (as the original author) ?

In functional terms , there is no difference between the
two pieces of code - the behavior of the controller SHOULD be
the same (in abstract terms).

The only problem is relative to truncation errors...
I don´t have a PPC to do exaustive tests , but
in the simulations that I have made , no discrepancies were detected when computing the final acceptance rates .

=========================================================

	info->acceptance_rate = (u_int8_t) \
		(PAR_LOW * howhigh + PAR_HIGH * howlow);
		(howhigh * PAR_LOW + PAR_HIGH * howlow);

=========================================================

However , when we change

" if (random_number <= 2.55 * info->acceptance_rate) "

by

" if (random_number <= (255 * info->acceptance_rate) / 100) "

we get different results for some (few) values of info->acceptance_rate.

The good news are that the controller still works well and its behavior is basically the same .

So , the patch (if applied , of course) will change the behavior of the controller - in an innocuous way , truly .

My opinion is that the primary reason for the change is very weird - "unresolved symbols" - and the solution is even more strange. Anyway , I suggest additional investigation about this issue .

Thank you very much .

Signature · 3 lines
__________________________________________________________
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup