[Bloat] emulating non-duplex media in linux qdiscs

Mikael Abrahamsson swmike at swm.pp.se
Tue Oct 10 03:02:41 EDT 2017


On Mon, 9 Oct 2017, Dave Taht wrote:

> Saying that is half duplex, doesn't work for me. In their example of 
> "half duplex", (using push to talk), it still means that everybody on 
> that channel hears who is talking. "half duplex" to me, given the 
> definition of duplex, means more that there is a *p2p* channel (a wire), 
> that you can ping pong data across.

A 10base-T hub connected to a 10base-2 or 10base-5 segment, all in the 
same broadcast domain, is considered to be "half duplex" in ethernet port 
configuration term.

So it doesn't have to be p2p. And I do think this mimics a shared radio as 
well (because a coax wire with multiple nodes on it seems very similar to 
a radio channel over the air).

Now, radio has the difference that two stations might not hear each other, 
and that's of course a problem in CSMA/CD terms.

Back to your netem problem. What you need is to force all packets through 
the same queue, right? So I tried to dream up a complicated scheme with 4 
bridges and some kind of "forced forwarding", but I don't think it'd pan 
out.

So the best way is probably to have a shaper that feeds 
transmit-tokens/does scheduling into two different shapers (rx/tx on the 
same interface). So whatever scheduling they are fed in order to tell them 
the rate they're allowed to transmit, they get it from the same source. 
That way they have to compete for the same resources.

This will not perfectly mimic the exponential backoff of CSMA/CD, but it 
might be good enough for what you need? Also, I just realised I have no 
idea how wifi is scheduled. Is it even close to CSMA/CD?

-- 
Mikael Abrahamsson    email: swmike at swm.pp.se



More information about the Bloat mailing list