2013-12-05 15:57:29

by Dani Camps

[permalink] [raw]
Subject: Using wmediumd in kernel 3.10



Dear all,

I would like to use wmediumd with linuxwireless backports 3.10.

The problem is that as indicated in this post:?http://www.spinics.net/lists/linux-wireless/msg96575.html, wmediumd is not supported in this kernel. Quoting from the post:

"To use mac80211_hwsim for testing channel contexts it has to support them, and for that it has to support hw scan and hw-remain-on-channel.
Since it's pure software, the off-channel activities are really not off-channel but listening and sending on a second channel. Also, the multi-channel isn't really doing TDM, it's just on both channels at the same time.?
Note that this breaks wmediumd right now as it doesn't?propagate the channel."


In particular, wmediumd crashes whenever the first packet between the two mac80211_hwsim radios is sent. Specifically the place in mac80211_hwsim.c where the error occurs is in this call inside the function?hwsim_tx_info_frame_received_nl():

mac80211_hwsim_monitor_ack(txi->rate_driver_data[0], hdr->addr2);

In mac80211_hwsim_monitor_ack() a crash occurs whenever accessing a field of txi->rate_driver_data[0], which is of type struct ieee80211_channel.

So, I would like to ask for support in any of the following:

1- Guidance on how to fix wmediumd for kernel 3.10.
2- Advise on another tool with functionality equivalent to that of wmediumd, i.e. introducing delay and drop probability to packets exchanged between mac80211_hwsim radios, and that works with kernel 3.10.

Best Regards

Daniel


2013-12-05 16:42:20

by Dani Camps

[permalink] [raw]
Subject: Re: Using wmediumd in kernel 3.10



Hi Johannes,

I attach the script that I am using to load mac80211_hwsim. What you need to do is:

1) Execute the script to load two mesh interfaces mesh0 and mesh1.
2) Load wmediumd (the version in GitHub:?https://github.com/cozybit/wmediumd), and use as config file the file that I am attaching.
3) Ping from mesh0 to mesh1: ping -I mesh0 192.168.77.11

You will see in syslog a kernel crash, followed by mac80211_hwsim deregistering the netlink socket. Then the ping proceeds normally because wmediumd is dettached.

Thanks for your help!

Cheers

Daniel






El Jueves 5 de diciembre de 2013 17:25, Johannes Berg <[email protected]> escribi?:
On Thu, 2013-12-05 at 16:14 +0000, Dani Camps wrote:

> I am only loading mac80211_hwsim with the parameter "radios=2". I am
> not specifying anything about "channels", which looking at the code
> should be 1.

Ok. What's the easiest way to reproduce this? Do I need
hostapd/wpa_supplicant and wmediumd, or something else?


johannes


Attachments:
script.sh.txt (1.83 kB)
wmediumd_config_file.txt (785.00 B)
Download all attachments

2013-12-05 21:43:33

by Dani Camps

[permalink] [raw]
Subject: Re: Using wmediumd in kernel 3.10

Hi,

I tried with kernel 3.12 but I still get the same error. Just to clarify, if wmediumd would work properly you should see in the ping approximately half of the packets being dropped, because the configuration file has 0.5 drop probability for all rates. If you see that the ping proceeds normally is because the error happened and wmediumd de-registered.

I attach the error I see in syslog.

Best Regards


Daniel





El Jueves 5 de diciembre de 2013 18:40, Johannes Berg <[email protected]> escribi?:
On Thu, 2013-12-05 at 16:42 +0000, Dani Camps wrote:
> ping -I mesh0 192.168.77.11

Works fine for me. Maybe you should try a later backports version, e.g.
3.12? I don't remember fixing anything, but I don't see any issues
either.


johannes


Attachments:
var_log_syslog.txt (5.11 kB)

2013-12-06 08:27:37

by Dani Camps

[permalink] [raw]
Subject: Re: Using wmediumd in kernel 3.10

Hi,

You are right, since we have retransmissions at layer 2 with a 0.5 drop probability the pings still go through, but with high delay variations.

Anyway, I tested the patch posted by Javier Lopez, and it is now working for me.

Cheers

Daniel



