From: Johannes Berg <johannes@sipsolutions.net>
To: igor_trindade@yahoo.com.br
Cc: Jouni Malinen <j@w1.fi>, Andrey Yurovsky <andrey@cozybit.com>,
Javier Cardona <javier@cozybit.com>,
linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: mac80211 user space
Date: Sun, 07 Dec 2008 14:57:40 +0100 [thread overview]
Message-ID: <1228658260.22164.41.camel@johannes.berg> (raw)
In-Reply-To: <456087.50493.qm@web59308.mail.re1.yahoo.com>
[-- Attachment #1: Type: text/plain, Size: 2846 bytes --]
[CC'ing more people for a wider discussion]
On Sat, 2008-12-06 at 07:26 -0800, Igor Trindade Oliveira wrote:
> i was seeing your description about mac80211 hwsim in kernelnewbies
> and i see something about mac80211 userspace API.
> you can explain your idea?
I think the userspace API idea is probably not a good idea as is, it
makes it very complicated to program things, I guess hwsim should be
extended instead.
One thing I was especially looking for is, instead of having "virtual
air" inside the kernel, have "virtual air" in userspace.
For example, consider this scenario with three mesh points:
MP1 ---- MP2 ---- MP3
where MP1 and MP3 cannot directly communicate because they are too far
apart, physically. It isn't possible to test such a scenario with hwsim
because hwsim has no concept of distance.
One easy solution to this would be to introduce "air groups", each just
a number. In mac80211_hwsim_tx_frame, we have:
list_for_each_entry(data2, &hwsim_radios, list) {
struct sk_buff *nskb;
if (data == data2)
continue;
if (!data2->started || !data2->radio_enabled ||
!hwsim_ps_rx_ok(data2, skb) ||
data->channel->center_freq != data2->channel->center_freq)
continue;
The easiest way to do "air groups" would be to add:
if (!(data->airgroups & data2->airgroups))
continue;
and have the "airgroups" value be a u32 (or u64?) which can be modified
in configfs and defaults to 1. That way, you can have up to 32 (64)
groups (each bit being a group) and the above picture would become:
virtual device: MP1 ---- MP2 ---- MP3
airgroups: 1 3 2
Does that make sense? Do you think it's flexible enough? Should we maybe
use a u64 so we have more flexibility? It should be fairly easy to do
this, I think.
Of course, this isn't as general as it could be. I suppose some testing
scenarios will require simulating packet loss and similar, so we'll want
to have userspace make the decision about which packets get to which
radios. For this, you'd want to have a radiotap interface per virtual
hardware, which shows all frames transmitted by this virtual hardware
and, when frames are sent into that interface, the frame is given to
mac80211.
That would be the most generic way, but since it's also a lot more
complex I think there still is value in having the "airgroups" above,
especially since if we implement this idea then we still need a way to
decouple the virtual radios from the "virtual air" that's implemented in
the kernel, which perfectly fits with setting all "airgroups" to zero
which makes the "virtual air" in the kernel that I quoted above do
nothing.
Thoughts?
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next parent reply other threads:[~2008-12-07 13:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <456087.50493.qm@web59308.mail.re1.yahoo.com>
2008-12-07 13:57 ` Johannes Berg [this message]
2008-12-08 18:17 ` mac80211 user space Javier Cardona
2008-12-08 19:52 ` Johannes Berg
2008-12-08 20:25 ` Javier Cardona
2008-12-08 20:32 ` Johannes Berg
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=1228658260.22164.41.camel@johannes.berg \
--to=johannes@sipsolutions.net \
--cc=andrey@cozybit.com \
--cc=igor_trindade@yahoo.com.br \
--cc=j@w1.fi \
--cc=javier@cozybit.com \
--cc=linux-wireless@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox