lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

May 2023

  • 1 participants
  • 2583 discussions
[S] Change in osmo-iuh[master]: Move testdir src/tests/ -> tests/
by pespin 15 May '23

15 May '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-iuh/+/32609 ) Change subject: Move testdir src/tests/ -> tests/ ...................................................................... Move testdir src/tests/ -> tests/ Move tests to usual directory in most projects. Change-Id: Ib9ca59d1dffbbb13fcb9ae2e597b3f114f77524e --- M .gitignore M Makefile.am M configure.ac M src/Makefile.am R tests/Makefile.am R tests/dummy_cn_sua.c R tests/hnb-test-layers.h R tests/hnb-test-ranap.c R tests/hnb-test-rua.c R tests/hnb-test.c R tests/hnb-test.h R tests/test-helpers.c R tests/test-helpers.err R tests/test-helpers.ok R tests/test-hnbap.c R tests/test-hnbap.ok R tests/test-ranap.c R tests/test-ranap.ok R tests/test_common.c R tests/test_common.h R tests/testsuite.at 21 files changed, 29 insertions(+), 18 deletions(-) Approvals: laforge: Looks good to me, approved daniel: Looks good to me, but someone else must approve fixeria: Looks good to me, approved Jenkins Builder: Verified diff --git a/.gitignore b/.gitignore index 91912b2..209421b 100644 --- a/.gitignore +++ b/.gitignore @@ -21,16 +21,16 @@ Makefile.in Makefile Makefile.am.sample -src/tests/atconfig -src/tests/dummy-cn -src/tests/hnb-test -src/tests/package.m4 -src/tests/test-helpers -src/tests/test-hnbap -src/tests/test-ranap -src/tests/testsuite -src/tests/testsuite.dir -src/tests/testsuite.log +tests/atconfig +tests/dummy-cn +tests/hnb-test +tests/package.m4 +tests/test-helpers +tests/test-hnbap +tests/test-ranap +tests/testsuite +tests/testsuite.dir +tests/testsuite.log src/osmo-hnbgw tags libosmo-hnbap.pc diff --git a/Makefile.am b/Makefile.am index ab3ed63..60fc0b6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,6 @@ AUTOMAKE_OPTIONS = foreign dist-bzip2 -SUBDIRS = src include doc +SUBDIRS = src include doc tests pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libosmo-hnbap.pc libosmo-ranap.pc libosmo-rua.pc libosmo-sabp.pc diff --git a/configure.ac b/configure.ac index 5596659..32f0a0d 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ dnl tar-ustar: some asn1 filenames surpass the 99 char limit of tar, so we need dnl to make tar allow longer filenames. -AC_CONFIG_TESTDIR(src/tests) +AC_CONFIG_TESTDIR(tests) CFLAGS="$CFLAGS -std=gnu11" @@ -143,7 +143,7 @@ src/ranap/Makefile src/rua/Makefile src/sabp/Makefile - src/tests/Makefile + tests/Makefile Makefile include/Makefile include/osmocom/Makefile diff --git a/src/Makefile.am b/src/Makefile.am index d217221..378262b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = hnbap rua ranap sabp tests +SUBDIRS = hnbap rua ranap sabp # Build {hnbap,rua,ranap}_{encoder,decoder}.c using asn1tostruct ASN1_ROOT = $(top_srcdir)/asn1 diff --git a/src/tests/Makefile.am b/tests/Makefile.am similarity index 98% rename from src/tests/Makefile.am rename to tests/Makefile.am index 1fca2a4..c08c6d1 100644 --- a/src/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,4 +1,4 @@ -AM_CFLAGS = -g -Wall -I$(top_srcdir)/src/tests \ +AM_CFLAGS = -g -Wall -I$(top_srcdir)/tests \ -I$(top_srcdir)/include -I$(top_builddir)/include \ $(OSMOVTY_CFLAGS) $(OSMOCORE_CFLAGS) $(OSMOGSM_CFLAGS) \ $(OSMONETIF_CFLAGS) $(ASN1C_CFLAGS) $(OSMOSIGTRAN_CFLAGS) diff --git a/src/tests/dummy_cn_sua.c b/tests/dummy_cn_sua.c similarity index 100% rename from src/tests/dummy_cn_sua.c rename to tests/dummy_cn_sua.c diff --git a/src/tests/hnb-test-layers.h b/tests/hnb-test-layers.h similarity index 100% rename from src/tests/hnb-test-layers.h rename to tests/hnb-test-layers.h diff --git a/src/tests/hnb-test-ranap.c b/tests/hnb-test-ranap.c similarity index 100% rename from src/tests/hnb-test-ranap.c rename to tests/hnb-test-ranap.c diff --git a/src/tests/hnb-test-rua.c b/tests/hnb-test-rua.c similarity index 100% rename from src/tests/hnb-test-rua.c rename to tests/hnb-test-rua.c diff --git a/src/tests/hnb-test.c b/tests/hnb-test.c similarity index 100% rename from src/tests/hnb-test.c rename to tests/hnb-test.c diff --git a/src/tests/hnb-test.h b/tests/hnb-test.h similarity index 100% rename from src/tests/hnb-test.h rename to tests/hnb-test.h diff --git a/src/tests/test-helpers.c b/tests/test-helpers.c similarity index 100% rename from src/tests/test-helpers.c rename to tests/test-helpers.c diff --git a/src/tests/test-helpers.err b/tests/test-helpers.err similarity index 100% rename from src/tests/test-helpers.err rename to tests/test-helpers.err diff --git a/src/tests/test-helpers.ok b/tests/test-helpers.ok similarity index 100% rename from src/tests/test-helpers.ok rename to tests/test-helpers.ok diff --git a/src/tests/test-hnbap.c b/tests/test-hnbap.c similarity index 100% rename from src/tests/test-hnbap.c rename to tests/test-hnbap.c diff --git a/src/tests/test-hnbap.ok b/tests/test-hnbap.ok similarity index 100% rename from src/tests/test-hnbap.ok rename to tests/test-hnbap.ok diff --git a/src/tests/test-ranap.c b/tests/test-ranap.c similarity index 100% rename from src/tests/test-ranap.c rename to tests/test-ranap.c diff --git a/src/tests/test-ranap.ok b/tests/test-ranap.ok similarity index 100% rename from src/tests/test-ranap.ok rename to tests/test-ranap.ok diff --git a/src/tests/test_common.c b/tests/test_common.c similarity index 100% rename from src/tests/test_common.c rename to tests/test_common.c diff --git a/src/tests/test_common.h b/tests/test_common.h similarity index 100% rename from src/tests/test_common.h rename to tests/test_common.h diff --git a/src/tests/testsuite.at b/tests/testsuite.at similarity index 63% rename from src/tests/testsuite.at rename to tests/testsuite.at index 9378f18..b0bd68f 100644 --- a/src/tests/testsuite.at +++ b/tests/testsuite.at @@ -6,17 +6,17 @@ AT_KEYWORDS([helpers]) cat $abs_srcdir/test-helpers.ok > expout cat $abs_srcdir/test-helpers.err > experr -AT_CHECK([$abs_top_builddir/src/tests/test-helpers], [0], [expout], [experr]) +AT_CHECK([$abs_top_builddir/tests/test-helpers], [0], [expout], [experr]) AT_CLEANUP AT_SETUP([hnbap]) AT_KEYWORDS([hnbap]) cat $abs_srcdir/test-hnbap.ok > expout -AT_CHECK([$abs_top_builddir/src/tests/test-hnbap], [0], [expout]) +AT_CHECK([$abs_top_builddir/tests/test-hnbap], [0], [expout]) AT_CLEANUP AT_SETUP([ranap]) AT_KEYWORDS([ranap]) cat $abs_srcdir/test-ranap.ok > expout -AT_CHECK([$abs_top_builddir/src/tests/test-ranap], [0], [expout]) +AT_CHECK([$abs_top_builddir/tests/test-ranap], [0], [expout]) AT_CLEANUP -- To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/32609 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Change-Id: Ib9ca59d1dffbbb13fcb9ae2e597b3f114f77524e Gerrit-Change-Number: 32609 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in libosmo-gprs[master]: grr,bssgp,llc,sndcp: Define qos_params
by pespin 15 May '23

