From: "dpreed@deepplum.com" <dpreed@deepplum.com>
To: "Dave Taht" <dave.taht@gmail.com>
Cc: make-wifi-fast@lists.bufferbloat.net
Subject: Re: [Make-wifi-fast] emulating wifi better - coupling qdiscs in netem?
Date: Wed, 30 May 2018 18:57:53 -0400 (EDT) [thread overview]
Message-ID: <1527721073.171416827@apps.rackspace.com> (raw)
In-Reply-To: <CAA93jw7YcMP7tcx1SH1H1NtNKwxHksc4aSnB-qp7XxbtT9aJ1A@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 4245 bytes --]
I would toss netem rather than kludging around what appears to be a fundamental design choice made in ins conceptualization. Make a "netem2".
FreeBSD has a very nice framework for emulating far more general packet queuing/routing/... in the kernel, called NetGraph. It's incredibly general, and could straightforwardly, with high performance, have modules that do exactly the right emulations of network structures with such blocking, etc. and even random delays.
I know this because in my day job at TidalScale, we heavily use NetGraph to implement new very low level protocols, which is pretty straightforward, even including complex multi-adapter adaptive forwarding of our private protocols on 10 and 40 GigE links. Super flexible, entirely in the kernel, running either at real-time priority or not, in a mix.
In contrast, the Linux TC framework seems very inflexible, as you've found, in trying to push it to do what it is not designed to do.
So tossing netem might be far better. I wonder if NetGraph has ever been ported into some Linux kernel environment...
-----Original Message-----
From: "Dave Taht" <dave.taht@gmail.com>
Sent: Wednesday, May 30, 2018 1:28pm
To: make-wifi-fast@lists.bufferbloat.net
Subject: [Make-wifi-fast] emulating wifi better - coupling qdiscs in netem?
The match to reality of my "wifi slotting" code for netem was so
disappointing that I was extremely reluctant to push support for it up
to mainline iproute2.
I've now spent months failing to come up with something that
could emulate in linux the non-duplex behavior and arbitration steps
that wifi goes through in order to find a new station to transmit to,
or receive from, using netem as a base.
Getting that non-duplex behavior right is the *single most important
thing*, I think, for trying to emulate real wireless behaviors in
real time that I can think of (and to thus be able to run and improve
various e2e transports against it).
A potential tc API seems simple:
tc qdisc add dev veth1 root netem coupled # master (AP)
tc qdisc add dev veth2 root netem couple veth1 # client
tc qdisc add dev veth3 root netme couple veth2 # client
Something more complicated would be to create some sort of
arbitration device and attach that to the qdiscs. (which would make
it more possible to write arbitration devices to emulate lte, gpon,
cable, wireless mesh and other non-duplex behaviors in real time)
But how to convince qdiscs to be arbitrated, only allowing one in a
set to transmit at the same time? (and worse, in the long run,
allowing MU-MIMO-like behaviors).
I'm tempted to *not* put my failed thinking down here in the hope that
someone says, out there, "oh, that's easy, just create this structure
with X API call and use Y function and you're clear of all the
potential deadlock and RCU issues, and we've been doing that for
years, you idiot! Here's the code for how we do it, sorry we didn't
submit it earlier."
What I thought (*and still think*) is of creating a superset of the
qdisc_watchdog_schedule_ns() function is a start at it:
tag = qdisc_watchdog_create_arb("some identifier");
qdisc_watchdog_schedule_arb(nsec, tag); /* null tag = schedule_ns */
which doesn't allow that qdisc instance to be run until the arbitrator
says it can run (essentially overriding the timeout specified)
But I actually wouldn't mind something that worked at the veth, or
device, rather than qdisc level...
thoughts?
PS I just spent several days working on another aspect of the problem,
which is replaying delay distributions (caused by interference and
such)... and that, sigh, to me, also belongs in some sort of
arbitration device rather than directly in netem. Maybe tossing netem
entirely is the answer. I don't know.
--
Dave Täht
CEO, TekLibre, LLC
http://www.teklibre.com
Tel: 1-669-226-2619
_______________________________________________
Make-wifi-fast mailing list
Make-wifi-fast@lists.bufferbloat.net
https://lists.bufferbloat.net/listinfo/make-wifi-fast
--
Reed Online Ltd is a company registered in England and Wales. Company
Registration Number: 6317279.Registered Office: Academy Court, 94 Chancery
Lane, London WC2A 1DT.
[-- Attachment #2: Type: text/html, Size: 5690 bytes --]
next prev parent reply other threads:[~2018-05-30 22:57 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-30 17:28 Dave Taht
2018-05-30 18:32 ` Bob McMahon
2018-05-30 18:54 ` Dave Taht
2018-05-30 18:58 ` Jonathan Morton
2018-05-30 19:19 ` Bob McMahon
2018-05-30 23:26 ` Dave Taht
2018-05-30 22:57 ` dpreed [this message]
2018-06-15 22:30 ` Dave Taht
2018-06-16 22:53 ` Pete Heist
2018-06-17 11:19 ` Jesper Dangaard Brouer
2018-06-17 15:16 ` Pete Heist
2018-06-17 16:09 ` Dave Taht
2018-06-17 18:38 ` Pete Heist
2018-06-17 18:47 ` Jonathan Morton
2018-06-18 9:24 ` Pete Heist
2018-06-18 16:08 ` Eric Dumazet
2018-06-18 19:33 ` Pete Heist
2018-06-18 19:44 ` Dave Taht
2018-06-18 21:54 ` Pete Heist
2018-06-18 22:27 ` Eric Dumazet
2018-06-17 20:42 ` Dave Taht
2018-06-18 1:02 ` Eric Dumazet
2018-06-18 0:59 ` Eric Dumazet
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
List information: https://lists.bufferbloat.net/postorius/lists/make-wifi-fast.lists.bufferbloat.net/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1527721073.171416827@apps.rackspace.com \
--to=dpreed@deepplum.com \
--cc=dave.taht@gmail.com \
--cc=make-wifi-fast@lists.bufferbloat.net \
/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