Attention is currently required from: laforge, neels.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/36385?usp=email )
Change subject: per-HNB GTP-U traffic counters via nft ......................................................................
Patch Set 17:
(2 comments)
Patchset:
PS3: Several pointers below:
- I think that definetly we want to merge all this done in a separate thread from first step. I don't think it even makes sense to have it separated in a first step where everything happens in the same thread, since it's broken and distracts the whole thing.
We don't have multi-threaded rate counters so far anywhere.
- We do, in osmo-trx. In there since it's heavily multithreaded we do things a bit adhoc with separate structures and then copying them.
The other idea that does not need libosmocore changes is this: have a separate "volatile" counter storage in the hnb_persistent struct; in the nft thread, do all parsing and all hnb lookups, and place parsed counters in that separate counter storage per hnbp. inter-thread signal (it_q is nice because it integrates in the select()) to tell the main thread to shovel all hnb volatile counters into the rate_ctr; those volatile counters need a mutex (one global one, or maybe one per hnb).
That's similar to how osmo-trx does it, and I think it's how it should be done. All other ways imho are calling for inconsistencies and stuff ending up broken.
So my opinion is: I'm waiting to see a patch like the above described which I can review.
Patchset:
PS17: ree