All of lore.kernel.org
 help / color / mirror / Atom feed
From: Antonio Quartulli <antonio@open-mesh.com>
To: The list for a Better Approach To Mobile Ad-hoc Networking
	<b.a.t.m.a.n@lists.open-mesh.org>
Cc: Thomas Huehn <thomas@net.t-labs.tu-berlin.de>,
	Marek Lindner <mareklindner@neomailbox.ch>
Subject: Re: [B.A.T.M.A.N.] [PATCHv2 next 2/3] batman-adv: convert wifi driver throughput to multiples of 100kbps
Date: Mon, 1 Feb 2016 22:45:34 +0800	[thread overview]
Message-ID: <20160201144534.GB12011@prodigo> (raw)
In-Reply-To: <2398211.sq1Z83hZa4@bentobox>

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

On Mon, Feb 01, 2016 at 01:26:12PM +0100, Sven Eckelmann wrote:
> On Monday 01 February 2016 14:34:33 Marek Lindner wrote:
> > The expected throughout returned by the cfg80211 API is expressed in kbps
> > while internally batman-adv stores multiples of 100kbps. Ensure the
> > conversion is performed properly.
> > 
> > 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;
> >  		}
> 
> Just tested it here and can say that it now show the same value as
> `iw dev adhoc0 station dump`. But the output of `iw dev adhoc0 station dump`
> confuses me. I can get easily get over 40 Mbit/s but the output of
> `iw dev adhoc0 station dump` show me 4.705Mbps. Also the output of
> `cat /sys/kernel/debug/ieee80211/phy*/netdev\:adhoc0/stations/*/rc_stats` look
> definitely more like ~40 Mbit/s.
> 
> Antonio, can you please check my tests and my conclusion (+patch [1]).

Sven,

your test looks correct. By accident this bug in mac80211 was "balanced" by the
bug that Marek is fixing with ("batman-adv: convert wifi driver throughput to
multiples of 100kbps").

Your patch[1] looks sane to me. Thanks for sending it to linux-wireless.

Cheers,


[1]http://article.gmane.org/gmane.linux.kernel.wireless.general/148102

-- 
Antonio Quartulli

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

  reply	other threads:[~2016-02-01 14:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-01  6:34 [B.A.T.M.A.N.] [PATCHv2 next 1/3] batman-adv: add missing kernel doc Marek Lindner
2016-02-01  6:34 ` [B.A.T.M.A.N.] [PATCHv2 next 2/3] batman-adv: convert wifi driver throughput to multiples of 100kbps Marek Lindner
2016-02-01 12:26   ` Sven Eckelmann
2016-02-01 14:45     ` Antonio Quartulli [this message]
2016-02-10 10:21   ` Marek Lindner
2016-02-01  6:34 ` [B.A.T.M.A.N.] [PATCHv2 next 3/3] batman-adv: fix misleading default throughput warning Marek Lindner
2016-02-10 10:22   ` Marek Lindner
2016-02-10 10:19 ` [B.A.T.M.A.N.] [PATCHv2 next 1/3] batman-adv: add missing kernel doc Marek Lindner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160201144534.GB12011@prodigo \
    --to=antonio@open-mesh.com \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    --cc=mareklindner@neomailbox.ch \
    --cc=thomas@net.t-labs.tu-berlin.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.