neels uploaded patch set #3 to this change.

View Change

scale: tunmap: faster lookup of used nft chain_id

To ensure that an nft chain id for the tunmap nft ruleset is not used,
we so far iterate *all* sessions of *all* peers for every new tunmap
being set up, twice.

Instead, record all up_nft_tun in a hash table. This allows much faster
lookup whether a given chain_id is already in use.

chain_id_test.c shows that the lookup works and functional behavior
remains identical.

Scoping: an nft chain_id must be unique within the nft table. So no
matter which local GTP IP address it belongs to, a chain_id must be
unique within the entire osmo-upf process.

Related: OS#5900
Change-Id: I36a75ec4698cd83558185c1f202400eb53ae8ff6
---
M include/osmocom/upf/upf.h
M include/osmocom/upf/upf_nft.h
M src/osmo-upf/upf.c
M src/osmo-upf/upf_nft.c
4 files changed, 84 insertions(+), 33 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-upf refs/changes/84/31484/3

To view, visit change 31484. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: osmo-upf
Gerrit-Branch: master
Gerrit-Change-Id: I36a75ec4698cd83558185c1f202400eb53ae8ff6
Gerrit-Change-Number: 31484
Gerrit-PatchSet: 3
Gerrit-Owner: neels <nhofmeyr@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge@osmocom.org>
Gerrit-MessageType: newpatchset