diff options
author | Harald Welte <laforge@osmocom.org> | 2020-12-05 00:31:07 +0100 |
---|---|---|
committer | Harald Welte <laforge@osmocom.org> | 2020-12-05 13:49:37 +0100 |
commit | 78db244b42be1e2bf9726cb2d80150876c70dedc (patch) | |
tree | bd726b8a33fdf6d2249492774c1e0c24d4815888 /include | |
parent | 0e1b791c818181f5b95aa55d71d6b2469fb95475 (diff) |
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
Diffstat (limited to 'include')
-rw-r--r-- | include/osmocom/sgsn/gb_proxy.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/osmocom/sgsn/gb_proxy.h b/include/osmocom/sgsn/gb_proxy.h index 27b47cf8e..b0ab83d7c 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 gbproxy_config { 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 @@ struct gbproxy_bvc { /* 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; |