[libvirt PATCH 0/2] nwfilter: switch nwfilter list from array to hash

Daniel P. Berrangé berrange at redhat.com
Thu Mar 10 10:10:02 UTC 2022


Currently the virNWFilterObjList has O(N) complexity for
object lookup and requires taking locks on every object
examined.

This switches to as hash table which O(1) complexity and
lockless lookup.

Daniel P. Berrangé (2):
  nwfilter: update comment about locking filter updates
  conf: use a hash table for storing nwfilter object list

 src/conf/virnwfilterobj.c              | 264 +++++++++++++++++--------
 src/nwfilter/nwfilter_gentech_driver.c |  51 +++--
 2 files changed, 217 insertions(+), 98 deletions(-)

-- 
2.35.1



More information about the libvir-list mailing list