Commit Graph

18 Commits

Author SHA1 Message Date
Pau Espin b69928cfaf pdch: rcv pkt meas rep: Allocate MS object early in path and use it
Let's create the MS object early if doesn't exist and fill in the
information, so that we can operate on it in an early way (for instance,
logging macros), this way it's easier to trace the lifecycle of
subscribers.

Change-Id: I3ec7eb970310698dd228ae6ad65ec5ca833bab3f
2020-08-24 07:50:49 +00:00
Pau Espin f2dad593ae Introduce log macro helper LOGPMS
Change-Id: Ib304ced06531a5154b7ec8bf87f9717dfd7d1397
2020-08-18 20:26:25 +02:00
Pau Espin a2c574ede1 Fix typo in log message
Change-Id: Ifd65542eca9180a2fcaaca290861396569e453ec
2020-08-17 18:15:46 +02:00
Vadim Yanitskiy d2e50e7f21 fix: properly include pure C headers from C++ code
Header files included from libosmocore may potentially contain
some language constructions allowed in C but not in C++, such
as type casting. Let's add 'extern "C" { ... }' and be safe.

Change-Id: I7197f7b34f30b49d5397506ce9d67cbf0e2cc196
2020-03-29 01:46:36 +07:00
Pau Espin 9d1cdb1f69 Move out tbf subclasses from tbf.h to their own headers
It's a good start towards clearing current mess between parent and the 2
children classes.

Change-Id: Ibc22ea2e02609af7ee058b8bc15df2115d4c6f60
2019-09-25 17:50:06 +02:00
Pau Espin 488aa29083 cosmetic: fix whitespace
Change-Id: I45bbe4d3c69d573aaff010d16f338c7ec3eaf08a
2019-09-25 17:50:06 +02:00
Harald Welte 099f4f2169 gprs_rlcmac_received_lost(): Fix regression / uninitialized now_tv
In Change-Id I7d22e7b5902c230efeae66eb20c17026a4037887 we
introduced the use of timespecsub(). Unfortuantely, we also
accidentially removed the call to osmo_clock_gettime() along
with it, leaving now_tv completely uninitialized.

Change-Id: Ieced0c62700b2fe4ab0208258183154cc701490b
Related: OS#3225
Fixes: Coverity CID#188872
2018-10-21 11:50:10 +02:00
Stefan Sperling 082443d2c7 change log level of "DL packet loss" log messages
The TBF tests are failing on some machines due to unexpected
log output: "DL packet loss of IMSI= / TLLI=0xffeeddcc: 0%"
These messages are printed if >= 1 second has passed between
loss reports. This timing is machine-dependent so the test
is unstable as a result. Only print these messages at log
level debug to (hopefully) make TBF tests pass consistently.
Update expected test output accordingly.

Change-Id: Ie43f0e3a8740f0fc132809a09a153886c51fadf9
2018-06-05 11:42:12 +02:00
Stefan Sperling 78ab624c2a fix time-delta calculations for measurement reports
The previous implementation unconditionally subtracted nanosecond
values from different time measurements, causing overflow if the
current measurement was taken in less of a fraction of a second
than the past measurement. Use timespecsub() instead, which
accounts for nanoseconds correctly.

Also, fix calculations of KBit/s throughtput. It was not being
calculated correctly, since it was actually accounting for one
KB per 128th-part-of-a-second.

Change-Id: I7d22e7b5902c230efeae66eb20c17026a4037887
Related: OS#3225
2018-05-31 14:12:58 +02:00
Stefan Sperling f0f7df1b87 read monotonic clock with clock_gettime() instead of gettimeofday()
There have been test failures on the osmo-pcu Jenkins builders due
to apparent clock drift. Switch relevant code from gettimeofday()
to clock_gettime() with CLOCK_MONOTONIC to prevent time from going
backwards and causing negative time deltas in calculations.

Change-Id: I775d85d0d3ac740330879e588bdab6fce7f0b46c
Related: OS#3225
2018-05-25 17:33:06 +00:00
Max 5a6bcfb797 cosmetic: convert explicit warnings to fixme/todo
We do not use this style (#warning as an issue tracker replacement) in
any other Osmocom project. Also those warnings clutter compiler output
making it harder to spot warnings for the actual code.

Change-Id: I72070e2a027e60e8b80c12ccfa23ff075434689f
2017-09-04 13:06:01 +00:00
sivasankari 5395073fff Add statistics in the ms and tbf level.
Adds DL throughput in show ms imsi <imsi_value>.
Adds the number of coding schemes counter and rlc nacked counter at TBf level.

Change-Id: Ia95b0404989b00db0e7ba416bc40d09ef41fde1c
2016-12-09 12:05:43 +00:00
Daniel Willmann 418a4230e0 tbf, gprs_rlcmac_meas: Move the DL bandwidth variables to the DL TBF
The bandwidth calculation as well as loss report is only done for DL TBF
so move everything related to that in there.

Ticket: SYS#389
Sponsored by: On-Waves ehf
2014-08-08 14:15:24 +02:00
Holger Hans Peter Freyther 937e2a6919 meas: Add a warning for flow control handling here 2013-11-19 17:01:49 +01:00
Holger Hans Peter Freyther 5464c9baf2 tbf: Have one imsi field and assign it through a function
Have one IMSI field per TBF and assign through a function call.
The IMSI should be used to look-up the TBF on the SGSN->PCU
direction.
2013-10-30 21:24:13 +01:00
Holger Hans Peter Freyther 474685e26e tbf: Make the tlli "private" and update the updating code
Now all updates to the tlli/tlli_valid are in one place. If we
implement the policy to update the matching/linked TBF we can
now to do it in a single place. Add a todo item for that as I
am waiting for feedback from the mailinglist.
2013-10-30 21:24:13 +01:00
Holger Hans Peter Freyther 099535a1a7 tbf: Move the struct to the tbf.h header file
This is the begin of a long march of turning tbf into a C++ class
and properly hiding the secrets inside this implementation instead
of having it spread across various different files.
2013-10-28 12:51:38 +04:00
Andreas Eversberg 050ace2fb4 Introduce new file for various measurements
The measurements include:
- DL bandwidth usage
- DL packet loss rate
- DL measurements by mobile
- UL measurements by BTS

In order to receive DL measurements from mobile, it must be enabled via
system information message at BSC.
2013-03-17 17:16:44 +01:00