Re: [B.A.T.M.A.N.] BATMAN routing

hlabishi kobo
2011-04-19T10:21:03Z

On 4/3/11, Sven Eckelmann <sven@narfation.org> wrote:
> hlabishi kobo wrote:
>> int weighted_bit_packet_count(TYPE_OF_WORD *seq_bits)
>> {
>> int i,check, count = 0;
>> TYPE_OF_WORD word;
>>
>> for (i = 0; i < NUM_WORDS; i++) {
>> word = seq_bits[i];
>> int j = WORD_BIT_SIZE, k = 1;
>>
>> while (j > 0 && k <= 32){
>
> it is wrong to assume that unsigned long is 32 bit long.

> I would doubt that it is correct to give every set bit the same weight when
> they have the the distance of sizeof(unsigned long)*8. And I cannot find a
> good reason why an "old" unsigned long should get the same weights as the
> "newest" unsigned long - at least not when the actual weights should be
> reduced for "older" bits in a single unsigned long and the overall weights
> should be monotonic decreasing with the age.
I am looking at how i can deal with this part.
And using WORD_BIT_SIZE for j
> is
> like assuming that we only have a single unsigned long in seq_bits... which
> is
> not true for many architectures.
During the debugging i realized that this can handle more than 1
unsigned long in seq_bits, i just need to prioritize the newer ones to
the old.
> And the code is overly complicated without any good reason.
I also thought so but so that it was the simplest i could come with,
still drawing up some other ways hopefully i will improve it with
time.
> Kind regards,
> Sven
>

I have been doing some tests using iperf/jperf to simulate traffic
between host. The results show lot of packet loss (though
inconsistent) and i am not sure if this could be the results of
overheads in the network. Is there anyway i could debug the amounts of
overheads on the network? What testing methods do you and your team
use?

--
Kind Regards
Hlabishi I. Kobo, Mr
Computer Science (Msc)
University of the Western Cape
Bellville, Cape Town, South Africa
+27 72 840 7719
+27 21 959 2461