gbproxy: convert bss_nses from llist_head to hashtable
For the common lookup-by-nsei, this should reduce the computational
complexity significantly.
Depends: libosmocore.git I8ef73a62fe9846ce45058eb21cf999dd3eed5741
Change-Id: Idbb6a362332bb6e3ce22102e7409ae80d0980f44
diff --git a/include/osmocom/sgsn/gb_proxy.h b/include/osmocom/sgsn/gb_proxy.h
index 27b47cf..b0ab83d 100644
--- a/include/osmocom/sgsn/gb_proxy.h
+++ b/include/osmocom/sgsn/gb_proxy.h
@@ -4,6 +4,7 @@
#include <osmocom/core/msgb.h>
#include <osmocom/core/timer.h>
+#include <osmocom/core/hashtable.h>
#include <osmocom/gsm/gsm23003.h>
#include <osmocom/gprs/gprs_ns2.h>
@@ -102,7 +103,7 @@
struct gprs_ns2_inst *nsi;
/* Linked list of all BSS side Gb peers */
- struct llist_head bss_nses;
+ DECLARE_HASHTABLE(bss_nses, 8);
/* Counter */
struct rate_ctr_group *ctrg;
@@ -176,7 +177,7 @@
/* one NS Entity that we interact with (BSS/PCU) */
struct gbproxy_nse {
/* linked to gbproxy_config.bss_nses */
- struct llist_head list;
+ struct hlist_node list;
/* point back to the config */
struct gbproxy_config *cfg;