All of lore.kernel.org
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] [PATCH next 1/3] batman-adv: add missing kernel doc
@ 2016-01-31 16:21 Marek Lindner
  2016-01-31 16:21 ` [B.A.T.M.A.N.] [PATCH next 2/3] batman-adv: convert wifi driver throughput to multiples of 100kbps Marek Lindner
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Marek Lindner @ 2016-01-31 16:21 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: Marek Lindner

Fixes: 5c324517 ("ELP - compute the metric based on the estimated throughput")

Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
---
 net/batman-adv/bat_v_elp.c | 3 ++-
 net/batman-adv/main.h      | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/net/batman-adv/bat_v_elp.c b/net/batman-adv/bat_v_elp.c
index f257897..46c6a00 100644
--- a/net/batman-adv/bat_v_elp.c
+++ b/net/batman-adv/bat_v_elp.c
@@ -67,7 +67,8 @@ static void batadv_v_elp_start_timer(struct batadv_hard_iface *hard_iface)
  * batadv_v_elp_get_throughput - get the throughput towards a neighbour
  * @neigh: the neighbour for which the throughput has to be obtained
  *
- * Return: the throughput towards the given neighbour.
+ * Return: The throughput towards the given neighbour in multiples of 100kpbs
+ *         (a value of '10' equals to 1Mbps).
  */
 static u32 batadv_v_elp_get_throughput(struct batadv_hardif_neigh_node *neigh)
 {
diff --git a/net/batman-adv/main.h b/net/batman-adv/main.h
index 7b05f68..db45336 100644
--- a/net/batman-adv/main.h
+++ b/net/batman-adv/main.h
@@ -62,7 +62,7 @@
 #define BATADV_TQ_TOTAL_BIDRECT_LIMIT 1
 
 /* B.A.T.M.A.N. V */
-#define BATADV_THROUGHPUT_DEFAULT_VALUE 10
+#define BATADV_THROUGHPUT_DEFAULT_VALUE 10 /* 1 Mbps */
 #define BATADV_ELP_PROBES_PER_NODE 2
 #define BATADV_ELP_MIN_PROBE_SIZE 200 /* bytes */
 #define BATADV_ELP_PROBE_MAX_TX_DIFF 100 /* milliseconds */
-- 
2.7.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [B.A.T.M.A.N.] [PATCH next 2/3] batman-adv: convert wifi driver throughput to multiples of 100kbps
  2016-01-31 16:21 [B.A.T.M.A.N.] [PATCH next 1/3] batman-adv: add missing kernel doc Marek Lindner
@ 2016-01-31 16:21 ` Marek Lindner
  2016-02-01  0:46   ` Antonio Quartulli
  2016-01-31 16:21 ` [B.A.T.M.A.N.] [PATCH next 3/3] batman-adv: fix misleading default throughput warning Marek Lindner
  2016-02-01  0:44 ` [B.A.T.M.A.N.] [PATCH next 1/3] batman-adv: add missing kernel doc Antonio Quartulli
  2 siblings, 1 reply; 10+ messages in thread
From: Marek Lindner @ 2016-01-31 16:21 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: Marek Lindner

Fixes: 5c324517 ("ELP - compute the metric based on the estimated throughput")

Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
---
 net/batman-adv/bat_v_elp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/batman-adv/bat_v_elp.c b/net/batman-adv/bat_v_elp.c
index 46c6a00..461a765 100644
--- a/net/batman-adv/bat_v_elp.c
+++ b/net/batman-adv/bat_v_elp.c
@@ -100,7 +100,7 @@ static u32 batadv_v_elp_get_throughput(struct batadv_hardif_neigh_node *neigh)
 				return 0;
 			}
 			if (!ret)
-				return sinfo.expected_throughput / 10;
+				return sinfo.expected_throughput / 100;
 		}
 
 		/* unsupported WiFi driver version */
-- 
2.7.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [B.A.T.M.A.N.] [PATCH next 3/3] batman-adv: fix misleading default throughput warning
  2016-01-31 16:21 [B.A.T.M.A.N.] [PATCH next 1/3] batman-adv: add missing kernel doc Marek Lindner
  2016-01-31 16:21 ` [B.A.T.M.A.N.] [PATCH next 2/3] batman-adv: convert wifi driver throughput to multiples of 100kbps Marek Lindner
@ 2016-01-31 16:21 ` Marek Lindner
  2016-02-01  0:48   ` Antonio Quartulli
  2016-02-01  0:44 ` [B.A.T.M.A.N.] [PATCH next 1/3] batman-adv: add missing kernel doc Antonio Quartulli
  2 siblings, 1 reply; 10+ messages in thread
From: Marek Lindner @ 2016-01-31 16:21 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: Marek Lindner

The default throughput value represents Mbps and not kbps.

Fixes: 5c324517 ("ELP - compute the metric based on the estimated throughput")

Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
---
 net/batman-adv/bat_v_elp.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/net/batman-adv/bat_v_elp.c b/net/batman-adv/bat_v_elp.c
index 461a765..2a6a9a2 100644
--- a/net/batman-adv/bat_v_elp.c
+++ b/net/batman-adv/bat_v_elp.c
@@ -129,9 +129,10 @@ static u32 batadv_v_elp_get_throughput(struct batadv_hardif_neigh_node *neigh)
 default_throughput:
 	if (!(hard_iface->bat_v.flags & BATADV_WARNING_DEFAULT)) {
 		batadv_info(hard_iface->soft_iface,
-			    "WiFi driver or ethtool info does not provide information about link speeds on interface %s, therefore defaulting to hardcoded throughput values of %d kbit/s. Consider overriding the throughput manually or checking your driver.\n",
+			    "WiFi driver or ethtool info does not provide information about link speeds on interface %s, therefore defaulting to hardcoded throughput values of %u.%1u Mbps. Consider overriding the throughput manually or checking your driver.\n",
 			    hard_iface->net_dev->name,
-			    BATADV_THROUGHPUT_DEFAULT_VALUE / 10);
+			    BATADV_THROUGHPUT_DEFAULT_VALUE / 10,
+			    BATADV_THROUGHPUT_DEFAULT_VALUE % 10);
 		hard_iface->bat_v.flags |= BATADV_WARNING_DEFAULT;
 	}
 
-- 
2.7.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [B.A.T.M.A.N.] [PATCH next 1/3] batman-adv: add missing kernel doc
  2016-01-31 16:21 [B.A.T.M.A.N.] [PATCH next 1/3] batman-adv: add missing kernel doc Marek Lindner
  2016-01-31 16:21 ` [B.A.T.M.A.N.] [PATCH next 2/3] batman-adv: convert wifi driver throughput to multiples of 100kbps Marek Lindner
  2016-01-31 16:21 ` [B.A.T.M.A.N.] [PATCH next 3/3] batman-adv: fix misleading default throughput warning Marek Lindner
@ 2016-02-01  0:44 ` Antonio Quartulli
  2 siblings, 0 replies; 10+ messages in thread
From: Antonio Quartulli @ 2016-02-01  0:44 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking; +Cc: Marek Lindner

[-- Attachment #1: Type: text/plain, Size: 284 bytes --]

On Mon, Feb 01, 2016 at 12:21:18AM +0800, Marek Lindner wrote:
> Fixes: 5c324517 ("ELP - compute the metric based on the estimated throughput")
> 
> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>

Acked-by: Antonio Quartulli <a@unstable.cc>

-- 
Antonio Quartulli

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [B.A.T.M.A.N.] [PATCH next 2/3] batman-adv: convert wifi driver throughput to multiples of 100kbps
  2016-01-31 16:21 ` [B.A.T.M.A.N.] [PATCH next 2/3] batman-adv: convert wifi driver throughput to multiples of 100kbps Marek Lindner
@ 2016-02-01  0:46   ` Antonio Quartulli
  2016-02-01  1:39     ` Marek Lindner
  0 siblings, 1 reply; 10+ messages in thread
From: Antonio Quartulli @ 2016-02-01  0:46 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking; +Cc: Marek Lindner

[-- Attachment #1: Type: text/plain, Size: 480 bytes --]

On Mon, Feb 01, 2016 at 12:21:19AM +0800, Marek Lindner wrote:
> Fixes: 5c324517 ("ELP - compute the metric based on the estimated throughput")
> 
> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>

Maybe before merging this patch you add a one line commit message here saying
that expected_throughput is supposed to be expressed in kbps, therefore this
fix is required ?

Other than that:
Acked-by: Antonio Quartulli <a@unstable.cc>

-- 
Antonio Quartulli

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [B.A.T.M.A.N.] [PATCH next 3/3] batman-adv: fix misleading default throughput warning
  2016-01-31 16:21 ` [B.A.T.M.A.N.] [PATCH next 3/3] batman-adv: fix misleading default throughput warning Marek Lindner
@ 2016-02-01  0:48   ` Antonio Quartulli
  2016-02-01  1:44     ` Marek Lindner
  0 siblings, 1 reply; 10+ messages in thread
From: Antonio Quartulli @ 2016-02-01  0:48 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking; +Cc: Marek Lindner

[-- Attachment #1: Type: text/plain, Size: 324 bytes --]

On Mon, Feb 01, 2016 at 12:21:20AM +0800, Marek Lindner wrote:
> The default throughput value represents Mbps and not kbps.

Isn't this a bit confusing? The default throughput is expressed in multiples of
100kbps, not Mbps.

the rest looks good:
Acked-by: Antonio Quartulli <a@unstable.cc>

-- 
Antonio Quartulli

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [B.A.T.M.A.N.] [PATCH next 2/3] batman-adv: convert wifi driver throughput to multiples of 100kbps
  2016-02-01  0:46   ` Antonio Quartulli
@ 2016-02-01  1:39     ` Marek Lindner
  2016-02-01  2:15       ` Antonio Quartulli
  0 siblings, 1 reply; 10+ messages in thread
From: Marek Lindner @ 2016-02-01  1:39 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

[-- Attachment #1: Type: text/plain, Size: 692 bytes --]

On Monday, February 01, 2016 08:46:23 Antonio Quartulli wrote:
> On Mon, Feb 01, 2016 at 12:21:19AM +0800, Marek Lindner wrote:
> > Fixes: 5c324517 ("ELP - compute the metric based on the estimated
> > throughput")>
> > 
> >
> > Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
> 
> Maybe before merging this patch you add a one line commit message here
> saying that expected_throughput is supposed to be expressed in kbps,
> therefore this fix is required ?

As we haven't sent the offending patch upstream yet, you can simply merge all 
3 fixes into "ELP - compute the metric based on the estimated throughput" and 
be done with it. This patch isn't for stable ...

Cheers,
Marek

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [B.A.T.M.A.N.] [PATCH next 3/3] batman-adv: fix misleading default throughput warning
  2016-02-01  0:48   ` Antonio Quartulli
@ 2016-02-01  1:44     ` Marek Lindner
  2016-02-01  2:46       ` Antonio Quartulli
  0 siblings, 1 reply; 10+ messages in thread
From: Marek Lindner @ 2016-02-01  1:44 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

[-- Attachment #1: Type: text/plain, Size: 654 bytes --]

On Monday, February 01, 2016 08:48:26 Antonio Quartulli wrote:
> On Mon, Feb 01, 2016 at 12:21:20AM +0800, Marek Lindner wrote:
> > The default throughput value represents Mbps and not kbps.
> 
> Isn't this a bit confusing? The default throughput is expressed in multiples
> of 100kbps, not Mbps.

Prior to my patch the debug message said:
"[..] therefore defaulting to hardcoded throughput values of 1 kbit/s."

With the patch it says:
"[..] therefore defaulting to hardcoded throughput values of 1.0 Mbps."

FYI, I changed the text to "Mbps" because that is what batman-adv prints in 
the neighbor table as well in the originator table.

Cheers,
Marek

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [B.A.T.M.A.N.] [PATCH next 2/3] batman-adv: convert wifi driver throughput to multiples of 100kbps
  2016-02-01  1:39     ` Marek Lindner
@ 2016-02-01  2:15       ` Antonio Quartulli
  0 siblings, 0 replies; 10+ messages in thread
From: Antonio Quartulli @ 2016-02-01  2:15 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

[-- Attachment #1: Type: text/plain, Size: 1001 bytes --]

On Mon, Feb 01, 2016 at 09:39:33AM +0800, Marek Lindner wrote:
> On Monday, February 01, 2016 08:46:23 Antonio Quartulli wrote:
> > On Mon, Feb 01, 2016 at 12:21:19AM +0800, Marek Lindner wrote:
> > > Fixes: 5c324517 ("ELP - compute the metric based on the estimated
> > > throughput")>
> > > 
> > >
> > > Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
> > 
> > Maybe before merging this patch you add a one line commit message here
> > saying that expected_throughput is supposed to be expressed in kbps,
> > therefore this fix is required ?
> 
> As we haven't sent the offending patch upstream yet, you can simply merge all 
> 3 fixes into "ELP - compute the metric based on the estimated throughput" and 
> be done with it. This patch isn't for stable ...

Sure, but I was talking about our repository, just to have a better
understanding of this patch in the future. But if you think we don't need any
description it's fine.


Cheers,


-- 
Antonio Quartulli

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [B.A.T.M.A.N.] [PATCH next 3/3] batman-adv: fix misleading default throughput warning
  2016-02-01  1:44     ` Marek Lindner
@ 2016-02-01  2:46       ` Antonio Quartulli
  0 siblings, 0 replies; 10+ messages in thread
From: Antonio Quartulli @ 2016-02-01  2:46 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

[-- Attachment #1: Type: text/plain, Size: 1052 bytes --]

On Mon, Feb 01, 2016 at 09:44:39AM +0800, Marek Lindner wrote:
> On Monday, February 01, 2016 08:48:26 Antonio Quartulli wrote:
> > On Mon, Feb 01, 2016 at 12:21:20AM +0800, Marek Lindner wrote:
> > > The default throughput value represents Mbps and not kbps.
> > 
> > Isn't this a bit confusing? The default throughput is expressed in multiples
> > of 100kbps, not Mbps.
> 
> Prior to my patch the debug message said:
> "[..] therefore defaulting to hardcoded throughput values of 1 kbit/s."
> 
> With the patch it says:
> "[..] therefore defaulting to hardcoded throughput values of 1.0 Mbps."
> 
> FYI, I changed the text to "Mbps" because that is what batman-adv prints in 
> the neighbor table as well in the originator table.

The patch is fixing the way you interpret the BATADV_THROUGHPUT_DEFAULT_VALUE
constant, therefore I expected that with "The default throughput value
represents Mbps" you were stating how to properly interpret such constant (and
this wouldn't be correct).


Cheers,



-- 
Antonio Quartulli

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-02-01  2:46 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-31 16:21 [B.A.T.M.A.N.] [PATCH next 1/3] batman-adv: add missing kernel doc Marek Lindner
2016-01-31 16:21 ` [B.A.T.M.A.N.] [PATCH next 2/3] batman-adv: convert wifi driver throughput to multiples of 100kbps Marek Lindner
2016-02-01  0:46   ` Antonio Quartulli
2016-02-01  1:39     ` Marek Lindner
2016-02-01  2:15       ` Antonio Quartulli
2016-01-31 16:21 ` [B.A.T.M.A.N.] [PATCH next 3/3] batman-adv: fix misleading default throughput warning Marek Lindner
2016-02-01  0:48   ` Antonio Quartulli
2016-02-01  1:44     ` Marek Lindner
2016-02-01  2:46       ` Antonio Quartulli
2016-02-01  0:44 ` [B.A.T.M.A.N.] [PATCH next 1/3] batman-adv: add missing kernel doc Antonio Quartulli

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.