* [B.A.T.M.A.N.] [PATCH] fix algorithm, which was unintentional changed on update from 2013 to 2014
@ 2015-05-17 9:37 Ruben Wisniewski
2015-05-17 9:49 ` Sven Eckelmann
0 siblings, 1 reply; 2+ messages in thread
From: Ruben Wisniewski @ 2015-05-17 9:37 UTC (permalink / raw)
To: b.a.t.m.a.n
[-- Attachment #1: Type: text/plain, Size: 1073 bytes --]
This patch restores the unintentional change on commit
http://www.open-mesh.org/projects/batman-adv/repository/revisions/0853ec7fafe0a195754454832993c6b35e22b842/diff/gateway_client.c
Original the algorithm uses kbit for calculation, now the values are
stored as "mbit*10" so we have to multiply it with 100 to restore the old
behavior.
Signed-off-by: Ruben Wisniewsi <ruben@vfn-nrw.de>
---
net/batman-adv/gateway_client.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/batman-adv/gateway_client.c b/net/batman-adv/gateway_client.c
index 1f50661..6f00584 100644
--- a/net/batman-adv/gateway_client.c
+++ b/net/batman-adv/gateway_client.c
@@ -185,7 +185,7 @@ batadv_gw_get_best_gw_node(struct batadv_priv *bat_priv)
switch (atomic_read(&bat_priv->gw_sel_class)) {
case 1: /* fast connection */
tmp_gw_factor = tq_avg * tq_avg;
- tmp_gw_factor *= gw_node->bandwidth_down;
+ tmp_gw_factor *= gw_node->bandwidth_down * 100;
tmp_gw_factor *= 100 * 100;
tmp_gw_factor /= gw_divisor;
--
2.4.0
[-- Attachment #2: Digitale Signatur von OpenPGP --]
[-- Type: application/pgp-signature, Size: 307 bytes --]
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [B.A.T.M.A.N.] [PATCH] fix algorithm, which was unintentional changed on update from 2013 to 2014
2015-05-17 9:37 [B.A.T.M.A.N.] [PATCH] fix algorithm, which was unintentional changed on update from 2013 to 2014 Ruben Wisniewski
@ 2015-05-17 9:49 ` Sven Eckelmann
0 siblings, 0 replies; 2+ messages in thread
From: Sven Eckelmann @ 2015-05-17 9:49 UTC (permalink / raw)
To: b.a.t.m.a.n
[-- Attachment #1: Type: text/plain, Size: 911 bytes --]
On Sunday 17 May 2015 11:37:26 Ruben Wisniewski wrote:
> This patch restores the unintentional change on commit
>
> http://www.open-mesh.org/projects/batman-adv/repository/revisions/0853ec7faf
> e0a195754454832993c6b35e22b842/diff/gateway_client.c
Please use a format more like in the commit I've showed in the last mail about
this patch and not such a link. The relevant documentation about it can be
found in https://www.kernel.org/doc/Documentation/SubmittingPatches under "2)
Describe your changes."
Also the patch subject is... see the other mails and the mentioned
documentation in it.
> Original the algorithm uses kbit for calculation, now the values are
> stored as "mbit*10" so we have to multiply it with 100 to restore the old
> behavior.
Things I miss in the commit message: why is the old behavior better? What
problem was introduced because of the missing " * 100".
Kind regards,
Sven
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-05-17 9:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-17 9:37 [B.A.T.M.A.N.] [PATCH] fix algorithm, which was unintentional changed on update from 2013 to 2014 Ruben Wisniewski
2015-05-17 9:49 ` Sven Eckelmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox