]> git.ipfire.org Git - thirdparty/libvirt.git/commit
network: Use self inflating bitmap for class IDs
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 16 Aug 2017 10:55:03 +0000 (12:55 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 17 Aug 2017 12:58:11 +0000 (14:58 +0200)
commit361ff0a0881757efeb53d97659006899346948ba
tree35ae34d85541a37cf64ee1fa1471682732c041fe
parent6862ad3cd798219d2c48f06165f020de6984c616
network: Use self inflating bitmap for class IDs

Back in the day when I was implementing QoS for networks there
were no self inflating virBitmaps. Only the static ones.
Therefore, I had to allocate the whole 8KB of memory in order to
keep track of used/unused class IDs. This is rather wasteful
because nobody is ever gonna use that much classes (kernel
overhead would drastically lower the bandwidth). Anyway, now that
we have self inflating bitmaps we can start small and allocate
more if there's need for it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
src/conf/virnetworkobj.c
src/network/bridge_driver.c