Project

General

Profile

Actions

Feature #4841

open

TC_e1_crcx_and_dlcx_ep does not pass - move the IPA code out of libosmo-abis

Added by dexter over 3 years ago. Updated over 2 years ago.

Status:
Stalled
Priority:
Low
Assignee:
Category:
-
Target version:
-
Start date:
11/02/2020
Due date:
% Done:

0%

Spec Reference:

Description

The testcase TC_e1_crcx_and_dlcx_ep can not be executed correctly because it requires a running osmo-e1d but in order to have this available in jenkins this would mean that we need to build the related debian packages with osmo-e1d support, which then creates an impractical dependency to osmo-e1d.

The proper solution is to move the IPA code out of libosmo-abis. Historically that made sense,
as the IPA multiplex was first encountered in Abis. But then it was also present in SCCPlite,
we started using it for GSUP, and most recently for RSPRO in osmo-remsim.

This now means that virtually all osmocom projects depend on libosmo-abis, while all they want
is the IPA abstraction.

Adding osmo-e1d support to libosmo-abis creates another dependency, and I rally do not want
to have to exlpain to an osmo-remsim user why he needs to install an E1 interface driver
if he wants to have remote sim functionality.

So my plan was to see if we can untangle this somehow without spending two weeks of time on it,
and then re-enable the dependency of libosmo-abis to osmo-e1d once nobody (except osmo-mgw
and osmo-bsc) depend on libosmo-abis anymore.

See also #2547


Related issues

Related to Cellular Network Infrastructure - Feature #2011: clean-up / merge IPA (and IPA CCM) code of libosmocore, libosmo-abis, libosmo-netif, openbsc, etc.New04/15/2017

Actions
Related to libosmo-netif - Feature #4726: remove build dependency of libosmo-netif to libosmo-abisResolvedlaforge08/22/2020

Actions
Actions #1

Updated by dexter over 3 years ago

  • Tracker changed from Bug to Feature
Actions #2

Updated by laforge over 3 years ago

  • Related to Feature #2011: clean-up / merge IPA (and IPA CCM) code of libosmocore, libosmo-abis, libosmo-netif, openbsc, etc. added
Actions #3

Updated by laforge over 3 years ago

  • Related to Feature #4726: remove build dependency of libosmo-netif to libosmo-abis added
Actions #4

Updated by dexter over 2 years ago

  • Status changed from New to In Progress

I have now analyzed the IPA situation a bit. It appears to me that someone has tried to move the IPA code to libosmocore some time ago. There are some basic parts of the IPA code that are already in libosmocore. Presumably the bare minimum that was required to implement the control interface. The major part is still in libosmo-abis.

Here is an overview of of some locations where to find IPA code:

occurrences in libosmocore:
http://git.osmocom.org/libosmocore/tree/include/osmocom/gsm/protocol/ipaccess.h
http://git.osmocom.org/libosmocore/tree/include/osmocom/gsm/ipa.h
http://git.osmocom.org/libosmocore/tree/src/gsm/ipa.c

occurrences in libosmo-abis:
http://git.osmocom.org/libosmo-abis/tree/include/osmocom/abis/ipaccess.h
http://git.osmocom.org/libosmo-abis/tree/src/input/ipaccess.c
http://git.osmocom.org/libosmo-abis/tree/include/osmocom/abis/ipa.h
http://git.osmocom.org/libosmo-abis/tree/src/input/ipa.c
http://git.osmocom.org/libosmo-abis/tree/src/input/ipa_keepalive.c
http://git.osmocom.org/libosmo-abis/tree/include/osmocom/abis/ipa_proxy.h
http://git.osmocom.org/libosmo-abis/tree/src/ipa_proxy.c

Here is an overview of the functions that are used by code that that depends on IPA:

osmo-hlr:gsup_server.c:
osmo-hlr                osmo_ipa_name_to_str
osmo-hlr        osmo_ipa_name_set
libosmocore        ipa_prepend_header_ext
libosmocore        ipa_ccm_idtag_name
libosmo-abis        ipa_server_conn_send
libosmo-abis        ipa_server_conn_ccm
libosmo-abis        ipa_server_conn_create
libosmo-abis        ipa_server_conn_destroy
libosmo-abis        ipa_server_link_create
libosmo-abis        ipa_server_link_open
libosmo-abis        ipa_server_link_close
libosmo-abis        ipa_server_link_destroy
libosmo-abis        ipa_msg_push_header

osmo-hlr:gsup_client.c:
libosmo-abis        ipa_client_conn_send
libosmo-abis        ipa_client_conn_open
libosmo-abis        ipaccess_bts_handle_ccm
libosmo-abis        ipa_client_conn_close
libosmo-abis        ipa_client_conn_destroy
libosmo-abis        ipa_client_conn_clear_queue
libosmo-abis        ipa_msg_push_header

libosmocore:control_if.c:
libosmocore        ipa_prepend_header_ext
libosmocore        ipa_prepend_header_ext
libosmocore        ipa_ccm_send_pong
libosmocore        ipa_ccm_send_id_ack

libosmoabis:ipa_proxy.c:
libosmo-abis        ipa_server_conn_send
libosmo-abis        ipa_server_conn_create
libosmo-abis        ipa_server_conn_create2
libosmo-abis        ipa_client_conn_open

