osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/34171 )
Change subject: csd_bs_list_to_gsm0808_ct: assert -> ret -EINVAL
......................................................................
csd_bs_list_to_gsm0808_ct: assert -> ret -EINVAL
Instead of asserting on an empty list of bearer services, return
-EINVAL. This makes the function more similar to
sdp_audio_codecs_to_gsm0808_channel_type which also doesn't assert if
an empty list of codecs is passed.
Related: OS#4394
Change-Id: I15a389e1f7a9d3d17b6531c9836d3d5f9d148267
---
M src/libmsc/csd_bs.c
1 file changed, 17 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/71/34171/1
diff --git a/src/libmsc/csd_bs.c b/src/libmsc/csd_bs.c
index 3a2c82a..caea057 100644
--- a/src/libmsc/csd_bs.c
+++ b/src/libmsc/csd_bs.c
@@ -382,7 +382,8 @@
.ch_indctr = GSM0808_CHAN_DATA,
};
- OSMO_ASSERT(list->count);
+ if (!list->count)
+ return -EINVAL;
if (csd_bs_is_transp(list->bs[0])) {
ct->data_transparent = true;
--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/34171
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I15a389e1f7a9d3d17b6531c9836d3d5f9d148267
Gerrit-Change-Number: 34171
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newchange
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/34170 )
Change subject: Cosmetic: fix typo
......................................................................
Cosmetic: fix typo
Change-Id: Ib707fa66ae789abfa8795b4e521a16e24c77647d
---
M src/libmsc/transaction.c
1 file changed, 10 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/70/34170/1
diff --git a/src/libmsc/transaction.c b/src/libmsc/transaction.c
index 3e458f1..7ae4c7d 100644
--- a/src/libmsc/transaction.c
+++ b/src/libmsc/transaction.c
@@ -186,7 +186,7 @@
static uint32_t new_call_id = 1;
/*! Allocate a new transaction and add it to network list
- * \param[in] net Netwokr in which we allocate transaction
+ * \param[in] net Network in which we allocate transaction
* \param[in] subscr Subscriber for which we allocate transaction
* \param[in] protocol Protocol (CC/SMS/...)
* \param[in] callref Call Reference
--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/34170
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: Ib707fa66ae789abfa8795b4e521a16e24c77647d
Gerrit-Change-Number: 34170
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newchange
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/33983 )
Change subject: vty: Allow modifying default msclass
......................................................................
vty: Allow modifying default msclass
Until now, if timeslot resources where being allocated for an MS
whose msclass is not known, msclass=12 was being selected.
While it's true that msclass=12 is quite a usual one implemented by
phones (Rx=4, Rx=4, Sum=5), some MS implementations may not support such
modes.
As a result, if the PCU allocates a TBF for an MS which its msclass is
not known (eg. because it used 1-phase access aka no Pkt Res Req), then
a minimal msclass=1 should be assumed. Otherwise, it may assign more
multislots than the MS can handle, and will work incorrectly since an
amount of RLC/MAC blocks won't be sent/received properly.
With the existing code base, changing the default MSCLASS to 1 would,
however, create a worse user experiencie for the vast majority of devices
(which are msclass >= 12). The code should be improved to first use only
1 TS until the MS CLASS is known, and at that point reallocate resources
and re-assign them (eg. RECONFIGURE TBF rlc/mac ctrl blk).
So, for now, simply add a hidden VTY config to allow changing the
default assumed MS Class, so that operators wishing to support all
devices can eg. set it to 1.
Change-Id: If80fdd793db7dad029faa83dbf980ffc4959e2e5
---
M src/gprs_pcu.c
M src/gprs_pcu.h
M src/mslot_class.c
M src/mslot_class.h
M src/pcu_vty.c
5 files changed, 53 insertions(+), 3 deletions(-)
Approvals:
fixeria: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
Hoernchen: Looks good to me, but someone else must approve
jolly: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/src/gprs_pcu.c b/src/gprs_pcu.c
index 069f170..83ae38d 100644
--- a/src/gprs_pcu.c
+++ b/src/gprs_pcu.c
@@ -129,6 +129,7 @@
/* TODO: increase them when CRBB decoding is implemented */
pcu->vty.ws_base = 64;
pcu->vty.ws_pdch = 0;
+ pcu->vty.msclass_default = PCU_DEFAULT_MSLOT_CLASS;
pcu->vty.llc_codel_interval_msec = LLC_CODEL_USE_DEFAULT;
pcu->vty.llc_idle_ack_csec = 10;
diff --git a/src/gprs_pcu.h b/src/gprs_pcu.h
index 66cfca3..4451996 100644
--- a/src/gprs_pcu.h
+++ b/src/gprs_pcu.h
@@ -43,6 +43,9 @@
#define PCU_TDEF_NEIGH_CACHE_ALIVE (-10)
#define PCU_TDEF_SI_CACHE_ALIVE (-11)
+/* If Multislot Class is not known during TS allocation, assume ms_class=12: Rx=4 Tx=4 Sum=5 */
+#define PCU_DEFAULT_MSLOT_CLASS 12
+
/* see bts->gsmtap_categ_mask */
enum pcu_gsmtap_category {
PCU_GSMTAP_C_DL_UNKNOWN = 0, /* unknown or undecodable downlink blocks */
@@ -108,6 +111,7 @@
int ns_priority;
uint16_t ws_base;
uint16_t ws_pdch; /* increase WS by this value per PDCH */
+ uint8_t msclass_default; /* Assume this MSCLASS if unknown when creating TBF */
uint16_t force_llc_lifetime; /* overrides lifetime from SGSN */
uint32_t llc_discard_csec;
uint32_t llc_idle_ack_csec;
diff --git a/src/mslot_class.c b/src/mslot_class.c
index 1809cd7..caab2b5 100644
--- a/src/mslot_class.c
+++ b/src/mslot_class.c
@@ -18,6 +18,7 @@
#include <mslot_class.h>
#include <gprs_debug.h>
+#include <gprs_pcu.h>
#include <osmocom/core/bits.h>
#include <osmocom/core/utils.h>
@@ -86,7 +87,7 @@
static inline const struct gprs_ms_multislot_class *get_mslot_table(uint8_t ms_cl)
{
- uint8_t index = ms_cl ? ms_cl : DEFAULT_MSLOT_CLASS;
+ uint8_t index = ms_cl ? ms_cl : the_pcu->vty.msclass_default;
if (ms_cl >= ARRAY_SIZE(gprs_ms_multislot_class))
index = 0;
diff --git a/src/mslot_class.h b/src/mslot_class.h
index d273cad..0d48c83 100644
--- a/src/mslot_class.h
+++ b/src/mslot_class.h
@@ -30,8 +30,6 @@
#define MS_C 252 /* 1 with hopping, 0 without (change Tx to Rx)*/
#define MS_TO 251 /* 31 symbol periods (this can be provided by a TA offset, i.e. a minimum TA value) */
-#define DEFAULT_MSLOT_CLASS 12
-
#define NO_FREE_TFI 0xffffffff
enum { MASK_TT = 0, MASK_TR = 1 };
diff --git a/src/pcu_vty.c b/src/pcu_vty.c
index 84c0456..9de99c8 100644
--- a/src/pcu_vty.c
+++ b/src/pcu_vty.c
@@ -279,6 +279,8 @@
vty_out(vty, " gamma %d%s", the_pcu->vty.gamma * 2, VTY_NEWLINE);
if (!the_pcu->vty.dl_tbf_preemptive_retransmission)
vty_out(vty, " no dl-tbf-preemptive-retransmission%s", VTY_NEWLINE);
+ if (the_pcu->vty.msclass_default != PCU_DEFAULT_MSLOT_CLASS)
+ vty_out(vty, " multislot-class default %u%s", the_pcu->vty.msclass_default, VTY_NEWLINE);
if (strcmp(the_pcu->pcu_sock_path, PCU_SOCK_DEFAULT))
vty_out(vty, " pcu-socket %s%s", the_pcu->pcu_sock_path, VTY_NEWLINE);
@@ -882,6 +884,19 @@
return CMD_SUCCESS;
}
+DEFUN_ATTR_USRATTR(cfg_pcu_msclass_default,
+ cfg_pcu_msclass_default_cmd,
+ CMD_ATTR_HIDDEN,
+ X(PCU_VTY_ATTR_NEW_TBF),
+ "multislot-class default <1-45>",
+ "MultiSlot Class configuration\n"
+ "Set assumed default MultiSlot Class if unknown during TBF allocation\n"
+ "MultiSlot Class number to use as default (default: 12)\n")
+{
+ the_pcu->vty.msclass_default = atoi(argv[0]);
+ return CMD_SUCCESS;
+}
+
#define MS_IDLE_TIME_STR "keep an idle MS object alive for the time given\n"
DEFUN_DEPRECATED(cfg_pcu_ms_idle_time,
cfg_pcu_ms_idle_time_cmd,
@@ -1314,6 +1329,7 @@
install_element(PCU_NODE, &cfg_pcu_no_dl_tbf_idle_time_cmd);
install_element(PCU_NODE, &cfg_pcu_dl_tbf_preemptive_retransmission_cmd);
install_element(PCU_NODE, &cfg_pcu_no_dl_tbf_preemptive_retransmission_cmd);
+ install_element(PCU_NODE, &cfg_pcu_msclass_default_cmd);
install_element(PCU_NODE, &cfg_pcu_ms_idle_time_cmd);
install_element(PCU_NODE, &cfg_pcu_no_ms_idle_time_cmd);
install_element(PCU_NODE, &cfg_pcu_gsmtap_remote_host_cmd);
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/33983
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: If80fdd793db7dad029faa83dbf980ffc4959e2e5
Gerrit-Change-Number: 33983
Gerrit-PatchSet: 6
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
Attention is currently required from: pespin.
Hello osmith, Jenkins Builder, jolly, fixeria,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmocom-bb/+/34133
to look at the new patch set (#7).
Change subject: layer23: modem: Pass fn from lapdm to L1CTL-CCCH_DATA.ind
......................................................................
layer23: modem: Pass fn from lapdm to L1CTL-CCCH_DATA.ind
Change-Id: I7a9f31ae363fe7de019ff1a906f3978ff3074036
---
M src/host/layer23/src/modem/grr.c
1 file changed, 18 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/33/34133/7
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34133
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I7a9f31ae363fe7de019ff1a906f3978ff3074036
Gerrit-Change-Number: 34133
Gerrit-PatchSet: 7
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newpatchset
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/34114 )
Change subject: stream: Use new flag OSMO_SOCK_F_SCTP_ASCONF_SUPPORTED for SCTP sockets
......................................................................
stream: Use new flag OSMO_SOCK_F_SCTP_ASCONF_SUPPORTED for SCTP sockets
This is required if the user of the stream API wants to use SCTP extra
features such as setting the Peer Primary Address through ASCONF.
At a later point we may want to add new osmo_stream APIs to set extra
flags for the socket, or maybe simply add a new API specifically to
enable ASCONF for the stream.
Depends: libosmocore.git Change-Id Iac07031927b66a9d32d2bb2faab817e4c922a359
Related: OS#6076
Change-Id: I807b3748b8535d8e75ceea812d7baaf153fa1d60
---
M src/stream_cli.c
M src/stream_srv.c
2 files changed, 21 insertions(+), 3 deletions(-)
Approvals:
osmith: Looks good to me, but someone else must approve
Jenkins Builder: Verified
daniel: Looks good to me, approved
diff --git a/src/stream_cli.c b/src/stream_cli.c
index 1ee0ba5..b5ef66c 100644
--- a/src/stream_cli.c
+++ b/src/stream_cli.c
@@ -747,7 +747,7 @@
ret = osmo_sock_init2_multiaddr(AF_UNSPEC, SOCK_STREAM, cli->proto,
(const char **)cli->local_addr, cli->local_addrcnt, cli->local_port,
(const char **)cli->addr, cli->addrcnt, cli->port,
- OSMO_SOCK_F_CONNECT|OSMO_SOCK_F_BIND|OSMO_SOCK_F_NONBLOCK);
+ OSMO_SOCK_F_CONNECT|OSMO_SOCK_F_BIND|OSMO_SOCK_F_NONBLOCK|OSMO_SOCK_F_SCTP_ASCONF_SUPPORTED);
break;
#endif
default:
@@ -826,7 +826,7 @@
ret = osmo_sock_init2_multiaddr(cli->sk_domain, cli->sk_type, cli->proto,
(const char **)cli->local_addr, cli->local_addrcnt, cli->local_port,
(const char **)cli->addr, cli->addrcnt, cli->port,
- OSMO_SOCK_F_CONNECT|OSMO_SOCK_F_BIND|OSMO_SOCK_F_NONBLOCK);
+ OSMO_SOCK_F_CONNECT|OSMO_SOCK_F_BIND|OSMO_SOCK_F_NONBLOCK|OSMO_SOCK_F_SCTP_ASCONF_SUPPORTED);
break;
#endif
default:
diff --git a/src/stream_srv.c b/src/stream_srv.c
index 17925af..c8d3233 100644
--- a/src/stream_srv.c
+++ b/src/stream_srv.c
@@ -411,7 +411,7 @@
case IPPROTO_SCTP:
ret = osmo_sock_init2_multiaddr(link->sk_domain, link->sk_type, link->proto,
(const char **)link->addr, link->addrcnt, link->port,
- NULL, 0, 0, OSMO_SOCK_F_BIND);
+ NULL, 0, 0, OSMO_SOCK_F_BIND|OSMO_SOCK_F_SCTP_ASCONF_SUPPORTED);
break;
#endif
default:
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/34114
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I807b3748b8535d8e75ceea812d7baaf153fa1d60
Gerrit-Change-Number: 34114
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged