Project

General

Profile

Actions

Bug #5085

closed

ns2: improve vty `show ns` to show if a NSVC is locally blocked or by the remote

Added by lynxis about 3 years ago. Updated over 1 year ago.

Status:
Resolved
Priority:
Normal
Assignee:
arehbein
Category:
libosmogb
Target version:
-
Start date:
03/21/2021
Due date:
% Done:

100%

Spec Reference:
Tags:

Description

When a NSVC has been blocked, the vty doesn't show if it's blocked because a local O&M blocked it (by vty) or because the other side has blocked it.


Related issues

Related to libosmocore - Bug #4797: vty: the output of 'show ns' command is confusingFeedbackfixeria10/10/2020

Actions
Actions #1

Updated by laforge about 3 years ago

  • Category set to libosmogb
Actions #2

Updated by pespin over 1 year ago

  • Related to Bug #4797: vty: the output of 'show ns' command is confusing added
Actions #3

Updated by laforge over 1 year ago

  • Tags set to simple
  • Assignee changed from lynxis to arehbein
Actions #4

Updated by arehbein over 1 year ago

(Note: The following comment may or may not be out of date, I'll leave it here for now)

So, I'm currently working on this while waiting for a reply on #5208 , and while I'm not stuck, I wonder if it might be very easy for someone more experienced with this codebase to give me a good pointer...

I'm looking at the code for `show ns` in `libosmocore/src/gb/gprs_ns2_vty.c` and as of now my problem is that from what I can tell the closest to the information we want to print out is a pointer to a `struct gprs_ns2_vc_bind`.
However what we really want is information from the `struct osmo_fsm_inst` field `priv`, which - only in `src/gb/gprs_ns2_vc_fsm.c` - is accessible as a pointer to `struct gprs_ns2_vc_priv`.

There we can find `om_blocked`, and the `state` field telling us if the NSVC is blocked can be found in the `struct osmo_fsm_inst` it came from.

Now my approach would be to find the lines of code where the `nsi` field from the `struct gprs_ns2_vc_bind` is set - based on the assumption, that there, the `struct osmo_fsm_inst` it came from, must be referenced - maybe I'll find it quickly but maybe somebody already knows where it is set so I can save some time.-+

Actions #5

Updated by arehbein over 1 year ago

I've gone for a new approach (very briefly: Make the 'om_blocked' field part of the FSM struct, don't hide it in 'priv')

Actions #6

Updated by arehbein over 1 year ago

  • % Done changed from 0 to 80
Actions #7

Updated by arehbein over 1 year ago

lynxis, I have a patch, do you have any recommendations on where to find/how to quickly set up a multicomponent setup, that includes NSVCs (and an easy way to block them), so I can try the 'show ns' output?
I can get the BSC alone to run, but then 'show ns' has nothing to print.

Actions #8

Updated by lynxis over 1 year ago

@arehbein I would recommend using the osmo-nsdummy utility. You have to compile libosmocore with --enable-external-tests.
libosmocore/src/utils/osmo-ns-dummy (it won't be installed).
Then you can start 2x osmo-ns-dummy and configure to connect to each other. I would recommend using ip.access style configuration.
(Taken from ttcn3 tests)

(-p vty port)
./osmo-ns-dummy -p 4240 ./config-a.cfg
./osmo-ns-dummy -p 4241 ./config-b.cfg

ns
 bind udp local
  listen 127.0.0.1 23000
  accept-ipaccess
 bind udp local2
  listen 127.0.0.1 23001
  accept-ipaccess

ns
 bind udp local
  listen 127.0.0.1 22000
 bind udp local2
  listen 127.0.0.1 22001
 nse 1234
  nsvc ipa local 127.0.0.1 23000 nsvci 1234
  nsvc ipa local2 127.0.0.1 23001 nsvci 1235
Actions #9

Updated by laforge over 1 year ago

arehbein wrote in #note-7:

I can get the BSC alone to run, but then 'show ns' has nothing to print.

The BSC is not involved in NS. osmo-pcu, osmo-sgsn and osmo-gbproxy are the network elements implementing NS (well, all using libosmogb for doing that in reality).

Actions #10

Updated by arehbein over 1 year ago

  • Status changed from New to Feedback
  • % Done changed from 80 to 100
Actions #11

Updated by arehbein over 1 year ago

  • Status changed from Feedback to Resolved
Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)