15 May '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/32642 ) Change subject: grr,bssgp,llc,sndcp: Define qos_params ...................................................................... grr,bssgp,llc,sndcp: Define qos_params 3GPP TS 44.064 loosely defines "QoS params" on each primitive by listing the fields, which are a bit different on each primitive. Change-Id: I6760bace69d400edd4576ec2820e29b74f8dfca5 --- M include/osmocom/gprs/llc/llc_prim.h M include/osmocom/gprs/rlcmac/rlcmac_prim.h M include/osmocom/gprs/sndcp/sndcp.h M include/osmocom/gprs/sndcp/sndcp_prim.h M src/gmm/gmm.c M src/gmm/gmm_prim.c 6 files changed, 55 insertions(+), 16 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/include/osmocom/gprs/llc/llc_prim.h b/include/osmocom/gprs/llc/llc_prim.h index a2b53cb..d5a424d 100644 --- a/include/osmocom/gprs/llc/llc_prim.h +++ b/include/osmocom/gprs/llc/llc_prim.h @@ -167,7 +167,12 @@ } xid; /* OSMO_GPRS_LLC_LL_DATA | Req */ struct { - uint8_t qos_params[3]; + struct { + uint8_t peak_throughput; + /* SGSN-only: */ + uint8_t precedence_class; + uint8_t delay_class; + } qos_params; /* 3GPP TS 44.064 7.2.2.5 */ uint8_t reference; /* TODO: confirm type */ uint8_t radio_prio; /* only for the MS side */ } data_req; @@ -177,7 +182,13 @@ } data_cnf; /* OSMO_GPRS_LLC_LL_UNITDATA | Req */ struct { - uint8_t qos_params[3]; + struct { + uint8_t reliability_class; + uint8_t peak_throughput; + /* SGSN-only: */ + uint8_t precedence_class; + uint8_t delay_class; + } qos_params; /* 3GPP TS 44.064 7.2.2.6 */ uint8_t radio_prio; /* only for the MS side */ bool apply_gea; /* Cipher */ bool apply_gia; /* Integrity Protection */ @@ -209,14 +220,17 @@ struct { uint8_t sapi; uint8_t radio_prio; - uint8_t qos_params[3]; - + struct { + uint8_t peak_throughput; + } qos_params; /* 3GPP TS 44.064 7.2.3.1 */ } data_req; /* OSMO_GPRS_LLC_GRR_UNITDATA| Req */ struct { uint8_t sapi; uint8_t radio_prio; - uint8_t qos_params[3]; + struct { + uint8_t peak_throughput; + } qos_params; /* 3GPP TS 44.064 7.2.3.2 */ uint8_t cause; } unitdata_req; }; @@ -237,7 +251,11 @@ union { /* OSMO_GPRS_LLC_BSSGP_DL_UNITDATA | Req */ struct { - uint8_t qos_params[3]; + struct { + uint8_t precedence_class; + uint8_t delay_class; + uint8_t peak_throughput; + } qos_params; /* 3GPP TS 44.064 7.2.4.1 */ bool rlc_confirm; uint8_t sapi; /* TODO: MOCN specific parameters: diff --git a/include/osmocom/gprs/rlcmac/rlcmac_prim.h b/include/osmocom/gprs/rlcmac/rlcmac_prim.h index 2d7a899..ae6c0d1 100644 --- a/include/osmocom/gprs/rlcmac/rlcmac_prim.h +++ b/include/osmocom/gprs/rlcmac/rlcmac_prim.h @@ -49,13 +49,17 @@ struct { uint8_t sapi; uint8_t radio_prio; - uint8_t qos_params[3]; + struct { + uint8_t peak_throughput; + } qos_params; /* 3GPP TS 44.064 7.2.3.1 */ } data_req; /* OSMO_GPRS_RLCMAC_GRR_UNITDATA | Req */ struct { uint8_t sapi; uint8_t radio_prio; - uint8_t qos_params[3]; + struct { + uint8_t peak_throughput; + } qos_params; /* 3GPP TS 44.064 7.2.3.2 */ uint8_t cause; } unitdata_req; }; diff --git a/include/osmocom/gprs/sndcp/sndcp.h b/include/osmocom/gprs/sndcp/sndcp.h index 8acf93f..f8c5485 100644 --- a/include/osmocom/gprs/sndcp/sndcp.h +++ b/include/osmocom/gprs/sndcp/sndcp.h @@ -5,6 +5,9 @@ #include <stdint.h> #include <stddef.h> +/* 3GPP TS 24.008 10.5.6.5 Quality of service */ +#define OSMO_GPRS_SNDCP_QOS_MAXLEN 22 + enum osmo_gprs_sndcp_location { OSMO_GPRS_SNDCP_LOCATION_UNSET, OSMO_GPRS_SNDCP_LOCATION_MS, diff --git a/include/osmocom/gprs/sndcp/sndcp_prim.h b/include/osmocom/gprs/sndcp/sndcp_prim.h index b19498f..bf8f90f 100644 --- a/include/osmocom/gprs/sndcp/sndcp_prim.h +++ b/include/osmocom/gprs/sndcp/sndcp_prim.h @@ -125,7 +125,8 @@ struct { uint8_t nsapi; uint8_t sapi; - uint8_t qos_params[3]; + uint8_t qos_profile[OSMO_GPRS_SNDCP_QOS_MAXLEN]; + uint8_t qos_profile_len; uint8_t radio_prio; } activate_ind; /* OSMO_GPRS_SNDCP_SNSM_ACTIVATE | Rsp */ @@ -147,7 +148,8 @@ struct { uint8_t nsapi; uint8_t sapi; - uint8_t qos_params[3]; + uint8_t qos_profile[OSMO_GPRS_SNDCP_QOS_MAXLEN]; + uint8_t qos_profile_len; uint8_t radio_prio; unsigned int tx_npdu_nr; unsigned int rx_npdu_nr; diff --git a/src/gmm/gmm.c b/src/gmm/gmm.c index faba983..c75a279 100644 --- a/src/gmm/gmm.c +++ b/src/gmm/gmm.c @@ -386,7 +386,7 @@ llc_prim->ll.l3_pdu = msg->l3h; llc_prim->ll.l3_pdu_len = msgb_l3len(msg); /* TODO: - llc_prim->ll.qos_params[3]; + llc_prim->ll.qos_params.*; llc_prim->ll.radio_prio; llc_prim->ll.apply_gea; llc_prim->ll.apply_gia; @@ -420,7 +420,7 @@ llc_prim->ll.l3_pdu = msg->l3h; llc_prim->ll.l3_pdu_len = msgb_l3len(msg); /* TODO: - llc_prim->ll.qos_params[3]; + llc_prim->ll.qos_params.*; llc_prim->ll.radio_prio; llc_prim->ll.apply_gea; llc_prim->ll.apply_gia; @@ -457,7 +457,7 @@ llc_prim->ll.l3_pdu = msg->l3h; llc_prim->ll.l3_pdu_len = msgb_l3len(msg); /* TODO: - llc_prim->ll.qos_params[3]; + llc_prim->ll.qos_params.*; llc_prim->ll.radio_prio; llc_prim->ll.apply_gea; llc_prim->ll.apply_gia; @@ -489,7 +489,7 @@ llc_prim->ll.l3_pdu = msg->l3h; llc_prim->ll.l3_pdu_len = msgb_l3len(msg); /* TODO: - llc_prim->ll.qos_params[3]; + llc_prim->ll.qos_params.*; llc_prim->ll.radio_prio; llc_prim->ll.apply_gea; llc_prim->ll.apply_gia; @@ -523,7 +523,7 @@ llc_prim->ll.l3_pdu = msg->l3h; llc_prim->ll.l3_pdu_len = msgb_l3len(msg); /* TODO: - llc_prim->ll.qos_params[3]; + llc_prim->ll.qos_params.*; llc_prim->ll.radio_prio; llc_prim->ll.apply_gea; llc_prim->ll.apply_gia; diff --git a/src/gmm/gmm_prim.c b/src/gmm/gmm_prim.c index ed8fed6..af8f663 100644 --- a/src/gmm/gmm_prim.c +++ b/src/gmm/gmm_prim.c @@ -525,7 +525,7 @@ gmm_prim->gmmsm.unitdata_req.smpdu_len); llc_prim->ll.unitdata_req.radio_prio = gmme->radio_prio; /* TODO: - llc_prim->ll.qos_params[3]; + llc_prim->ll.qos_params.*; llc_prim->ll.apply_gea; llc_prim->ll.apply_gia; */ -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/32642 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I6760bace69d400edd4576ec2820e29b74f8dfca5 Gerrit-Change-Number: 32642 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in libosmo-gprs[master]: sm: Fix APN IE content not transmitted in Act PDP Ctx Req
by pespin 15 May '23

15 May '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/32644 ) Change subject: sm: Fix APN IE content not transmitted in Act PDP Ctx Req ...................................................................... sm: Fix APN IE content not transmitted in Act PDP Ctx Req Change-Id: I70be2ff5e7e0fea5e93d7b9963064c38a0382f30 --- M src/sm/sm_pdu.c M tests/sm/sm_prim_test.ok 2 files changed, 11 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved diff --git a/src/sm/sm_pdu.c b/src/sm/sm_pdu.c index f8512c0..8b9dd68 100644 --- a/src/sm/sm_pdu.c +++ b/src/sm/sm_pdu.c @@ -209,6 +209,7 @@ if (rc < 0) return -EINVAL; *l = rc; + msgb_put(msg, *l); } /* 10.5.6.3 Protocol configuration options (Optional) */ diff --git a/tests/sm/sm_prim_test.ok b/tests/sm/sm_prim_test.ok index 33f7291..d713308 100644 --- a/tests/sm/sm_prim_test.ok +++ b/tests/sm/sm_prim_test.ok @@ -1,6 +1,6 @@ ==== test_sm_prim_ms() [start] ==== test_sm_prim_gmm_down_cb(): Rx GMMSM-ESTABLISH.request sess_id=0 -test_sm_prim_gmm_down_cb(): Rx GMMSM-UNITDATA.request sess_id=0 SMPDU=[8a 41 06 03 01 00 02 01 21 28 04 27 01 00 ] +test_sm_prim_gmm_down_cb(): Rx GMMSM-UNITDATA.request sess_id=0 SMPDU=[8a 41 06 03 01 00 02 01 21 28 04 03 61 70 6e 27 01 00 ] test_sm_prim_sndcp_up_cb(): Rx SNSM-ACTIVATE.indication test_sm_prim_up_cb(): Rx SMREG-PDP_ACTIVATE.confirm ==== test_sm_prim_ms() [end] ==== -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/32644 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I70be2ff5e7e0fea5e93d7b9963064c38a0382f30 Gerrit-Change-Number: 32644 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-MessageType: merged
1 0
0 0
[S] Change in libosmo-gprs[master]: tests/gmm: Avoid printing rej_cause if GMMSM-Establish.cnf outcome is...
by pespin 15 May '23

