Is anybody using ng_pipe?
Rodney W. Grimes
freebsd-rwg at gndrsh.dnsmgr.net
Tue Aug 18 17:47:46 UTC 2020
> I recently needed to be able to simulate a lossy, high-latency network
> in an environment where dummynet wasn't possible. I gave ng_pipe a
> try, and hit some major issues
>
> 1. Instead of configuring a packet drop rate, you configure a bit
> error rate, which I found significantly less intuitive
>From your background being packet network centric perhaps?
Those of us who have line oriented, aka telecom, centric backgrounds
BER is a very meaningful and useful metric.
> 2. The use of BER makes for a very inconvenient implementation, as
> ng_pipe has to maintain a table of packet drop rates for every
> possible packet size
Hum, that sounds like a poor implementation indeed. It seems
like it would be easy to convert a BER into a packet drop
probability based on bytes that have passed through the pipe.
It should be easy to covert a BER into a packet drop rate, but
doing the converse leads to quantization errors. I would rather
see us keep the BER as the metric and fix what is broken rather
than convert this to a packet drop rate..
> 3. The table implementation isn't sized right for LRO or TSO, leading
> to ng_pipe going out of bounds of the array and panicking the system
Code predates LRO and TSO, so not unexpected.
> 4. The table calculation had two integer truncation bugs and used the
> wrong formula. I'm reasonably sure it would never calculate a
> probability other than 0 due a 64-bit constant being truncated to
> 32-bits.
You retracted this.
> I'd like to dump all of this and just implement a packet loss rate,
> which would simplify all this immensely. Is anybody using ng_pipe
> with a non-zero BER who would object to this? Given this litany of
> issues I doubt it, but I thought that I'd be sure.
My gut instinc is that statistically BER leads to a more realistic model.
--
Rod Grimes rgrimes at freebsd.org
More information about the freebsd-net
mailing list