osmo-remsim:rspro_server.c:
libosmocore        ipa_prepend_header_ext
libosmo-abis        ipa_msg_push_header
libosmo-abis        ipa_server_conn_send
libosmo-abis        ipa_server_conn_ccm
libosmo-abis        ipa_keepalive_fsm_pong_received
libosmo-abis        ipa_server_conn_create
libosmo-abis        ipa_server_conn_alloc_keepalive_fsm
libosmo-abis        ipa_keepalive_fsm_start
libosmo-abis        ipa_server_conn_destroy
libosmo-abis        ipa_server_link_create
libosmo-abis        ipa_server_link_open

osmo-remsim:bankd_main.c:
libosmocore        ipa_prepend_header_ext
libosmocore        ipa_prepend_header
libosmocore        ipa_ccm_send_pong
libosmocore        ipa_ccm_send_id_ack

Separating the IPA code from libosmo-abis would mean that the applications that use the code will most likely have to be touched so that they include new header files. To keep old code compatible it might be necessary to keep a wrapper in libosmo-abis that still provides all the ipa_xxx functions.

To my knowledge the following applications currently depend on IPA in libosmo-abis
osmo-bsc
osmo-mgw
osmo-bts
osmo-remsim
osmo-hlr
libosmo-sccp (can't see libosmo-abis in configure.ac?)

Actions #5

Updated by dexter over 2 years ago

  • Status changed from In Progress to Stalled
Actions #6

Updated by dexter over 2 years ago

laforge also did a study about the location and usage of IPA related functions:

libosmocore

* ipa_ccm_idtag_name()
* ipa_ccm_idtag_parse()
** libosmo-abis
** libosmo-sccp
** osmo-bsc
* ipa_ccm_idtag_parse_off()
* ipa_parse_unitid()
* ipa_ccm_tlv_to_unitdata()
* ipa_ccm_make_id_resp()
* ipa_ccm_make_id_resp_from_req()
** libosmo-sccp
* ipa_send()
** libosmoabis
* ipa_ccm_send_pong()
** osmo-bsc/ipaccess-proxy
* ipa_ccm_send_id_ack()
** osmo-bsc/ipaccess-proxy
* ipa_ccm_send_id_req()
** osmo-bsc/ipaccess-proxy
** libosmo-abis
** libosmo-sccp
* ipa_ccm_rcvmsg_base()
** libosmo-abis
* ipa_ccm_rcvmsg_bts_base()
** libosmo-abis
** osmo-bts/sysmbts_mgr_calib
* ipa_prepend_header_ext()
** osmo-bsc, osmo-bts, osmo-hlr, osmo-msc, osmo-sgsn, osmo-sysmon, ...
* ipa_prepend_header()
** osmo-bsc, osmo-bts, osmo-hlr, osmo-msc, osmo-sgsn, osmo-sysmon, ...
* ipa_msg_recv()
** UNUSED
* ipa_msg_recv_buffered()
** libosmo-abis, libosmo-sccp
* ipa_msg_alloc()
** libosmo-abis, libosmo-sccp

libosmo-abis

* ipa_msg_push_header
** libosmo-netif, libosmo-sccp, osmo-msc, osmo-sgan
* ipa_client_conn_close
** osmo-msc, osmo-sgsn
* ipa_client_conn_create
** osmo-bts, osmo-msc, osmo-sgsn
* ipa_client_conn_destroy
** osmo-msc, osmo-sgsn
* ipa_client_conn_open
** osmo-bts, osmo-msc, osmo-sgsn
* ipa_client_conn_send
** osmo-bts, osmo-msc, osmo-sgsn, osmo-remsim
* ipa_client_conn_clear_queue
** osmo-msc, osmo-sgsn

* ipa_server_link_create
** osmo-hlr
* ipa_server_link_close
** osmo-hlr
* ipa_server_conn_create
** osmo-hlr
* ipa_server_conn_ccm
** osmo-hlr
* ipa_server_conn_destroy
** osmo-hlr
* ipa_server_conn_send
** osmo-hlr

* ipa_keepalive_fsm_start

libosmo-netif

* chan_abis_ipa_srv / chan_abis_ipa_clnt
** cannot deal with fragmented IPA messages!
** nowhere used, let's remove
* ipaccess_idtag_name()
* osmo_ipa_msg_alloc()
** only inside library
* osmo_ipa_msg_push_header()
** libosmo-sccp
* osmo_ipa_process_msg()
** libosmo-sccp
* osmo_ipa_idtag_parse()
** only inside library
* osmo_ipa_parse_unitid()
** only inside library
* ipaccess_send_pong()
** identical to ipa_ccm_send_pong/libosmogsm
** libosmo-sccp
* ipaccess_send_id_ack()
** identical to ipa_ccm_send_ack/libosmogsm
** libosmo-sccp
* ipaccess_send_id_req()
** identical to ipa_ccm_send_req/libosmogsm
** only inside library
* osmo_ipa_rcvmsg_base()
** only inside library
* ipaccess_parse_unitid()
** identical to ipa_parse_unitid/libosmogsm?
** only inside library
* ipa_cli_id_resp()
** only inside library
* ipa_cli_id_ack()
** only inside library
* osmo_ipa_parse_msg_id_resp()
** only inside library

I think one of the main difficulties here is that this is not only about moving the IPA code out of libosmo-abis. There is also a larger refactoring required. Its also not only one IPA implementations but several different ones.

Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)