El Jueves 5 de diciembre de 2013 23:07, Johannes Berg <[email protected]> escribi?:
On Thu, 2013-12-05 at 21:37 +0000, Dani Camps wrote:
> Hi,
>
> I tried with kernel 3.12 but I still get the same error. Just to
> clarify, if wmediumd would work properly you should see in the ping
> approximately half of the packets being dropped, because the
> configuration file has 0.5 drop probability for all rates. If you see
> that the ping proceeds normally is because the error happened and
> wmediumd de-registered.

Not sure I saw packet loss, but I made wmediumd print out statistics and
it was definitely seeing packets ...


johannes

2013-12-05 22:07:38

by Johannes Berg

[permalink] [raw]
Subject: Re: Using wmediumd in kernel 3.10

On Thu, 2013-12-05 at 21:37 +0000, Dani Camps wrote:
> Hi,
>
> I tried with kernel 3.12 but I still get the same error. Just to
> clarify, if wmediumd would work properly you should see in the ping
> approximately half of the packets being dropped, because the
> configuration file has 0.5 drop probability for all rates. If you see
> that the ping proceeds normally is because the error happened and
> wmediumd de-registered.

Not sure I saw packet loss, but I made wmediumd print out statistics and
it was definitely seeing packets ...

johannes


2013-12-05 17:40:33

by Johannes Berg

[permalink] [raw]
Subject: Re: Using wmediumd in kernel 3.10

On Thu, 2013-12-05 at 16:42 +0000, Dani Camps wrote:
> ping -I mesh0 192.168.77.11

Works fine for me. Maybe you should try a later backports version, e.g.
3.12? I don't remember fixing anything, but I don't see any issues
either.

johannes


2013-12-05 16:20:05

by Dani Camps

[permalink] [raw]
Subject: Re: Using wmediumd in kernel 3.10



Hi,

I am only loading mac80211_hwsim with the parameter "radios=2". I am not specifying anything about "channels", which looking at the code should be 1.

Cheers

Daniel



El Jueves 5 de diciembre de 2013 17:11, Johannes Berg <[email protected]> escribi?:


> I would like to use wmediumd with linuxwireless backports 3.10.
>
> The problem is that as indicated in this
> post: http://www.spinics.net/lists/linux-wireless/msg96575.html,
> wmediumd is not supported in this kernel. Quoting from the post:
>
> "To use mac80211_hwsim for testing channel contexts it has to support
> them, and for that it has to support hw scan and hw-remain-on-channel.
> Since it's pure software, the off-channel activities are really not
> off-channel but listening and sending on a second channel. Also, the
> multi-channel isn't really doing TDM, it's just on both channels at
> the same time.
> Note that this breaks wmediumd right now as it doesn't propagate the
> channel."

This should only affect hwsim if you load it with channels=2 or more,
are you doing that?

johannes

2013-12-05 16:25:50

by Johannes Berg

[permalink] [raw]
Subject: Re: Using wmediumd in kernel 3.10

On Thu, 2013-12-05 at 16:14 +0000, Dani Camps wrote:

> I am only loading mac80211_hwsim with the parameter "radios=2". I am
> not specifying anything about "channels", which looking at the code
> should be 1.

Ok. What's the easiest way to reproduce this? Do I need
hostapd/wpa_supplicant and wmediumd, or something else?

johannes


2013-12-05 16:11:18

by Johannes Berg

[permalink] [raw]
Subject: Re: Using wmediumd in kernel 3.10


> I would like to use wmediumd with linuxwireless backports 3.10.
>
> The problem is that as indicated in this
> post: http://www.spinics.net/lists/linux-wireless/msg96575.html,
> wmediumd is not supported in this kernel. Quoting from the post:
>
> "To use mac80211_hwsim for testing channel contexts it has to support
> them, and for that it has to support hw scan and hw-remain-on-channel.
> Since it's pure software, the off-channel activities are really not
> off-channel but listening and sending on a second channel. Also, the
> multi-channel isn't really doing TDM, it's just on both channels at
> the same time.
> Note that this breaks wmediumd right now as it doesn't propagate the
> channel."

This should only affect hwsim if you load it with channels=2 or more,
are you doing that?

johannes