netsim: unclear how to use max-kbps
I tried using netsim max-kbps=
but was surprised that the property is not working. Turned out we have to set max-bucket-size
as well or the property is ignored.
It's really not that clear from the doc:
max-bucket-size : The size of the token bucket, related to burstiness resilience (-1 = unlimited)
flags: readable, writable
Integer. Range: -1 - 2147483647 Default: -1
max-kbps : The maximum number of kilobits to let through per second (-1 = unlimited)
flags: readable, writable
Integer. Range: -1 - 2147483647 Default: -1
/**
* GstNetSim:max-bucket-size:
*
* The size of the token bucket, related to burstiness resilience.
*
* Since: 1.14
*/
/**
* GstNetSim:max-kbps:
*
* The maximum number of kilobits to let through per second. Setting this
* property to a positive value enables network congestion simulation using
* a token bucket algorithm. Also see the "max-bucket-size" property,
*
* Since: 1.14
*/
We could raise a warning if max-kbps=
is set but not max-bucket-size
, and probably improve the documentation but I'm not even sure what max-bucket-size
actually control.