Attention is currently required from: laforge, pespin.
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/36889?usp=email )
Change subject: add hnb_persistent hashtable: optimize lookup by cell id ......................................................................
Patch Set 4:
(2 comments)
File include/osmocom/hnbgw/hnbgw.h:
https://gerrit.osmocom.org/c/osmo-hnbgw/+/36889/comment/1a6c8607_3dafe643 PS3, Line 463: DECLARE_HASHTABLE(hnb_persistent_by_id, 5);
is this 5 related to the one in mkhash_add()? if so, it may make sense to use a define, or some hash […]
no, this is just how many bits to use for the hash table. That mkhash stuff is to get to something that this here can handle (up to 64 bit input)
File src/osmo-hnbgw/hnbgw.c:
https://gerrit.osmocom.org/c/osmo-hnbgw/+/36889/comment/135863b6_01741fea PS4, Line 245: /* source: http://www.cse.yorku.ca/~oz/hash.html */ I am not very sure about whether this here is the right way. Maybe we need a generic arbitrary-buffer-to-hash function, or maybe there already is one that I don't know about?
Or maybe we can just feed the last 64 bit of the umts_cell_id to the hashtable's hash function?