15 May '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/32634 ) Change subject: tests/gmm: Avoid printing rej_cause if GMMSM-Establish.cnf outcome is accepted ...................................................................... tests/gmm: Avoid printing rej_cause if GMMSM-Establish.cnf outcome is accepted Otherwise it prints memory regions not really filled in. Change-Id: I9c46e5a42e6b002f51ab19bc5d85b7bdd7da2a4f --- M tests/gmm/gmm_prim_test.c M tests/gmm/gmm_prim_test.ok 2 files changed, 19 insertions(+), 5 deletions(-) Approvals: Jenkins Builder: Verified msuraev: Looks good to me, but someone else must approve fixeria: Looks good to me, approved laforge: Looks good to me, approved diff --git a/tests/gmm/gmm_prim_test.c b/tests/gmm/gmm_prim_test.c index 7bc02b0..b66ca51 100644 --- a/tests/gmm/gmm_prim_test.c +++ b/tests/gmm/gmm_prim_test.c @@ -199,10 +199,13 @@ case OSMO_GPRS_GMM_SAP_GMMSM: switch (OSMO_PRIM_HDR(&gmm_prim->oph)) { case OSMO_PRIM(OSMO_GPRS_GMM_GMMSM_ESTABLISH, PRIM_OP_CONFIRM): - printf("%s(): Rx %s sess_id=%u accepted=%u rej_cause=%u\n", __func__, pdu_name, - gmm_prim->gmmsm.sess_id, - gmm_prim->gmmsm.establish_cnf.accepted, - gmm_prim->gmmsm.establish_cnf.rej.cause); + if (gmm_prim->gmmsm.establish_cnf.accepted) + printf("%s(): Rx %s sess_id=%u accepted\n", __func__, pdu_name, + gmm_prim->gmmsm.sess_id); + else + printf("%s(): Rx %s sess_id=%u rejected cause=%u\n", __func__, pdu_name, + gmm_prim->gmmsm.sess_id, + gmm_prim->gmmsm.establish_cnf.rej.cause); break; case OSMO_PRIM(OSMO_GPRS_GMM_GMMSM_UNITDATA, PRIM_OP_INDICATION): printf("%s(): Rx %s sess_id=%u sm_pdu=%s\n", __func__, pdu_name, diff --git a/tests/gmm/gmm_prim_test.ok b/tests/gmm/gmm_prim_test.ok index e37507e..80d9a2d 100644 --- a/tests/gmm/gmm_prim_test.ok +++ b/tests/gmm/gmm_prim_test.ok @@ -21,7 +21,7 @@ test_gmm_prim_llc_down_cb(): Rx LLGMM-ASSIGN.request old_TLLI=0x80001234 new_TLLI=0xea711b41 test_gmm_prim_down_cb(): Rx GMRR-ASSIGN.request old_tlli=0x80001234 new_tlli=0xea711b41 test_gmm_prim_llc_down_cb(): Rx LL-UNITDATA.request TLLI=0xea711b41 SAPI=GMM l3=[08 03 ] -test_gmm_prim_up_cb(): Rx GMMSM-ESTABLISH.confirm sess_id=1234 accepted=1 rej_cause=0 +test_gmm_prim_up_cb(): Rx GMMSM-ESTABLISH.confirm sess_id=1234 accepted test_gmm_prim_llc_down_cb(): Rx LL-UNITDATA.request TLLI=0xea711b41 SAPI=GMM l3=[0a 28 29 30 ] test_gmm_prim_up_cb(): Rx GMMSM-UNITDATA.indication sess_id=1234 sm_pdu=0a 28 29 30 ==== test_gmm_prim_ms_gmmsm() [end] ==== -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/32634 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I9c46e5a42e6b002f51ab19bc5d85b7bdd7da2a4f Gerrit-Change-Number: 32634 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in libosmo-gprs[master]: sm: Use & forward to upper layers the PTMSI & TLLI received from GMM
by pespin 15 May '23

15 May '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/32636 ) Change subject: sm: Use & forward to upper layers the PTMSI & TLLI received from GMM ...................................................................... sm: Use & forward to upper layers the PTMSI & TLLI received from GMM App and SM itself may need access to PTMSI or TLLI. PTMSI: - App may want to store it somewhere in order to reuse it next time it wants to GMM Attach. TLLI: - App will need the TLLI to identify the MS when sending/receiving primitives over SN SAP (app<->SNDCP). - SM layer will need the TLLI to communicate over SNSM SAP (SM<->SNDCP), as well as relay the information to the app if the GMM Attach happens implicitly over SMREG-Act_Pdp_Ctx.req -> GMMSM-Establish-Req. Change-Id: I7b1b8ac414474652b438f15b7f07961032a0f56d --- M include/osmocom/gprs/sm/sm_prim.h M include/osmocom/gprs/sm/sm_private.h M src/sm/sm.c M src/sm/sm_prim.c 4 files changed, 42 insertions(+), 7 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/include/osmocom/gprs/sm/sm_prim.h b/include/osmocom/gprs/sm/sm_prim.h index 86a36d2..baa85ed 100644 --- a/include/osmocom/gprs/sm/sm_prim.h +++ b/include/osmocom/gprs/sm/sm_prim.h @@ -85,6 +85,10 @@ uint8_t radio_prio; /* TS 24.008 10.5.7.2 */ uint8_t qos[OSMO_GPRS_SM_QOS_MAXLEN]; uint8_t qos_len; + struct { + uint32_t allocated_ptmsi; + uint32_t allocated_tlli; + } gmm; } acc; struct { uint8_t cause; diff --git a/include/osmocom/gprs/sm/sm_private.h b/include/osmocom/gprs/sm/sm_private.h index 163014e..99beaeb 100644 --- a/include/osmocom/gprs/sm/sm_private.h +++ b/include/osmocom/gprs/sm/sm_private.h @@ -127,6 +127,7 @@ struct { uint32_t ptmsi; + uint32_t tlli; char imsi[OSMO_IMSI_BUF_SIZE]; char imei[GSM23003_IMEI_NUM_DIGITS + 1]; char imeisv[GSM23003_IMEISV_NUM_DIGITS+1]; diff --git a/src/sm/sm.c b/src/sm/sm.c index 1f87f4e..3cddb58 100644 --- a/src/sm/sm.c +++ b/src/sm/sm.c @@ -128,7 +128,7 @@ struct gprs_sm_ms *ms; llist_for_each_entry(ms, &g_sm_ctx->ms_list, list) { - if (ms->gmm.ptmsi == tlli) + if (ms->gmm.tlli == tlli) return ms; } return NULL; @@ -222,6 +222,8 @@ sm_prim_tx->smreg.pdp_act_cnf.acc.qos_len = sme->qos_len; if (sme->qos_len) memcpy(sm_prim_tx->smreg.pdp_act_cnf.acc.qos, &sme->qos, sme->qos_len); + sm_prim_tx->smreg.pdp_act_cnf.acc.gmm.allocated_ptmsi = sme->ms->gmm.ptmsi; + sm_prim_tx->smreg.pdp_act_cnf.acc.gmm.allocated_tlli = sme->ms->gmm.tlli; } else { sm_prim_tx->smreg.pdp_act_cnf.rej.cause = cause; } @@ -237,7 +239,7 @@ int rc; sndcp_prim_tx = osmo_gprs_sndcp_prim_alloc_snsm_activate_ind( - sme->ms->gmm.ptmsi, + sme->ms->gmm.tlli, sme->nsapi, sme->llc_sapi); //sndcp_prim_tx->snsm.activat_ind.qos_params = ; /* TODO */ diff --git a/src/sm/sm_prim.c b/src/sm/sm_prim.c index c0fbca4..bb5653e 100644 --- a/src/sm/sm_prim.c +++ b/src/sm/sm_prim.c @@ -25,6 +25,7 @@ #include <osmocom/core/msgb.h> #include <osmocom/core/utils.h> #include <osmocom/core/logging.h> +#include <osmocom/gsm/gsm48.h> #include <osmocom/gprs/sm/sm.h> #include <osmocom/gprs/sm/sm_prim.h> @@ -466,17 +467,23 @@ { struct osmo_gprs_gmm_gmmsm_prim *gmmsm = &gmm_prim->gmmsm; struct gprs_sm_entity *sme; - int rc, ev; + int rc; sme = gprs_sm_find_sme_by_sess_id(gmmsm->sess_id); if (!sme) { LOGSM(LOGL_ERROR, "Rx GMMSM-ESTABLISH.cnf for non existing SM Entity\n"); return -EINVAL; } - - ev = gmmsm->establish_cnf.accepted ? - GPRS_SM_MS_EV_RX_GMM_ESTABLISH_CNF : GPRS_SM_MS_EV_RX_GMM_ESTABLISH_REJ; - rc = osmo_fsm_inst_dispatch(sme->ms_fsm.fi, ev, NULL); + if (gmmsm->establish_cnf.accepted) { + /* Update allocated PTMSI: */ + if (gmm_prim->gmmsm.establish_cnf.acc.allocated_ptmsi != GSM_RESERVED_TMSI) + sme->ms->gmm.ptmsi = gmm_prim->gmmsm.establish_cnf.acc.allocated_ptmsi; + /* Set allocated TLLI: */ + sme->ms->gmm.tlli = gmm_prim->gmmsm.establish_cnf.acc.allocated_tlli; + rc = osmo_fsm_inst_dispatch(sme->ms_fsm.fi, GPRS_SM_MS_EV_RX_GMM_ESTABLISH_CNF, NULL); + } else { + rc = osmo_fsm_inst_dispatch(sme->ms_fsm.fi, GPRS_SM_MS_EV_RX_GMM_ESTABLISH_REJ, NULL); + } return rc; } -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/32636 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I7b1b8ac414474652b438f15b7f07961032a0f56d Gerrit-Change-Number: 32636 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in libosmo-gprs[master]: gmm: Provide allocated PTMSI & TLLI to upper layers
by pespin 15 May '23

