--- bat_iv_ogm.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/bat_iv_ogm.c b/bat_iv_ogm.c index d60e1ba..e4bd54e 100644 --- a/bat_iv_ogm.c +++ b/bat_iv_ogm.c @@ -772,8 +772,7 @@ static int bat_ogm_calc_tq(struct orig_node *orig_node,
/* if we have too few packets (too less data) we set tq_own to zero */ /* if we receive too few packets it is not considered bidirectional */ - if ((total_count < TQ_LOCAL_BIDRECT_SEND_MINIMUM) || - (neigh_rq_count < TQ_LOCAL_BIDRECT_RECV_MINIMUM)) + if (total_count < TQ_LOCAL_BIDRECT_SEND_MINIMUM) tq_own = 0; else /* neigh_node->real_packet_count is never zero as we
2011/11/24 Sven Eckelmann sven@narfation.org:
On Thursday 24 November 2011 14:06:01 Daniele Furlan wrote:
What do you think about some information, reasoning, examples,....
Ok, using letter a,b,c,k instead of:
c = total_count a = neigh_rq_count b = orig_eq_count k = TQ_LOCAL_BIDRECT_SEND_MINIMUM
then the code do the following:
c = min (a,b) and then check this condition: (c<k OR a<k)
now
if (c<k)=TRUE then (a<k) is not checked if (c<k)=FALSE (so c>=k) then (a<k)=FALSE because (a>=c>=k)
so the part that check (a<k) is useless.
Thanks, Sven
On Thursday 24 November 2011 15:25:40 Daniele Furlan wrote:
2011/11/24 Sven Eckelmann sven@narfation.org:
On Thursday 24 November 2011 14:06:01 Daniele Furlan wrote:
What do you think about some information, reasoning, examples,....
Ok, using letter a,b,c,k instead of:
c = total_count a = neigh_rq_count b = orig_eq_count k = TQ_LOCAL_BIDRECT_SEND_MINIMUM
what about l = TQ_LOCAL_BIDRECT_RECV_MINIMUM?
then the code do the following:
c = min (a,b) and then check this condition: (c<k OR a<k)
no, it compares (c<k || a<l)
[snip] Wrong proof using wrong assumptions. You just cannot say that TQ_LOCAL_BIDRECT_SEND_MINIMUM has always the same value as TQ_LOCAL_BIDRECT_RECV_MINIMUM just because it is in this particular example.
And just as reminder: Such things belong in the commit message.
Kind regards, Sven
2011/11/24 Sven Eckelmann sven@narfation.org:
On Thursday 24 November 2011 15:25:40 Daniele Furlan wrote:
2011/11/24 Sven Eckelmann sven@narfation.org:
On Thursday 24 November 2011 14:06:01 Daniele Furlan wrote:
What do you think about some information, reasoning, examples,....
Ok, using letter a,b,c,k instead of:
c = total_count a = neigh_rq_count b = orig_eq_count k = TQ_LOCAL_BIDRECT_SEND_MINIMUM
what about l = TQ_LOCAL_BIDRECT_RECV_MINIMUM?
oops I read too fast and i miss the two distinct constants in the condition... I complain about this gaff....
then the code do the following:
c = min (a,b) and then check this condition: (c<k OR a<k)
no, it compares (c<k || a<l)
[snip] Wrong proof using wrong assumptions. You just cannot say that TQ_LOCAL_BIDRECT_SEND_MINIMUM has always the same value as TQ_LOCAL_BIDRECT_RECV_MINIMUM just because it is in this particular example.
Anyhow, is there a reason to assign to these constants different values?
And just as reminder: Such things belong in the commit message.
Kind regards, Sven
Regards.
On Thursday, November 24, 2011 22:56:48 Daniele Furlan wrote:
Wrong proof using wrong assumptions. You just cannot say that TQ_LOCAL_BIDRECT_SEND_MINIMUM has always the same value as TQ_LOCAL_BIDRECT_RECV_MINIMUM just because it is in this particular example.
Anyhow, is there a reason to assign to these constants different values?
Well, one is the minimum for the RQ and the other one for the EQ. There could be several reasons to have different values here (depending on your needs).
Cheers, Marek
b.a.t.m.a.n@lists.open-mesh.org