2018-11-20 19:34:00

by Ramon Fontes

[permalink] [raw]
Subject: mac80211_hwsim: multiple antennas

Would be possible to simulate (or even add support to) multiple
antennas? I was trying to extend wmediumd to 802.11n according the
rates provided by http://mcsindex.com/, but the maximum rate I get is
~33Mbps, even if I set the MCS index to 15. Given the result, I
thought that it could be related to the number of antennas. Is my
assumption correct?

regards,
Ramon


2018-11-21 09:11:18

by Johannes Berg

[permalink] [raw]
Subject: Re: mac80211_hwsim: multiple antennas

On Tue, 2018-11-20 at 16:33 -0300, Ramon Fontes wrote:
> Would be possible to simulate (or even add support to) multiple
> antennas? I was trying to extend wmediumd to 802.11n according the
> rates provided by http://mcsindex.com/, but the maximum rate I get is
> ~33Mbps, even if I set the MCS index to 15. Given the result, I
> thought that it could be related to the number of antennas. Is my
> assumption correct?

I'm not sure what you mean by "the maximum rate I get is ~33Mbps".

Are you trying to actually _measure_ it? Then, on a decent platform, you
should probably get many *gigabits*.

Or are you trying to look at the rate in "iw station dump" or in
radiotap? Then you should see higher rates since hwsim is configured to
pretend to have 4 spatial streams (IIRC)

johannes


2018-11-21 12:26:56

by Ramon Fontes

[permalink] [raw]
Subject: Re: mac80211_hwsim: multiple antennas

Sorry. I meant throughput.

Let's considering GI=800ns - 20MHz:

Without setting the MCS value the throughput is around 18Mbps.
tx bitrate 58.5 MBit/s MCS 6
rx bitrate 48.0 MBit/s

Then I set the bitrate to ht-mcs-2.4 13, 14 and finally 15. Although
the tx bitrate increases as expected the maximum throughput is around
33Mbps
tx bitrate: 117.0 MBit/s MCS 14
rx bitrate: 54.0 MBit/s

I also tried the same with 40Mhz and the throughput doesn't change.
The maximum throughput is always ~33Mbps. Even when the tx bitrate is
300Mbps the maximum throughput is still ~33Mbps.

I noticed that the rx birate is related to the hwsim_rates from
mac80211_hwsim, however, increasing the value provided by hwsim_rates
doesn't change the throughput.

My topology consists of three nodes. 2 clients and one AP working with
hostapd. The hostapd config file includes ieee80211n=1 and
ht_capab='[HT40+]'. Sometimes I can see that tx bitrate is working at
40Mhz. However, it doesn't work at 40Mhz when there are data traffic.
The RSSI of both clients is -60dBm, but I also tried with -50dBm and
-40dBm. Tested with both 2.4 and 5Ghz.