15 May '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/32635 ) Change subject: gmm: Provide allocated PTMSI & TLLI to upper layers ...................................................................... gmm: Provide allocated PTMSI & TLLI to upper layers Upper layers (SM or app) may need access to PTMSI or TLLI. PTMSI: - App may want to store it somewhere in order to reuse it next time it wants to GMM Attach. TLLI: - App will need the TLLI to identify the MS when sending/receiving primitives over SN SAP (app<->SNDCP). - SM layer will need the TLLI to communicate over SNSM SAP (SM<->SNDCP), as well as relay the information to the app if the GMM Attach happens implicitly over SMREG-Act_Pdp_Ctx.req -> GMMSM-Establish-Req. Change-Id: I552c43c55409773e2d13b72cba45a866165f203f --- M include/osmocom/gprs/gmm/gmm_prim.h M include/osmocom/gprs/gmm/gmm_private.h M src/gmm/gmm.c M src/gmm/gmm_ms_fsm.c M src/gmm/gmm_prim.c 5 files changed, 35 insertions(+), 8 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/include/osmocom/gprs/gmm/gmm_prim.h b/include/osmocom/gprs/gmm/gmm_prim.h index 7e50c58..42dc90a 100644 --- a/include/osmocom/gprs/gmm/gmm_prim.h +++ b/include/osmocom/gprs/gmm/gmm_prim.h @@ -117,6 +117,7 @@ struct { /* PLMNs MT-caps, attach-type. */ uint32_t allocated_ptmsi; + uint32_t allocated_tlli; } acc; struct { uint8_t cause; /* See enum gsm48_gsm_cause */ @@ -219,6 +220,8 @@ union { struct { /* PLMNs MT-caps, attach-type. */ + uint32_t allocated_ptmsi; + uint32_t allocated_tlli; } acc; struct { uint8_t cause; diff --git a/include/osmocom/gprs/gmm/gmm_private.h b/include/osmocom/gprs/gmm/gmm_private.h index df97e1d..57658e9 100644 --- a/include/osmocom/gprs/gmm/gmm_private.h +++ b/include/osmocom/gprs/gmm/gmm_private.h @@ -118,7 +118,7 @@ int gprs_gmm_tx_ciph_auth_resp(const struct gprs_gmm_entity *gmme, const uint8_t *sres); int gprs_gmm_submit_gmmreg_attach_cnf(struct gprs_gmm_entity *gmme, bool accepted, uint8_t cause); -int gprs_gmm_submit_gmmsm_establish_cnf(struct gprs_gmm_entity *gmme, uint32_t sess_id, bool accepted, uint8_t cause); +int gprs_gmm_submit_gmmsm_establish_cnf(struct gprs_gmm_entity *gmme, bool accepted, uint8_t cause); int gprs_gmm_submit_llgmm_assing_req(const struct gprs_gmm_entity *gmme); #define LOGGMME(gmme, level, fmt, args...) \ diff --git a/src/gmm/gmm.c b/src/gmm/gmm.c index 0070dda..faba983 100644 --- a/src/gmm/gmm.c +++ b/src/gmm/gmm.c @@ -288,6 +288,7 @@ gmm_prim_tx->gmmreg.attach_cnf.accepted = accepted; if (accepted) { gmm_prim_tx->gmmreg.attach_cnf.acc.allocated_ptmsi = gmme->ptmsi; + gmm_prim_tx->gmmreg.attach_cnf.acc.allocated_tlli = gmme->tlli; } else { gmm_prim_tx->gmmreg.attach_cnf.rej.cause = cause; } @@ -323,12 +324,16 @@ return rc; } -int gprs_gmm_submit_gmmsm_establish_cnf(struct gprs_gmm_entity *gmme, uint32_t sess_id, bool accepted, uint8_t cause) +int gprs_gmm_submit_gmmsm_establish_cnf(struct gprs_gmm_entity *gmme, bool accepted, uint8_t cause) { struct osmo_gprs_gmm_prim *gmm_prim_tx; int rc; - gmm_prim_tx = gprs_gmm_prim_alloc_gmmsm_establish_cnf(sess_id, cause); + gmm_prim_tx = gprs_gmm_prim_alloc_gmmsm_establish_cnf(gmme->sess_id, cause); + if (accepted) { + gmm_prim_tx->gmmsm.establish_cnf.acc.allocated_ptmsi = gmme->ptmsi; + gmm_prim_tx->gmmsm.establish_cnf.acc.allocated_tlli = gmme->tlli; + } rc = gprs_gmm_prim_call_up_cb(gmm_prim_tx); return rc; diff --git a/src/gmm/gmm_ms_fsm.c b/src/gmm/gmm_ms_fsm.c index f553ad3..053f8fc 100644 --- a/src/gmm/gmm_ms_fsm.c +++ b/src/gmm/gmm_ms_fsm.c @@ -129,9 +129,7 @@ if (att.implicit_att) { /* Submit GMMSM-ESTABLISH-CNF as per TS 24.007 Annex C.3 */ - rc = gprs_gmm_submit_gmmsm_establish_cnf(ctx->gmme, - ctx->gmme->sess_id, - false, cause); + rc = gprs_gmm_submit_gmmsm_establish_cnf(ctx->gmme, false, cause); if (rc < 0) return; } @@ -147,7 +145,7 @@ } if (ctx->attach.implicit_att) { /* Submit GMMSM-ESTABLISH-CNF as per TS 24.007 Annex C.3 */ - rc = gprs_gmm_submit_gmmsm_establish_cnf(ctx->gmme, ctx->gmme->sess_id, true, 0); + rc = gprs_gmm_submit_gmmsm_establish_cnf(ctx->gmme, true, 0); if (rc < 0) return; } diff --git a/src/gmm/gmm_prim.c b/src/gmm/gmm_prim.c index 573b568..ed8fed6 100644 --- a/src/gmm/gmm_prim.c +++ b/src/gmm/gmm_prim.c @@ -489,7 +489,7 @@ gmme->sess_id = gmm_prim->gmmsm.sess_id; if (gmme->ms_fsm.fi->state == GPRS_GMM_MS_ST_REGISTERED) { - rc = gprs_gmm_submit_gmmsm_establish_cnf(gmme, gmm_prim->gmmsm.sess_id, true, 0); + rc = gprs_gmm_submit_gmmsm_establish_cnf(gmme, true, 0); return rc; } -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/32635 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I552c43c55409773e2d13b72cba45a866165f203f Gerrit-Change-Number: 32635 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in libosmo-gprs[master]: sm: Fix APN IE content not transmitted in Act PDP Ctx Req
by pespin 15 May '23

