Age | Commit message (Collapse) | Author | Files | Lines |
|
The FR code is using force unconfigured to change the state of the NSVC
when the FR link goes down. The force unconfigured state didn't
notified the NSE when changing into this state.
Related: SYS#5533
Change-Id: I4d7bbbbce26f7cde99eebe96995c50b1e812e5bd
|
|
If the NSVCI is valid, there is no signalling or data weight defined (internally this is 1).
For NSVC with NSVCI don't print the signalling or data weight.
For NSVC without NSVCI, don't print NSVCI at all.
Related: OS#5180
Change-Id: Iaadc806a9136436468e2b02eb0bc1f4570a10ecc
|
|
gprs_ns2_free_bind() takes care of all required steps to clean up a bind.
The driver->free_bind() operation only cleans up the driver internal state
but not NSVCs and other generic things.
Fixes a crash when free'ing a bind from the vty which has active NSVCs.
Related: OS#5195
Change-Id: I0a2ad22905bcacb929b9b5f5b034af0da3081826
|
|
When the MTU changes for any fr device, all
NSE will recalculate their MTU. If any NSE is alive,
libosmocore will crash.
Related: OS#5192
Change-Id: I31ba5cefea7bbb0b74060d6664b42c58815ee2a1
|
|
The NSE wasn't notified when a NSVC went into the BLOCKED state from
an UNBLOCKED state.
Related: OS#5182
Change-Id: I09634e414e9bb966e6b5809b7de1b59fbabd413d
|
|
When configuring multiple NSE/BINDs the order of the configuration
should be keeped.
Related: OS#5181
Change-Id: Ibbc03f0780b49543b5bd97ee059f11cfd6c2a126
|
|
This commit fixes crash when response is more than ~4096 chars.
Furthermore, we now allocate only the required memory, not 4096 for all
messages, which usually don't require it.
Test needs to be adapted since it assumed there was more available space
at the end of the msgb.
Related: OS#5169
Change-Id: I0b8f370f7b08736207f9efed13a0663b5e482824
|
|
Generated with spatch:
"""
@@
expression E1, E2;
@@
- &E2->ctr[E1]
+ rate_ctr_group_get_ctr(E2, E1)
"""
"""
@@
expression E1, E2, E3;
@@
- E2->items[E1]
+ osmo_stat_item_group_get_item(E2, E1)
"""
Change-Id: I41297a8df68e28dfc6016330ac82b0ed5dd0ebc1
|
|
Change-Id: Ifdfa086ce1c8d62b256abb3454b70cf53da9dcdb
|
|
The library specific sub-systems are kind of special, because their
position in the 'osmo_log_info' may vary depending on the number of
application specific sub-systems. This is why their associated
constant values (like DLGLOBAL) are negative, and this is what
the LOGP() macro expects as the first argument.
Before this change, invoking 'logp' command with any library
specific logging sub-system would result in getting messages
printed with the fall-back DLGLOBAL sub-systems.
Change-Id: If86563e169fe1243adfa7b09c9d65d9f88c8a99e
|
|
Related: SYS#4877
Change-Id: I5140d967c2f1d36dadf93b03e52b9bbd42e2a3a6
|
|
This is a partial revert of b27b352e ("stats: Use a global index for
stat item values"). Now that osmo_stat_item_get_next correctly returns
how many values have been skipped, we can use the accurate asserts on
its return value again.
Fix the initial values of next_id_a,b (1 instead of 0), so we don't get
a skipped value on the first read. This is needed, because b27b352e
refactored osmo_stat_item_get_next to have the next id as parameter
instead of the last read one, and the initial value was not adjusted in
the tests.
Related: OS#5088
Change-Id: I9d4cda2487a62f52361c24058363dfa90e502c63
|
|
Fix counting of values missed because of FIFO overflow in
osmo_stat_item_get_next(), by assigning a new item value id effectively
as item->value[n + 1].id = item->value[n].id + 1, instead of increasing
a global_value_id that is shared between all items and groups. With
global_value_id, the count of values missed was wrong for one item, as
soon as a new value was added to another item.
This partially reverts b27b352e ("stats: Use a global index for stat
item values") from 2015, right after stats was added to libosmocore. It
was supposed to make multiple readers (reporters) possible, which could
read independently from stat_item (and later added comments explain it
like that). But this remained unused, stats has implemented multiple
reporters by reading all stat_items once and sending the same data to
all enabled reporters. The patch caused last_value_index in struct
osmo_stat_item to always remain at -1.
Replace this unused last_value_index with stats_next_id, so stats can
store the item-specific next_id in the struct again. It appears that
stats is the only direct user of osmo_stat_item, but if there are
others, they can bring their own item-specific next_id: functions in
stat_item.c still accept a next_id argument.
Related: OS#5088
Change-Id: Ie65dcdf52c8fc3d916e20d7f0455f6223be6b64f
|
|
Change-Id: I2b2bab61e46668c3b4b0ccad88d02b6d00a83544
|
|
Let osmo_stat_item_get_next, osmo_stat_item_discard,
osmo_stat_item_discard_all consistently refer to their next_id arg as
such (and not idx or next_idx). It refers to an ID (item->values[i].id),
not an index (item->values[i]), and it is always the next one, never the
current one.
Do the same change for _index/_idx variables in stats.c, which are used
as arguments to these functions. Replace rd_ with next_id_ in
stats_test.c, too.
Related: OS#5088
Change-Id: I5dd566b08dff7174d1790f49abd2d6ac020e120e
|
|
Change-Id: Ia3579ec5599f5f5c58eebab03f1ed9e17f171177
|
|
As both `show ns entities` and `show ns binds` looking similiar
correct the indention.
Change-Id: I55794188bec7e62f0341188dbf23ac04006974fe
|
|
`show ns binds` prints a count of NSVCs. Add the same line
to `show ns entities`.
Change-Id: I15c58a1c0fe94dda728afb29e7e5ca41e3fa8966
|
|
The binds also print a list of associated NSVC when
dumping the bind.
However the binds using their own representation of
printing the NSVC which is different to `show ns entities`.
Use the same function to print NS-VC.
Before:
NSVCI 00000: udp)[127.0.0.1]:23000<>[127.0.0.1]:22000
After:
NSVCI none: UNCONFIGURED DYNAMIC data_weight=1 sig_weight=1 udp)[127.0.0.1]:23000<>[127.0.0.1]:22000
Change-Id: If31ec6c1c07dc134ab1ddeb915bc89747c7be048
|
|
Introduce 2 new logging sub systems for signal and unit data.
Unify log messages so all log messages look similiar.
Log also Rx PDUs. Ensure dropped Tx packets (BLOCK/RESET on SNS)
contain *Tx*.
Change-Id: I34b8fde2955ecc010d1dcd9512e1bba9211e2c0d
|
|
Change-Id: I694fa6c80d04d13cb1afaae93a9ae43b6dfd2207
Related: OS#3373
|
|
This reverts commit d290439b4afe928e7e341540cb92f1abf36a82cb, which
caused "stats values skipped" messages to appear even if they were not
skipped. Revert for now, replace with a proper version in the future.
Related: SYS#4877
Change-Id: Ib43bd53188a4d31d771feb921ea14abe1a3ec877
|
|
Every other function returns a pointer to the first byte after the tlv
that was just written.
tl16v seems to be a copy and paste error from tlv16 above and t16lv seems
to count the 16-bit tag twice.
The new tests verify that the return value of *_put(buf, tag, len, val)
points to buf + *_GROSS_LEN(len).
Change-Id: I268a7e11fb5dce67ce1bd7974ab86c4d2bd002f7
|
|
Let the user know when the stats were not consumed fast enough for the
given FIFO length.
Related: SYS#4877
Change-Id: If0e8ab55103007693101538fb6ea310075217774
|
|
Move test output from stdout to stderr and enable logging to stderr.
This is in preparation for the next patch, which will add a new log
message when osmo_stat_item_get_next() skips a value.
Related: SYS#4877
Change-Id: Ie0eaec2f93ac6859397a6bfca45039fdcc27cb9e
|
|
We should never report multiple values for a metric. It is confusing for
the log reporter and wrong for statsd. Statsd will record only one value,
but will it be the first, last, ...?
This can happen if an osmo_stat_item changes more than once within the
same reporting interval.
With this patch only one aggregate value is sent to the log reporters.
The value reported is the maximum during this interval. Other
aggregations could be possible (min, last), but reporting a (useful)
average is not because the values don't include a timestamp and most
osmo_stat_items change at unregular intervals.
Change-Id: I366ab1c66f4ae6363111ea4e41b66b7d5bcade9c
Related: SYS#4877
|
|
Seen building on RPI4 32 bits raspbian:
error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘size_t’ {aka ‘unsigned int’} [-Werror=format=]
Change-Id: I62199bfc7f3a78403334f5580f31fa5743223c9b
|
|
Let's use log_set_print_filename2() API instead, which has less ackward
behavior implications like changing the print status of category-hex.
Related: OS#5034
Change-Id: Ifc78e1dcba5baf0b41f6ccbbbd1e3f06552d73da
|
|
This will alow easily changing default values for print_category vs
print_category_hex later.
In any case, every test relying on logging output validation should
always explicitly state the config to avoid issues in the future if
default values change.
Related: OS#5034
Change-Id: If29b40557d5c2bcda04b964f344070bad58d8f28
|
|
Related: OS#5032
Change-Id: I38fc93ab0182b4edbd639c7ed0f31ce51964ee18
|
|
Change-Id: I58a95817e2730bbbaa851a43a5b072d1de2db037
|
|
Implement the load sharing based on modulo of the LSP. As long the gprs_ns2 doesn't
support the resource distribution function (48.016 § 4.4a) this simple
approach is good enought.
Fixes: OS#4836
Change-Id: I8c2fe5d647694886ac600470fca6ea5d5d210a85
|
|
A static configured UDP NSVC can have signalling and data weights
Related: SYS#5354
Change-Id: Id363937c64e786c55e3136401ebdb44052415e0f
|
|
Introduce a `ip-sns-bind BINDID` vty command within a `nse` vty object.
The ip-sns-bind defines the binds which will be used by the dynamic
configuration with IP-SNS.
This is only the first part which only uses the binds when doing a
new SNS configuration.
The outgoing add procedure will be supported in a later patch
when the SNS fsm supports outgoing procedures.
This is a behaviour change of the API and must be synchronized with
the osmo-pcu. Otherwise SNS won't work with osmo-pcu.
Related: SYS#5354
Change-Id: I9ab8092bf286e7d90e92f5702a5404425e959c84
|
|
Related: SYS#5358
Change-Id: I74fb0a3afc1ac4aadbfc609b882d929401f790eb
|
|
The BSSGP layer needs to know the MTU of the NS UNIDATA payload.
The MTU can be 0 if the NSE doesn't contain any NSVC.
Every status indication will contain the mtu value.
The MTU in the status indication contains the maximum transfer
unit of a BSSGP message. From NS side the maximum SDU.
Related: OS#4889
Change-Id: I5016b295db6185ec131d83089cf6c806e34ef1b6
|
|
CGI-PS type doesn't exist in GSM 08.08 Cell Id lists. That type of cell
id is osmocom-specific and used internally. In here CGI-PS is
automatically converted to CGI (since the later is an extension of this
one).
The encode/decode_cell_id_u are left intact (comment added) since those
can still be used (and are used by RIM code) to encode/decode TS 48.018
Cell Identifiers.
Related: SYS#4909
Change-Id: Id74f4577c397c1ba696f00395858311bd82cb2c8
|
|
Change-Id: I7f48e292fefe555939129f4000303e630a12cc50
|
|
write config will not print out any configuration for bind/nse unless we
configure some. This way we can catch more issues with incompatible
configs such as https://gerrit.osmocom.org/c/libosmocore/+/22878
Change-Id: Iad422ee013c82a6cb96af8ce4eb3af8b0936a4c9
Related: OS#4887
|
|
Allow to assign a signalling and data weight to UDP binds.
Those weights will be used when doing dynamic configuration over
IP-SNS.
This is only the first part which only uses the assigned weights
when doing a new SNS configuration.
The outgoing change weight procedure will be supported in a later patch
when the SNS fsm supports outgoing procedures.
Related: SYS#5354
Change-Id: I5133e4229377d44772a9af28628a2bc420fea34b
|
|
Using 'uint8_t' for the length argument is definitely a bad idea.
Because of this, packing more than 255 septets would not work as
expected. Deprecate the old function and use 'size_t' instead.
Change-Id: Ib1aac538afeb0a5c76a1df472d555139a496e12e
|
|
As can be seen, this unit test reveals problems with encoding
of more than 250 septets using gsm_7bit_encode_n(). The problem
is that some API functions use type 'uint8_t' for the length, so
we basically suffer from integer overflows.
Change-Id: I723300578d5ab0c7b94cf49c14d962b2dbf47740
|
|
Avoid code duplication between three different drivers by sharing
the "core" of the bind initialization in a new, shared ns2_bind_alloc().
Change-Id: I535fc68e94fcd695de827dd922706adc1c5a2cb7
|
|
All public enum should have the prefix GPRS_NS2_.
API change which must be synchronized with osmo-pcu,
osmo-gbproxy, osmo-sgsn.
Change-Id: I548ff12f7277cbb7e1a630a3dc02b738ce89be72
|
|
All functions which are exposed by gprs_ns2_internal.h should not contain
the public prefix gprs_. Internal function should only contain ns2_ prefix.
Change-Id: Icecc5a918902cd10efac72bbac20780d39aab272
|
|
test sending unitdata over a alive and blocked NSVC.
Change-Id: I2c44b711d004d2ca08e05d4f54519ad8dbd77c27
|
|
Prepare to set -std=gnu89 in a future commit, which will cause gcc warn
about "control reaches end of non-void function" in main().
Change-Id: I7c33cac30e5859060f083813d8433011f5eaf0d0
|
|
[ 352s] gb/gprs_ns2_test.c: In function 'test_block_unblock_nsvc':
[ 352s] gb/gprs_ns2_test.c:200:2: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
[ 352s] for (int i=0; i<2; i++) {
[ 352s] ^
[ 352s] gb/gprs_ns2_test.c:200:2: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
Change-Id: I72310886bef4db635078b75715c9d98ee45391cc
|
|
The vty should be able to block or unblock a specific NSVC.
Further more this case is special for the UNITDATA as those
can be still received until the other side response to the BLOCK PDU.
Related: OS#4939
Change-Id: Ic0ce3c5fabc8644cc1ee71a8f6dd783fadf7b84d
|
|
Change-Id: I700da48d7afe6b1a81484a0725faf0c56073446d
|