Attention is currently required from: dexter, fixeria, osmith.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/34575?usp=email )
Change subject: gprs_rlcmac_sched: check if we really use direct phy
......................................................................
Patch Set 3:
(1 comment)
File src/gprs_rlcmac_sched.cpp:
https://gerrit.osmocom.org/c/osmo-pcu/+/34575/comment/f67a0395_5200bc4b
PS2, Line 491: if (bts->trx[trx].fl1h) {
> As far as I can see your concerns might be right. When the data is traveling up from pcu_sock. […]
enum value in PCUIF to identify the type of BTS: ACK, agree.
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/34575?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I0808950b1154bbb9a789c3f706ad9fb6618764ec
Gerrit-Change-Number: 34575
Gerrit-PatchSet: 3
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 29 Sep 2023 15:38:53 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: comment
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/34590?usp=email )
Change subject: Split osmo_ss7_as functionalities to its own file
......................................................................
Split osmo_ss7_as functionalities to its own file
Change-Id: I6e39dcb594ffe918ba117fce08cae7b5a6fd2dcc
---
M src/Makefile.am
M src/osmo_ss7.c
A src/osmo_ss7_as.c
M src/ss7_internal.h
4 files changed, 224 insertions(+), 171 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/90/34590/1
diff --git a/src/Makefile.am b/src/Makefile.am
index 2067259..be6442d 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -37,6 +37,7 @@
ipa.c \
m3ua.c \
osmo_ss7.c \
+ osmo_ss7_as.c \
osmo_ss7_asp.c \
osmo_ss7_asp_peer.c \
osmo_ss7_hmrt.c \
diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c
index 1e8bcfb..dbbef6b 100644
--- a/src/osmo_ss7.c
+++ b/src/osmo_ss7.c
@@ -69,14 +69,6 @@
{ 0, NULL }
};
-struct value_string osmo_ss7_as_traffic_mode_vals[] = {
- { OSMO_SS7_AS_TMOD_BCAST, "broadcast" },
- { OSMO_SS7_AS_TMOD_LOADSHARE, "loadshare" },
- { OSMO_SS7_AS_TMOD_ROUNDROBIN, "round-robin" },
- { OSMO_SS7_AS_TMOD_OVERRIDE, "override" },
- { 0, NULL }
-};
-
int osmo_ss7_find_free_rctx(struct osmo_ss7_instance *inst)
{
int32_t rctx;
@@ -88,7 +80,7 @@
return -1;
}
-static uint32_t find_free_l_rk_id(struct osmo_ss7_instance *inst)
+uint32_t ss7_find_free_l_rk_id(struct osmo_ss7_instance *inst)
{
uint32_t l_rk_id;
@@ -855,19 +847,6 @@
* SS7 Application Server
***********************************************************************/
-static const struct rate_ctr_desc ss7_as_rcd[] = {
- [SS7_AS_CTR_RX_MSU_TOTAL] = { "rx:msu:total", "Total number of MSU received" },
- [SS7_AS_CTR_TX_MSU_TOTAL] = { "tx:msu:total", "Total number of MSU transmitted" },
-};
-
-static const struct rate_ctr_group_desc ss7_as_rcgd = {
- .group_name_prefix = "sigtran_as",
- .group_description = "SIGTRAN Application Server",
- .num_ctr = ARRAY_SIZE(ss7_as_rcd),
- .ctr_desc = ss7_as_rcd,
-};
-static unsigned int g_ss7_as_rcg_idx;
-
/*! \brief Find Application Server by given name
* \param[in] inst SS7 Instance on which we operate
* \param[in] name Name of AS
@@ -954,37 +933,6 @@
return as_without_asp;
}
-/*! \brief Allocate an Application Server
- * \param[in] inst SS7 Instance on which we operate
- * \param[in] name Name of Application Server
- * \param[in] proto Protocol of Application Server
- * \returns pointer to Application Server on success; NULL otherwise */
-struct osmo_ss7_as *ss7_as_alloc(struct osmo_ss7_instance *inst, const char *name,
- enum osmo_ss7_asp_protocol proto)
-{
- struct osmo_ss7_as *as;
-
- as = talloc_zero(inst, struct osmo_ss7_as);
- if (!as)
- return NULL;
- as->ctrg = rate_ctr_group_alloc(as, &ss7_as_rcgd, g_ss7_as_rcg_idx++);
- if (!as->ctrg) {
- talloc_free(as);
- return NULL;
- }
- rate_ctr_group_set_name(as->ctrg, name);
- as->inst = inst;
- as->cfg.name = talloc_strdup(as, name);
- as->cfg.proto = proto;
- as->cfg.mode = OSMO_SS7_AS_TMOD_OVERRIDE;
- as->cfg.recovery_timeout_msec = 2000;
- as->cfg.routing_key.l_rk_id = find_free_l_rk_id(inst);
- as->fi = xua_as_fsm_start(as, LOGL_DEBUG);
- llist_add_tail(&as->list, &inst->as_list);
-
- return as;
-}
-
/*! \brief Find or Create Application Server
* \param[in] inst SS7 Instance on which we operate
* \param[in] name Name of Application Server
@@ -1012,124 +960,6 @@
return as;
}
-/*! \brief Add given ASP to given AS
- * \param[in] as Application Server to which \ref asp is added
- * \param[in] asp Application Server Process to be added to \ref as
- * \returns 0 on success; negative in case of error */
-int osmo_ss7_as_add_asp(struct osmo_ss7_as *as, const char *asp_name)
-{
- struct osmo_ss7_asp *asp;
- unsigned int i;
-
- OSMO_ASSERT(ss7_initialized);
- asp = osmo_ss7_asp_find_by_name(as->inst, asp_name);
- if (!asp)
- return -ENODEV;
-
- LOGPAS(as, DLSS7, LOGL_INFO, "Adding ASP %s to AS\n", asp->cfg.name);
-
- if (osmo_ss7_as_has_asp(as, asp))
- return 0;
-
- for (i = 0; i < ARRAY_SIZE(as->cfg.asps); i++) {
- if (!as->cfg.asps[i]) {
- as->cfg.asps[i] = asp;
- return 0;
- }
- }
-
- return -ENOSPC;
-}
-
-/*! \brief Delete given ASP from given AS
- * \param[in] as Application Server from which \ref asp is deleted
- * \param[in] asp Application Server Process to delete from \ref as
- * \returns 0 on success; negative in case of error */
-int osmo_ss7_as_del_asp(struct osmo_ss7_as *as, const char *asp_name)
-{
- struct osmo_ss7_asp *asp;
- unsigned int i;
-
- OSMO_ASSERT(ss7_initialized);
- asp = osmo_ss7_asp_find_by_name(as->inst, asp_name);
- if (!asp)
- return -ENODEV;
-
- LOGPAS(as, DLSS7, LOGL_INFO, "Removing ASP %s from AS\n", asp->cfg.name);
-
- for (i = 0; i < ARRAY_SIZE(as->cfg.asps); i++) {
- if (as->cfg.asps[i] == asp) {
- as->cfg.asps[i] = NULL;
- return 0;
- }
- }
-
- return -EINVAL;
-}
-
-/*! \brief Destroy given Application Server
- * \param[in] as Application Server to destroy */
-void osmo_ss7_as_destroy(struct osmo_ss7_as *as)
-{
- struct osmo_ss7_route *rt, *rt2;
-
- OSMO_ASSERT(ss7_initialized);
- LOGPAS(as, DLSS7, LOGL_INFO, "Destroying AS\n");
-
- if (as->fi)
- osmo_fsm_inst_term(as->fi, OSMO_FSM_TERM_REQUEST, NULL);
-
- /* find any routes pointing to this AS and remove them */
- llist_for_each_entry_safe(rt, rt2, &as->inst->rtable_system->routes, list) {
- if (rt->dest.as == as)
- osmo_ss7_route_destroy(rt);
- }
-
- as->inst = NULL;
- llist_del(&as->list);
- rate_ctr_group_free(as->ctrg);
- talloc_free(as);
-}
-
-/*! \brief Determine if given AS contains ASP
- * \param[in] as Application Server in which to look for \ref asp
- * \param[in] asp Application Server Process to look for in \ref as
- * \returns true in case \ref asp is part of \ref as; false otherwise */
-bool osmo_ss7_as_has_asp(const struct osmo_ss7_as *as,
- const struct osmo_ss7_asp *asp)
-{
- unsigned int i;
-
- OSMO_ASSERT(ss7_initialized);
- for (i = 0; i < ARRAY_SIZE(as->cfg.asps); i++) {
- if (as->cfg.asps[i] == asp)
- return true;
- }
- return false;
-}
-
-/*! Determine if given AS is in the active state.
- * \param[in] as Application Server.
- * \returns true in case as is active; false otherwise. */
-bool osmo_ss7_as_active(const struct osmo_ss7_as *as)
-{
- if (!as->fi)
- return false;
- return as->fi->state == XUA_AS_S_ACTIVE;
-}
-
-/*! Determine if given AS is in the down state.
- * \param[in] as Application Server.
- * \returns true in case as is down; false otherwise. */
-bool osmo_ss7_as_down(const struct osmo_ss7_as *as)
-{
- OSMO_ASSERT(as);
-
- if (!as->fi)
- return true;
- return as->fi->state == XUA_AS_S_DOWN;
-}
-
bool ss7_ipv6_sctp_supported(const char *host, bool bind)
{
int rc;
diff --git a/src/osmo_ss7_as.c b/src/osmo_ss7_as.c
new file mode 100644
index 0000000..34baf52
--- /dev/null
+++ b/src/osmo_ss7_as.c
@@ -0,0 +1,211 @@
+/* Core SS7 AS Handling */
+
+/* (C) 2015-2017 by Harald Welte <laforge(a)gnumonks.org>
+ * (C) 2023 by sysmocom s.f.m.c. GmbH <info(a)sysmocom.de>
+ * All Rights Reserved
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <string.h>
+#include <errno.h>
+#include <unistd.h>
+#include <inttypes.h>
+
+#include <osmocom/sigtran/osmo_ss7.h>
+
+#include <osmocom/core/linuxlist.h>
+#include <osmocom/core/utils.h>
+#include <osmocom/core/talloc.h>
+#include <osmocom/core/logging.h>
+
+#include "ss7_internal.h"
+#include "xua_as_fsm.h"
+
+/***********************************************************************
+ * SS7 Application Server
+ ***********************************************************************/
+
+struct value_string osmo_ss7_as_traffic_mode_vals[] = {
+ { OSMO_SS7_AS_TMOD_BCAST, "broadcast" },
+ { OSMO_SS7_AS_TMOD_LOADSHARE, "loadshare" },
+ { OSMO_SS7_AS_TMOD_ROUNDROBIN, "round-robin" },
+ { OSMO_SS7_AS_TMOD_OVERRIDE, "override" },
+ { 0, NULL }
+};
+
+static const struct rate_ctr_desc ss7_as_rcd[] = {
+ [SS7_AS_CTR_RX_MSU_TOTAL] = { "rx:msu:total", "Total number of MSU received" },
+ [SS7_AS_CTR_TX_MSU_TOTAL] = { "tx:msu:total", "Total number of MSU transmitted" },
+};
+
+static const struct rate_ctr_group_desc ss7_as_rcgd = {
+ .group_name_prefix = "sigtran_as",
+ .group_description = "SIGTRAN Application Server",
+ .num_ctr = ARRAY_SIZE(ss7_as_rcd),
+ .ctr_desc = ss7_as_rcd,
+};
+static unsigned int g_ss7_as_rcg_idx;
+
+/*! \brief Allocate an Application Server
+ * \param[in] inst SS7 Instance on which we operate
+ * \param[in] name Name of Application Server
+ * \param[in] proto Protocol of Application Server
+ * \returns pointer to Application Server on success; NULL otherwise */
+struct osmo_ss7_as *ss7_as_alloc(struct osmo_ss7_instance *inst, const char *name,
+ enum osmo_ss7_asp_protocol proto)
+{
+ struct osmo_ss7_as *as;
+
+ as = talloc_zero(inst, struct osmo_ss7_as);
+ if (!as)
+ return NULL;
+ as->ctrg = rate_ctr_group_alloc(as, &ss7_as_rcgd, g_ss7_as_rcg_idx++);
+ if (!as->ctrg) {
+ talloc_free(as);
+ return NULL;
+ }
+ rate_ctr_group_set_name(as->ctrg, name);
+ as->inst = inst;
+ as->cfg.name = talloc_strdup(as, name);
+ as->cfg.proto = proto;
+ as->cfg.mode = OSMO_SS7_AS_TMOD_OVERRIDE;
+ as->cfg.recovery_timeout_msec = 2000;
+ as->cfg.routing_key.l_rk_id = ss7_find_free_l_rk_id(inst);
+ as->fi = xua_as_fsm_start(as, LOGL_DEBUG);
+ llist_add_tail(&as->list, &inst->as_list);
+
+ return as;
+}
+
+/*! \brief Add given ASP to given AS
+ * \param[in] as Application Server to which \ref asp is added
+ * \param[in] asp Application Server Process to be added to \ref as
+ * \returns 0 on success; negative in case of error */
+int osmo_ss7_as_add_asp(struct osmo_ss7_as *as, const char *asp_name)
+{
+ struct osmo_ss7_asp *asp;
+ unsigned int i;
+
+ OSMO_ASSERT(ss7_initialized);
+ asp = osmo_ss7_asp_find_by_name(as->inst, asp_name);
+ if (!asp)
+ return -ENODEV;
+
+ LOGPAS(as, DLSS7, LOGL_INFO, "Adding ASP %s to AS\n", asp->cfg.name);
+
+ if (osmo_ss7_as_has_asp(as, asp))
+ return 0;
+
+ for (i = 0; i < ARRAY_SIZE(as->cfg.asps); i++) {
+ if (!as->cfg.asps[i]) {
+ as->cfg.asps[i] = asp;
+ return 0;
+ }
+ }
+
+ return -ENOSPC;
+}
+
+/*! \brief Delete given ASP from given AS
+ * \param[in] as Application Server from which \ref asp is deleted
+ * \param[in] asp Application Server Process to delete from \ref as
+ * \returns 0 on success; negative in case of error */
+int osmo_ss7_as_del_asp(struct osmo_ss7_as *as, const char *asp_name)
+{
+ struct osmo_ss7_asp *asp;
+ unsigned int i;
+
+ OSMO_ASSERT(ss7_initialized);
+ asp = osmo_ss7_asp_find_by_name(as->inst, asp_name);
+ if (!asp)
+ return -ENODEV;
+
+ LOGPAS(as, DLSS7, LOGL_INFO, "Removing ASP %s from AS\n", asp->cfg.name);
+
+ for (i = 0; i < ARRAY_SIZE(as->cfg.asps); i++) {
+ if (as->cfg.asps[i] == asp) {
+ as->cfg.asps[i] = NULL;
+ return 0;
+ }
+ }
+
+ return -EINVAL;
+}
+
+/*! \brief Destroy given Application Server
+ * \param[in] as Application Server to destroy */
+void osmo_ss7_as_destroy(struct osmo_ss7_as *as)
+{
+ struct osmo_ss7_route *rt, *rt2;
+
+ OSMO_ASSERT(ss7_initialized);
+ LOGPAS(as, DLSS7, LOGL_INFO, "Destroying AS\n");
+
+ if (as->fi)
+ osmo_fsm_inst_term(as->fi, OSMO_FSM_TERM_REQUEST, NULL);
+
+ /* find any routes pointing to this AS and remove them */
+ llist_for_each_entry_safe(rt, rt2, &as->inst->rtable_system->routes, list) {
+ if (rt->dest.as == as)
+ osmo_ss7_route_destroy(rt);
+ }
+
+ as->inst = NULL;
+ llist_del(&as->list);
+ rate_ctr_group_free(as->ctrg);
+ talloc_free(as);
+}
+
+/*! \brief Determine if given AS contains ASP
+ * \param[in] as Application Server in which to look for \ref asp
+ * \param[in] asp Application Server Process to look for in \ref as
+ * \returns true in case \ref asp is part of \ref as; false otherwise */
+bool osmo_ss7_as_has_asp(const struct osmo_ss7_as *as,
+ const struct osmo_ss7_asp *asp)
+{
+ unsigned int i;
+
+ OSMO_ASSERT(ss7_initialized);
+ for (i = 0; i < ARRAY_SIZE(as->cfg.asps); i++) {
+ if (as->cfg.asps[i] == asp)
+ return true;
+ }
+ return false;
+}
+
+/*! Determine if given AS is in the active state.
+ * \param[in] as Application Server.
+ * \returns true in case as is active; false otherwise. */
+bool osmo_ss7_as_active(const struct osmo_ss7_as *as)
+{
+ if (!as->fi)
+ return false;
+ return as->fi->state == XUA_AS_S_ACTIVE;
+}
+
+/*! Determine if given AS is in the down state.
+ * \param[in] as Application Server.
+ * \returns true in case as is down; false otherwise. */
+bool osmo_ss7_as_down(const struct osmo_ss7_as *as)
+{
+ OSMO_ASSERT(as);
+
+ if (!as->fi)
+ return true;
+ return as->fi->state == XUA_AS_S_DOWN;
+}
diff --git a/src/ss7_internal.h b/src/ss7_internal.h
index 4539609..6449c5b 100644
--- a/src/ss7_internal.h
+++ b/src/ss7_internal.h
@@ -3,9 +3,11 @@
/* Internal header used by libosmo-sccp, not available publicly for lib users */
#include <stdbool.h>
+#include <stdint.h>
#include <osmocom/sigtran/osmo_ss7.h>
extern bool ss7_initialized;
+uint32_t ss7_find_free_l_rk_id(struct osmo_ss7_instance *inst);
bool ss7_ipv6_sctp_supported(const char *host, bool bind);
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/34590?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I6e39dcb594ffe918ba117fce08cae7b5a6fd2dcc
Gerrit-Change-Number: 34590
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmo-sccp/+/34588?usp=email
to look at the new patch set (#2).
Change subject: Split osmo_ss7_asp_peer functionalities to its own file
......................................................................
Split osmo_ss7_asp_peer functionalities to its own file
Change-Id: I4fe457dc0ee1e904e05423557cfba2505b315a75
---
M src/Makefile.am
M src/osmo_ss7_asp.c
A src/osmo_ss7_asp_peer.c
M src/ss7_internal.h
4 files changed, 247 insertions(+), 190 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/88/34588/2
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/34588?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I4fe457dc0ee1e904e05423557cfba2505b315a75
Gerrit-Change-Number: 34588
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset
daniel has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/34338?usp=email )
Change subject: stream_srv: Fix connection error handling
......................................................................
stream_srv: Fix connection error handling
If read returned an error or the stream got closed then simply destroy
the connection.
If the user code called osmo_stream_srv_set_flush_and_destroy() then
ignore any incoming messages and destroy the connection once the tx
queue is empty.
Change-Id: I84eea2717f3762830f3f5b115e6fc8545eaa4fd5
---
M src/stream_srv.c
1 file changed, 31 insertions(+), 12 deletions(-)
Approvals:
arehbein: Looks good to me, but someone else must approve
pespin: Looks good to me, but someone else must approve
daniel: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/stream_srv.c b/src/stream_srv.c
index ca22e1b..e789584 100644
--- a/src/stream_srv.c
+++ b/src/stream_srv.c
@@ -532,18 +532,22 @@
struct osmo_stream_srv *conn = osmo_iofd_get_data(iofd);
LOGSSRV(conn, LOGL_DEBUG, "message received (res=%d)\n", res);
- if (conn->flags & OSMO_STREAM_SRV_F_FLUSH_DESTROY) {
- LOGSSRV(conn, LOGL_INFO, "Connection is being flushed and closed; ignoring received message\n");
- msgb_free(msg);
- return;
- }
+ if (OSMO_UNLIKELY(res <= 0)) {
+ /* This connection is dead, destroy it. */
+ osmo_stream_srv_destroy(conn);
+ } else {
+ if (conn->flags & OSMO_STREAM_SRV_F_FLUSH_DESTROY) {
+ LOGSSRV(conn, LOGL_INFO, "Connection is being flushed and closed; ignoring received message\n");
+ msgb_free(msg);
+ if (osmo_iofd_txqueue_len(iofd) == 0)
+ osmo_stream_srv_destroy(conn);
+ return;
+ }
- if (res <= 0) {
- osmo_stream_srv_set_flush_and_destroy(conn);
- if (osmo_iofd_txqueue_len(iofd) == 0)
- osmo_stream_srv_destroy(conn);
- } else if (conn->iofd_read_cb) {
- conn->iofd_read_cb(conn, msg);
+ if (conn->iofd_read_cb)
+ conn->iofd_read_cb(conn, msg);
+ else
+ msgb_free(msg);
}
}
@@ -552,7 +556,7 @@
struct osmo_stream_srv *conn = osmo_iofd_get_data(iofd);
LOGSSRV(conn, LOGL_DEBUG, "connected write\n");
- if (res == -1)
+ if (res < 0)
LOGSSRV(conn, LOGL_ERROR, "error to send: %s\n", strerror(errno));
if (osmo_iofd_txqueue_len(iofd) == 0)
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/34338?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I84eea2717f3762830f3f5b115e6fc8545eaa4fd5
Gerrit-Change-Number: 34338
Gerrit-PatchSet: 3
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: arehbein <arehbein(a)sysmocom.de>
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: merged
Attention is currently required from: arehbein, laforge, pespin.
daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/34338?usp=email )
Change subject: stream_srv: Fix connection error handling
......................................................................
Patch Set 2: Code-Review+2
(2 comments)
File src/stream_srv.c:
https://gerrit.osmocom.org/c/libosmo-netif/+/34338/comment/0c46e7e2_d149368f
PS1, Line 493: if (conn->flags & OSMO_STREAM_SRV_F_FLUSH_DESTROY) {
> Yeah, most likely. @arehbein@sysmocom. […]
Done
File src/stream_srv.c:
https://gerrit.osmocom.org/c/libosmo-netif/+/34338/comment/0cf046d8_3ac4cca9
PS2, Line 494: conn
> How about logging an info message "Connection is being flushed and closed; will be ignoring any rece […]
I don't mind, though I don't think the amount of messages this will log would be that high.
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/34338?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I84eea2717f3762830f3f5b115e6fc8545eaa4fd5
Gerrit-Change-Number: 34338
Gerrit-PatchSet: 2
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: arehbein <arehbein(a)sysmocom.de>
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: arehbein <arehbein(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 29 Sep 2023 15:26:43 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: arehbein <arehbein(a)sysmocom.de>
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Comment-In-Reply-To: daniel <dwillmann(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: osmith, pespin.
dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/34575?usp=email )
Change subject: gprs_rlcmac_sched: check if we really use direct phy
......................................................................
Patch Set 3: Code-Review-2
(1 comment)
File src/gprs_rlcmac_sched.cpp:
https://gerrit.osmocom.org/c/osmo-pcu/+/34575/comment/4a645dd1_d004c084
PS2, Line 491: if (bts->trx[trx].fl1h) {
> > Osmo-bts would do this then. […]
As far as I can see your concerns might be right. When the data is traveling up from pcu_sock.c over l1sap.c it ends up in l1_if.c:bts_model_l1sap_down() of the respective BTS model. For osmo-bts-trx I can see the data is passed into trx_sched_ph_data_req(), which is our scheduler and I assume that this scheduler generates the idle frames.
For osmo-bts-sysmo I am not entirely sure but I see no mechanism that would substitute missing frames. When there is nothing coming up from the PCUIF, then no frame is scheduled into the phy.
In any case it may be that osmo-bts uses a BTS model that still requires a constant stream of MAC blocks from the PCU through the PCUIF interface. Maybe we could add the BTS model to struct gsm_pcu_if_info_ind, so that the PCU knows the exact BTS model it is dealing with. This does not have to be a string. It can just be an uint8_t used with enum values.
In osmo-pcu we then could set an appropriate flag in struct gprs_rlcmac_bts. And based on that flag we then would generate the idle frames or not. Eventually the fact if we generate idle frames or not would not strongly depend on whether we use a direct phy access or not. It would depend on the BTS model and if it is operated as direct phy or not but this is something that is highly model specific.
One additional advantage we could draw if we signal the BTS model type to osmo-pcu is that we can check if this model is even supported and reject it if necessary.
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/34575?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I0808950b1154bbb9a789c3f706ad9fb6618764ec
Gerrit-Change-Number: 34575
Gerrit-PatchSet: 3
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 29 Sep 2023 15:22:28 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: comment