15 May '23
Attention is currently required from: laforge, fixeria. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/32644 ) Change subject: sm: Fix APN IE content not transmitted in Act PDP Ctx Req ...................................................................... Patch Set 1: (1 comment) File src/sm/sm_pdu.c: https://gerrit.osmocom.org/c/libosmo-gprs/+/32644/comment/54bba76b_dec52cc4 PS1, Line 208: rc = osmo_apn_from_str(msg->tail, msgb_tailroom(msg), sme->apn); : if (rc < 0) : return -EINVAL; : *l = rc; : msgb_put(msg, *l); > > IMHO this is highly unusual: passing a pointer to msg->tail and storing some data before doing the […] I think this istotally fine, since msgb_tailroom(msg) is passed to osmo_apn_from_str, which should return < 0 if there's not enough space. -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/32644 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I70be2ff5e7e0fea5e93d7b9963064c38a0382f30 Gerrit-Change-Number: 32644 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Mon, 15 May 2023 10:01:24 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge <laforge(a)osmocom.org> Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[M] Change in libosmo-gprs[master]: grr,bssgp,llc,sndcp: Define qos_params
by pespin 15 May '23

15 May '23
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/32642 ) Change subject: grr,bssgp,llc,sndcp: Define qos_params ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/32642 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I6760bace69d400edd4576ec2820e29b74f8dfca5 Gerrit-Change-Number: 32642 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Mon, 15 May 2023 09:59:11 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmo-gprs[master]: sm: Use & forward to upper layers the PTMSI & TLLI received from GMM
by pespin 15 May '23

15 May '23
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/32636 ) Change subject: sm: Use & forward to upper layers the PTMSI & TLLI received from GMM ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/32636 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I7b1b8ac414474652b438f15b7f07961032a0f56d Gerrit-Change-Number: 32636 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Mon, 15 May 2023 09:59:08 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmo-gprs[master]: gmm: Provide allocated PTMSI & TLLI to upper layers
by pespin 15 May '23

15 May '23
Attention is currently required from: laforge. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/32635 ) Change subject: gmm: Provide allocated PTMSI & TLLI to upper layers ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/32635 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I552c43c55409773e2d13b72cba45a866165f203f Gerrit-Change-Number: 32635 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Mon, 15 May 2023 09:59:04 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • ...
  • 259
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.