This is my per.c file
(https://github.com/ramonfontes/wmediumd/blob/ieee80211n/wmediumd/per.c).
I only check if the rate-flags == IEEE80211_TX_RC_MCS and I force some
of the rateset added in my per.c.

Given this brief explanation I was wondering if it could be related to
the number of antennas.

Thank you in advance.
Ramon

Em qua, 21 de nov de 2018 às 06:11, Johannes Berg
<[email protected]> escreveu:
>
> On Tue, 2018-11-20 at 16:33 -0300, Ramon Fontes wrote:
> > Would be possible to simulate (or even add support to) multiple
> > antennas? I was trying to extend wmediumd to 802.11n according the
> > rates provided by http://mcsindex.com/, but the maximum rate I get is
> > ~33Mbps, even if I set the MCS index to 15. Given the result, I
> > thought that it could be related to the number of antennas. Is my
> > assumption correct?
>
> I'm not sure what you mean by "the maximum rate I get is ~33Mbps".
>
> Are you trying to actually _measure_ it? Then, on a decent platform, you
> should probably get many *gigabits*.
>
> Or are you trying to look at the rate in "iw station dump" or in
> radiotap? Then you should see higher rates since hwsim is configured to
> pretend to have 4 spatial streams (IIRC)
>
> johannes
>

2018-11-21 12:30:45

by Johannes Berg

[permalink] [raw]
Subject: Re: mac80211_hwsim: multiple antennas

On Wed, 2018-11-21 at 09:26 -0300, Ramon Fontes wrote:
> Sorry. I meant throughput.

Yeah, well. There's no actual medium (access) simulation in hwsim, so
the actual throughput you get only depends on the performance of your
CPU. 33Mbps seems quite low, but of course I don't know where you're
running this.

Then again, you say you're using wmediumd, so perhaps that *does* have
some sort of medium simulation these days? I didn't think it has it but
I may very well be wrong on that.

Try pure hwsim (no wmediumd) and see if you get gigabits, if not then
your system is probably just too slow.

And then I guess you'd have to look at wmediumd in more detail to see if
it has some simulations here? I don't know.

johannes


2018-11-21 12:47:52

by Ramon Fontes

[permalink] [raw]
Subject: Re: mac80211_hwsim: multiple antennas

Okay! Thanks a lot.

Indeed, the maximum throughput when using only hwsim is in the order of Gbp/s.
Em qua, 21 de nov de 2018 às 09:30, Johannes Berg
<[email protected]> escreveu:
>
> On Wed, 2018-11-21 at 09:26 -0300, Ramon Fontes wrote:
> > Sorry. I meant throughput.
>
> Yeah, well. There's no actual medium (access) simulation in hwsim, so
> the actual throughput you get only depends on the performance of your
> CPU. 33Mbps seems quite low, but of course I don't know where you're
> running this.
>
> Then again, you say you're using wmediumd, so perhaps that *does* have
> some sort of medium simulation these days? I didn't think it has it but
> I may very well be wrong on that.
>
> Try pure hwsim (no wmediumd) and see if you get gigabits, if not then
> your system is probably just too slow.
>
> And then I guess you'd have to look at wmediumd in more detail to see if
> it has some simulations here? I don't know.
>
> johannes
>

2018-11-21 12:48:45

by Johannes Berg

[permalink] [raw]
Subject: Re: mac80211_hwsim: multiple antennas

On Wed, 2018-11-21 at 09:47 -0300, Ramon Fontes wrote:
> Okay! Thanks a lot.
>
> Indeed, the maximum throughput when using only hwsim is in the order of Gbp/s.

So I guess the question is where it's going wrong - is it the wmediumd
overhead (netlink), some air simulation in wmediumd, etc.

johannes


2018-11-21 13:10:02

by Ramon Fontes

[permalink] [raw]
Subject: Re: mac80211_hwsim: multiple antennas

Yes. I thought that it could be related to the number of antennas (or
something else) after seeing this result
(https://bobcopeland.com/blog/2014/09/wmediumd-speed-test/) provided
by wmediumd.
Em qua, 21 de nov de 2018 às 09:48, Johannes Berg
<[email protected]> escreveu:
>
> On Wed, 2018-11-21 at 09:47 -0300, Ramon Fontes wrote:
> > Okay! Thanks a lot.
> >
> > Indeed, the maximum throughput when using only hwsim is in the order of Gbp/s.
>
> So I guess the question is where it's going wrong - is it the wmediumd
> overhead (netlink), some air simulation in wmediumd, etc.
>
> johannes
>

2018-11-22 12:19:05

by Ramon Fontes

[permalink] [raw]
Subject: Re: mac80211_hwsim: multiple antennas

I've tested the same setup with adhoc and the throughput seems to be
higher as expected. Thus, the problem comes up when I use hostapd.

I noticed that the maximum supported rate by hostapd (legacy) is 54Mbps.
Extended supported rates: 24.0 36.0 48.0 54.0

Then I tried to modify mac80211_hwsim in order to provide more rates
and it didn't work:
Extended supported rates: 24.0 36.0 48.0 54.0 54.0 54.0 54.0

The maximum supported rate is always 54Mbps.

Then I found the Beacon frame TX rate configuration from hostapd.conf.
After trying to enable the beacon rate (e.g. beacon_rate=ht:1) I got
the following msg:
ap1-wlan1: interface state UNINITIALIZED->HT_SCAN
Using interface ap1-wlan1 with hwaddr 02:00:00:00:02:00 and ssid "ssid-ap1"
nl80211: Driver does not support setting Beacon frame rate (HT)

and hostapd doesn't work.

Could this problem be related to mac80211_hwsim?

Em qua, 21 de nov de 2018 às 10:09, Ramon Fontes
<[email protected]> escreveu:
>
> Yes. I thought that it could be related to the number of antennas (or
> something else) after seeing this result
> (https://bobcopeland.com/blog/2014/09/wmediumd-speed-test/) provided
> by wmediumd.
> Em qua, 21 de nov de 2018 às 09:48, Johannes Berg
> <[email protected]> escreveu:
> >
> > On Wed, 2018-11-21 at 09:47 -0300, Ramon Fontes wrote:
> > > Okay! Thanks a lot.
> > >
> > > Indeed, the maximum throughput when using only hwsim is in the order of Gbp/s.
> >
> > So I guess the question is where it's going wrong - is it the wmediumd
> > overhead (netlink), some air simulation in wmediumd, etc.
> >
> > johannes
> >

2018-11-23 14:23:38

by Benjamin Beichler

[permalink] [raw]
Subject: Re: mac80211_hwsim: multiple antennas

I haven't used hwsim with hostapd yet, but I'm pretty sure, that it is
possible to change the beacon rate (as we changed them in 802.11s Mesh
Mode).

I'm think the problem here is, that you can't assign a HT rate for
beacons, because action/management frames are always sent with base-rate
or at least they need to be sent with legacy-rates in mixed mode.

I'm not sure, whether hwsim can use the "green-field" mode, in which
everything is sent with ht-rates, but most drivers for real devices do
not support green-field mode.

So the highest beacon rate seems to be 54.0 mbit/s.

Nonetheless, hwsim do not simulate the real timing behavior of this
rates. Since hostapd is only responsible for the association protocol
but not data transmission, it should not decrease the seen rates
extremely, but I have no numbers for it.
As more effort you use to simulated the on air behavior, you decrease
the throughput rates.

kind regards

Benjamin

Am 22.11.2018 um 13:18 schrieb Ramon Fontes:
> I've tested the same setup with adhoc and the throughput seems to be
> higher as expected. Thus, the problem comes up when I use hostapd.
>
> I noticed that the maximum supported rate by hostapd (legacy) is 54Mbps.
> Extended supported rates: 24.0 36.0 48.0 54.0
>
> Then I tried to modify mac80211_hwsim in order to provide more rates
> and it didn't work:
> Extended supported rates: 24.0 36.0 48.0 54.0 54.0 54.0 54.0
>
> The maximum supported rate is always 54Mbps.
>
> Then I found the Beacon frame TX rate configuration from hostapd.conf.
> After trying to enable the beacon rate (e.g. beacon_rate=ht:1) I got
> the following msg:
> ap1-wlan1: interface state UNINITIALIZED->HT_SCAN
> Using interface ap1-wlan1 with hwaddr 02:00:00:00:02:00 and ssid "ssid-ap1"
> nl80211: Driver does not support setting Beacon frame rate (HT)
>
> and hostapd doesn't work.
>
> Could this problem be related to mac80211_hwsim?
>
> Em qua, 21 de nov de 2018 às 10:09, Ramon Fontes
> <[email protected]> escreveu:
>> Yes. I thought that it could be related to the number of antennas (or
>> something else) after seeing this result
>> (https://bobcopeland.com/blog/2014/09/wmediumd-speed-test/) provided
>> by wmediumd.
>> Em qua, 21 de nov de 2018 às 09:48, Johannes Berg
>> <[email protected]> escreveu:
>>> On Wed, 2018-11-21 at 09:47 -0300, Ramon Fontes wrote:
>>>> Okay! Thanks a lot.
>>>>
>>>> Indeed, the maximum throughput when using only hwsim is in the order of Gbp/s.
>>> So I guess the question is where it's going wrong - is it the wmediumd
>>> overhead (netlink), some air simulation in wmediumd, etc.
>>>
>>> johannes
>>>

--
M.Sc. Benjamin Beichler

Universität Rostock, Fakultät für Informatik und Elektrotechnik
Institut für Angewandte Mikroelektronik und Datentechnik

University of Rostock, Department of CS and EE
Institute of Applied Microelectronics and CE

Richard-Wagner-Straße 31
18119 Rostock
Deutschland/Germany

phone: +49 (0) 381 498 - 7278
email: [email protected]
www: http://www.imd.uni-rostock.de/

2018-11-23 19:12:12

by Johannes Berg

[permalink] [raw]
Subject: Re: mac80211_hwsim: multiple antennas

On Thu, 2018-11-22 at 09:18 -0300, Ramon Fontes wrote:
>
> Then I found the Beacon frame TX rate configuration from hostapd.conf.

That's really not relevant for the issue at hand though?

johannes


2018-11-23 19:13:32

by Johannes Berg

[permalink] [raw]
Subject: Re: mac80211_hwsim: multiple antennas

On Wed, 2018-11-21 at 10:09 -0300, Ramon Fontes wrote:
> Yes. I thought that it could be related to the number of antennas (or
> something else) after seeing this result
> (https://bobcopeland.com/blog/2014/09/wmediumd-speed-test/) provided
> by wmediumd.

I guess you should instead look at the code referenced by Bob in the
next post?

https://bobcopeland.com/blog/2014/11/functional-bitrate-sim/

johannes


2018-11-23 21:08:07

by Bob Copeland

[permalink] [raw]
Subject: Re: mac80211_hwsim: multiple antennas

On Wed, Nov 21, 2018 at 01:30:40PM +0100, Johannes Berg wrote:
> On Wed, 2018-11-21 at 09:26 -0300, Ramon Fontes wrote:
> > Sorry. I meant throughput.
>
> Yeah, well. There's no actual medium (access) simulation in hwsim, so
> the actual throughput you get only depends on the performance of your
> CPU. 33Mbps seems quite low, but of course I don't know where you're
> running this.
>
> Then again, you say you're using wmediumd, so perhaps that *does* have
> some sort of medium simulation these days? I didn't think it has it but
> I may very well be wrong on that.

wmediumd does simulate the medium, but it only ever handled simple OFDM
PHY rates, not MCS or aggregation or anything else from the last decade :)

--
Bob Copeland %% https://bobcopeland.com/