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 -----
  • 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

April 2023

  • 1 participants
  • 2252 discussions
[S] Change in libosmo-gprs[master]: sm: Fix swapped endianness in struct gprs_sm_pdp_addr
by pespin 14 Apr '23

14 Apr '23
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/32314 ) Change subject: sm: Fix swapped endianness in struct gprs_sm_pdp_addr ...................................................................... sm: Fix swapped endianness in struct gprs_sm_pdp_addr Change-Id: Icd72bbe6d297bc583097c68d3cf86a616fabd36d --- M include/osmocom/gprs/sm/sm_private.h M tests/sm/sm_prim_test.ok 2 files changed, 14 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/14/32314/1 diff --git a/include/osmocom/gprs/sm/sm_private.h b/include/osmocom/gprs/sm/sm_private.h index e599759..7689947 100644 --- a/include/osmocom/gprs/sm/sm_private.h +++ b/include/osmocom/gprs/sm/sm_private.h @@ -43,8 +43,12 @@ struct gprs_sm_pdp_addr { #if OSMO_IS_LITTLE_ENDIAN + uint8_t organization:4, /* enum gprs_sm_pdp_addr_org */ + spare:4; +#elif OSMO_IS_BIG_ENDIAN uint8_t spare:4, organization:4; /* enum gprs_sm_pdp_addr_org */ +#endif uint8_t type; /* osmo_gprs_sm_pdp_addr_{etsi,ietf}_type */ union { /* IPv4 */ @@ -54,14 +58,6 @@ uint8_t addr6[16]; /* IPv4v6 */ -#elif OSMO_IS_BIG_ENDIAN -/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianness.py) */ - uint8_t organization:4, spare:4; - uint8_t type; - union { - uint32_t addr; - uint8_t addr6[16]; -#endif struct { uint32_t addr; uint8_t addr6[16]; diff --git a/tests/sm/sm_prim_test.ok b/tests/sm/sm_prim_test.ok index 82d4a97..fda8573 100644 --- a/tests/sm/sm_prim_test.ok +++ b/tests/sm/sm_prim_test.ok @@ -1,5 +1,5 @@ ==== 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 06 10 21 00 00 00 00 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 06 01 21 00 00 00 00 28 04 27 01 00 ] 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/+/32314 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: Icd72bbe6d297bc583097c68d3cf86a616fabd36d Gerrit-Change-Number: 32314 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in libosmo-gprs[master]: sm: Handle radio_prio,qos,llc_sapi in rx PDP Ctx Accept
by pespin 14 Apr '23

14 Apr '23
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/32316 ) Change subject: sm: Handle radio_prio,qos,llc_sapi in rx PDP Ctx Accept ...................................................................... sm: Handle radio_prio,qos,llc_sapi in rx PDP Ctx Accept Related: OS#5501 Change-Id: Icbd9ba82b6d8cbcfcaf5a80ddc801139c409c585 --- M include/osmocom/gprs/sm/sm_prim.h M include/osmocom/gprs/sm/sm_private.h M src/sm/sm.c 3 files changed, 26 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/16/32316/1 diff --git a/include/osmocom/gprs/sm/sm_prim.h b/include/osmocom/gprs/sm/sm_prim.h index 4f16ae4..86a36d2 100644 --- a/include/osmocom/gprs/sm/sm_prim.h +++ b/include/osmocom/gprs/sm/sm_prim.h @@ -82,6 +82,7 @@ enum osmo_gprs_sm_pdp_addr_ietf_type pdp_addr_ietf_type; struct osmo_sockaddr pdp_addr_v4; struct osmo_sockaddr pdp_addr_v6; + uint8_t radio_prio; /* TS 24.008 10.5.7.2 */ uint8_t qos[OSMO_GPRS_SM_QOS_MAXLEN]; uint8_t qos_len; } acc; diff --git a/include/osmocom/gprs/sm/sm_private.h b/include/osmocom/gprs/sm/sm_private.h index c727cd2..56b3e4f 100644 --- a/include/osmocom/gprs/sm/sm_private.h +++ b/include/osmocom/gprs/sm/sm_private.h @@ -103,6 +103,7 @@ struct osmo_sockaddr pdp_addr_v4; struct osmo_sockaddr pdp_addr_v6; + uint8_t radio_prio; /* TS 24.008 10.5.7.2 */ uint8_t qos[OSMO_GPRS_SM_QOS_MAXLEN]; uint8_t qos_len; diff --git a/src/sm/sm.c b/src/sm/sm.c index d760ae6..c57ef3f 100644 --- a/src/sm/sm.c +++ b/src/sm/sm.c @@ -212,6 +212,10 @@ sm_prim_tx->smreg.pdp_act_cnf.acc.pdp_addr_ietf_type = sme->pdp_addr_ietf_type; memcpy(&sm_prim_tx->smreg.pdp_act_cnf.acc.pdp_addr_v4, &sme->pdp_addr_v4, sizeof(sme->pdp_addr_v4)); memcpy(&sm_prim_tx->smreg.pdp_act_cnf.acc.pdp_addr_v6, &sme->pdp_addr_v6, sizeof(sme->pdp_addr_v6)); + sm_prim_tx->smreg.pdp_act_cnf.acc.radio_prio = sme->radio_prio; + 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); } else { sm_prim_tx->smreg.pdp_act_cnf.rej.cause = cause; } @@ -269,10 +273,8 @@ { struct tlv_parsed tp; int rc; - uint8_t radio_prio, llc_sapi; uint8_t *ofs = (uint8_t *)gh; uint8_t qos_len; - uint8_t *qos; ofs += sizeof(*gh); //uint8_t transaction_id = gsm48_hdr_trans_id(gh); @@ -281,22 +283,25 @@ if (len < (ofs + 2) - (uint8_t *)gh) goto tooshort; - llc_sapi = *ofs++; + sme->llc_sapi = *ofs++; qos_len = *ofs++; + if (qos_len > ARRAY_SIZE(sme->qos)) { + LOGSME(sme, LOGL_ERROR, + "Rx SM Activate PDP Context Accept: QoS size too big! %u\n", qos_len); + goto rejected; + } + if (len < (ofs + qos_len) - (uint8_t *)gh) goto tooshort; - qos = ofs; + memcpy(sme->qos, ofs, qos_len); + ofs += qos_len; if (len < (ofs + 1) - (uint8_t *)gh) goto tooshort; - radio_prio = *ofs++; - - (void)llc_sapi; - (void)qos; - (void)radio_prio; + sme->radio_prio = *ofs++; if (len > ofs - (uint8_t *)gh) { rc = gprs_sm_tlv_parse(&tp, ofs, len - (ofs - (uint8_t *)gh)); -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/32316 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: Icbd9ba82b6d8cbcfcaf5a80ddc801139c409c585 Gerrit-Change-Number: 32316 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in libosmo-gprs[master]: sm: Parse PDP address in rx PDP Ctx Accept
by pespin 14 Apr '23

14 Apr '23
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/32315 ) Change subject: sm: Parse PDP address in rx PDP Ctx Accept ...................................................................... sm: Parse PDP address in rx PDP Ctx Accept Related: OS#5501 Change-Id: Ic41edc14445f0f5d4ef20bb30b53d66fb56435de --- M include/osmocom/gprs/sm/sm_pdu.h M include/osmocom/gprs/sm/sm_prim.h M src/sm/sm.c M src/sm/sm_pdu.c 4 files changed, 118 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/15/32315/1 diff --git a/include/osmocom/gprs/sm/sm_pdu.h b/include/osmocom/gprs/sm/sm_pdu.h index 50e3ae9..d144f6e 100644 --- a/include/osmocom/gprs/sm/sm_pdu.h +++ b/include/osmocom/gprs/sm/sm_pdu.h @@ -2,8 +2,11 @@ #pragma once #include <osmocom/core/msgb.h> +#include <osmocom/core/socket.h> #include <osmocom/gsm/tlv.h> +#include <osmocom/gprs/sm/sm.h> + struct gprs_gmm_entity; #define GPRS_SM_ALLOC_SIZE 2048 @@ -15,3 +18,8 @@ int gprs_sm_build_act_pdp_ctx_req(struct gprs_sm_entity *sme, struct msgb *msg); +int gprs_sm_pdp_addr_dec(const struct gprs_sm_pdp_addr *pdp_addr, + uint16_t pdp_addr_len, + enum osmo_gprs_sm_pdp_addr_ietf_type *pdp_addr_ietf_type, + struct osmo_sockaddr *osa4, + struct osmo_sockaddr *osa6); diff --git a/include/osmocom/gprs/sm/sm_prim.h b/include/osmocom/gprs/sm/sm_prim.h index 575ea80..4f16ae4 100644 --- a/include/osmocom/gprs/sm/sm_prim.h +++ b/include/osmocom/gprs/sm/sm_prim.h @@ -79,7 +79,9 @@ uint8_t pco_len; union { struct { - struct osmo_sockaddr pdp_addr; + enum osmo_gprs_sm_pdp_addr_ietf_type pdp_addr_ietf_type; + struct osmo_sockaddr pdp_addr_v4; + struct osmo_sockaddr pdp_addr_v6; uint8_t qos[OSMO_GPRS_SM_QOS_MAXLEN]; uint8_t qos_len; } acc; diff --git a/src/sm/sm.c b/src/sm/sm.c index b3d65da..d760ae6 100644 --- a/src/sm/sm.c +++ b/src/sm/sm.c @@ -208,8 +208,13 @@ sm_prim_tx->smreg.ms_id = sme->ms->ms_id; sm_prim_tx->smreg.pdp_act_cnf.accepted = (cause != 0); sm_prim_tx->smreg.pdp_act_cnf.nsapi = sme->nsapi; - if (!sm_prim_tx->smreg.pdp_act_cnf.accepted) + if (sm_prim_tx->smreg.pdp_act_cnf.accepted) { + sm_prim_tx->smreg.pdp_act_cnf.acc.pdp_addr_ietf_type = sme->pdp_addr_ietf_type; + memcpy(&sm_prim_tx->smreg.pdp_act_cnf.acc.pdp_addr_v4, &sme->pdp_addr_v4, sizeof(sme->pdp_addr_v4)); + memcpy(&sm_prim_tx->smreg.pdp_act_cnf.acc.pdp_addr_v6, &sme->pdp_addr_v6, sizeof(sme->pdp_addr_v6)); + } else { sm_prim_tx->smreg.pdp_act_cnf.rej.cause = cause; + } rc = gprs_sm_prim_call_up_cb(sm_prim_tx); return rc; @@ -289,16 +294,28 @@ radio_prio = *ofs++; - rc = gprs_sm_tlv_parse(&tp, ofs, len - (ofs - (uint8_t *)gh)); - if (rc < 0) { - LOGSME(sme, LOGL_ERROR, "Rx SM Activate PDP Context Accept: failed to parse TLVs %d\n", rc); - goto rejected; - } - (void)llc_sapi; (void)qos; (void)radio_prio; + if (len > ofs - (uint8_t *)gh) { + rc = gprs_sm_tlv_parse(&tp, ofs, len - (ofs - (uint8_t *)gh)); + if (rc < 0) { + LOGSME(sme, LOGL_ERROR, "Rx SM Activate PDP Context Accept: failed to parse TLVs %d\n", rc); + goto rejected; + } + + if (TLVP_PRESENT(&tp, GSM48_IE_GSM_PDP_ADDR)) { + rc = gprs_sm_pdp_addr_dec( + (const struct gprs_sm_pdp_addr *)TLVP_VAL(&tp, GSM48_IE_GSM_PDP_ADDR), + TLVP_LEN(&tp, GSM48_IE_GSM_PDP_ADDR), + &sme->pdp_addr_ietf_type, + &sme->pdp_addr_v4, &sme->pdp_addr_v6); + if (rc < 0) + goto rejected; + } + } + rc = osmo_fsm_inst_dispatch(sme->ms_fsm.fi, GPRS_SM_MS_EV_RX_ACT_PDP_CTX_ACC, NULL); if (rc < 0) goto rejected; diff --git a/src/sm/sm_pdu.c b/src/sm/sm_pdu.c index 3498a9c..e866a33 100644 --- a/src/sm/sm_pdu.c +++ b/src/sm/sm_pdu.c @@ -24,6 +24,7 @@ #include <osmocom/core/msgb.h> #include <osmocom/core/bitvec.h> #include <osmocom/core/endian.h> +#include <osmocom/core/socket.h> #include <osmocom/gsm/tlv.h> #include <osmocom/gsm/protocol/gsm_04_08.h> #include <osmocom/gsm/protocol/gsm_04_08_gprs.h> @@ -80,6 +81,78 @@ } } +int gprs_sm_pdp_addr_dec(const struct gprs_sm_pdp_addr *pdp_addr, + uint16_t pdp_addr_len, + enum osmo_gprs_sm_pdp_addr_ietf_type *pdp_addr_ietf_type, + struct osmo_sockaddr *osa4, + struct osmo_sockaddr *osa6) +{ + + OSMO_ASSERT(pdp_addr); + OSMO_ASSERT(pdp_addr_ietf_type); + OSMO_ASSERT(osa4); + OSMO_ASSERT(osa6); + + memset(osa4, 0, sizeof(*osa4)); + memset(osa6, 0, sizeof(*osa6)); + osa4->u.sa.sa_family = AF_UNSPEC; + osa6->u.sa.sa_family = AF_UNSPEC; + + switch (pdp_addr->organization) { + case GPRS_SM_PDP_ADDR_ORG_IETF: + break; + case GPRS_SM_PDP_ADDR_ORG_ETSI: + default: + LOGSM(LOGL_INFO, "Unsupported PDP address organization %u\n", pdp_addr->organization); + return -EINVAL; + } + + pdp_addr_len -= 2; + switch (pdp_addr->type) { + case OSMO_GPRS_SM_PDP_ADDR_IETF_IPV4: + if (pdp_addr_len == sizeof(pdp_addr->addr)) { + osa4->u.sa.sa_family = AF_INET; + osa4->u.sin.sin_addr.s_addr = pdp_addr->addr; + } else if (pdp_addr_len != 0) { + LOGSM(LOGL_INFO, "Wrong IPv4 PDP address length %u\n", pdp_addr_len); + return -EINVAL; + } + break; + case OSMO_GPRS_SM_PDP_ADDR_IETF_IPV6: + if (pdp_addr_len == sizeof(pdp_addr->addr6)) { + osa6->u.sa.sa_family = AF_INET6; + memcpy(osa6->u.sin6.sin6_addr.s6_addr, pdp_addr->addr6, sizeof(pdp_addr->addr6)); + } else if (pdp_addr_len != 0) { + LOGSM(LOGL_INFO, "Wrong IPv6 PDP address length %u\n", pdp_addr_len); + return -EINVAL; + } + break; + case OSMO_GPRS_SM_PDP_ADDR_IETF_IPV4V6: + if (pdp_addr_len == sizeof(pdp_addr->addr)) { + osa4->u.sa.sa_family = AF_INET; + osa4->u.sin.sin_addr.s_addr = pdp_addr->both.addr; + } else if (pdp_addr_len == sizeof(pdp_addr->both.addr6)) { + osa6->u.sa.sa_family = AF_INET6; + memcpy(osa6->u.sin6.sin6_addr.s6_addr, pdp_addr->both.addr6, sizeof(pdp_addr->both.addr6)); + } else if (pdp_addr_len == sizeof(pdp_addr->both)) { + osa4->u.sa.sa_family = AF_INET; + osa4->u.sin.sin_addr.s_addr = pdp_addr->both.addr; + osa6->u.sa.sa_family = AF_INET6; + memcpy(osa6->u.sin6.sin6_addr.s6_addr, pdp_addr->both.addr6, sizeof(pdp_addr->both.addr6)); + } else if (pdp_addr_len != 0) { + LOGSM(LOGL_INFO, "Wrong IPv4v6 PDP address length %u\n", pdp_addr_len); + return -EINVAL; + } + break; + default: + LOGSM(LOGL_INFO, "No IPv4 or IPv6\n"); + return -EINVAL; + } + *pdp_addr_ietf_type = pdp_addr->type; + + return 0; +} + /* Chapter 9.4.1: Attach request */ int gprs_sm_build_act_pdp_ctx_req(struct gprs_sm_entity *sme, struct msgb *msg) -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/32315 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: Ic41edc14445f0f5d4ef20bb30b53d66fb56435de Gerrit-Change-Number: 32315 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in libosmo-pfcp[master]: pfcp_msg: refactor LOG_PFCP_MSG
by laforge 14 Apr '23

14 Apr '23
Attention is currently required from: neels. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-pfcp/+/32173 ) Change subject: pfcp_msg: refactor LOG_PFCP_MSG ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-pfcp/+/32173 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-pfcp Gerrit-Branch: master Gerrit-Change-Id: Ic84090c9b1a34185577cfb2ea1efa9c07542df34 Gerrit-Change-Number: 32173 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Comment-Date: Fri, 14 Apr 2023 16:08:27 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-gsm-manuals[master]: add static SS7 routing example to cs7-config.adoc
by laforge 14 Apr '23

14 Apr '23
Attention is currently required from: neels, pespin. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/32273 ) Change subject: add static SS7 routing example to cs7-config.adoc ...................................................................... Patch Set 1: (3 comments) File common/chapters/cs7-config.adoc: https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/32273/comment/e4bee954_c7e6… PS1, Line 349: Osmocom SS7 supports dynamic routing, allowing minimal SS7 configuration. If all of your components support dynamic > dynamic routing through Routing Key Management (RKM) I'd do a s/dynamic routing/dynamic routing key management/ all over the text. That's what's "dynamic" after all. not the routing itself, but the management of routing keys. Alternatively, even more explicit: "dynamic routing key registration via M3UA RKM" is an equally explicit description that any reader familiar with the M3UA spec should understand. https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/32273/comment/b13d9691_aa02… PS1, Line 365: Every component has a distinct M3UA port. For I don't follow why that would be the case? Are you describing a setup a) without routing context (clearly not) b) with routing context but without RKM c) with routing context and static (non-dynamic) RKM (I think so) d) with routing context and dynamic RKM In cases c+d, I don't see why there would be a need for hard-coding the m3ua port numbers? In both of these, the client performs RKM registration - the difference should only be that on 'b' they are statically configured on both sides, and in case 'd' they are dynamically created. In cases a + b, there indeed is nothig except the 5-tuple (src_ip,src_port,dst_ip,dst_port,proto==sctp) to identify a given ASP, and hence it must be hardcoded. https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/32273/comment/a28f93e0_dce4… PS1, Line 454: synchronize I would replace synchronize with "manually configure", as "synchronize" might refer to some kind of (even an automatic) synchronization procedure. -- To view, visit https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/32273 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-manuals Gerrit-Branch: master Gerrit-Change-Id: I44afddf7004f5bf37eec706ca3da12c04f83f8fa Gerrit-Change-Number: 32273 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-CC: msuraev <msuraev(a)sysmocom.de> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Fri, 14 Apr 2023 15:48:25 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmocom-bb[master]: trxcon/l1sched: use RSL_CHAN_NR_MASK from libosmogsm
by fixeria 14 Apr '23

14 Apr '23
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/32305 ) Change subject: trxcon/l1sched: use RSL_CHAN_NR_MASK from libosmogsm ...................................................................... trxcon/l1sched: use RSL_CHAN_NR_MASK from libosmogsm Change-Id: Ibec43dcd4acc104ab5f1930112db6fe9aff917a1 Related: OS#5500 --- M src/host/trxcon/src/sched_trx.c 1 file changed, 12 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/host/trxcon/src/sched_trx.c b/src/host/trxcon/src/sched_trx.c index 49dadd2..12c6385 100644 --- a/src/host/trxcon/src/sched_trx.c +++ b/src/host/trxcon/src/sched_trx.c @@ -439,7 +439,7 @@ llist_for_each_entry(lchan, &ts->lchans, list) { lchan_desc = &l1sched_lchan_desc[lchan->type]; - if (lchan_desc->chan_nr == (chan_nr & 0xf8)) { + if (lchan_desc->chan_nr == (chan_nr & RSL_CHAN_NR_MASK)) { if (active) { rc |= l1sched_activate_lchan(ts, lchan->type); lchan->tch_mode = tch_mode; @@ -642,7 +642,7 @@ /* Iterate over all known lchan types */ for (i = 0; i < _L1SCHED_CHAN_MAX; i++) - if (l1sched_lchan_desc[i].chan_nr == (chan_nr & 0xf8)) + if (l1sched_lchan_desc[i].chan_nr == (chan_nr & RSL_CHAN_NR_MASK)) if (l1sched_lchan_desc[i].link_id == link_id) return i; -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/32305 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ibec43dcd4acc104ab5f1930112db6fe9aff917a1 Gerrit-Change-Number: 32305 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(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 osmocom-bb[master]: trxcon/l1sched: add l1sched_find_lchan_by_chan_nr()
by fixeria 14 Apr '23

14 Apr '23
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/32303 ) Change subject: trxcon/l1sched: add l1sched_find_lchan_by_chan_nr() ...................................................................... trxcon/l1sched: add l1sched_find_lchan_by_chan_nr() Change-Id: I9917a932c9a4aeb4b3ef7053bd58066b3aa41edb Related: OS#5500 --- M src/host/trxcon/include/osmocom/bb/l1sched/l1sched.h M src/host/trxcon/src/sched_trx.c 2 files changed, 34 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/host/trxcon/include/osmocom/bb/l1sched/l1sched.h b/src/host/trxcon/include/osmocom/bb/l1sched/l1sched.h index 7f7e96d..4728f41 100644 --- a/src/host/trxcon/include/osmocom/bb/l1sched/l1sched.h +++ b/src/host/trxcon/include/osmocom/bb/l1sched/l1sched.h @@ -438,6 +438,8 @@ int l1sched_deactivate_lchan(struct l1sched_ts *ts, enum l1sched_lchan_type chan); struct l1sched_lchan_state *l1sched_find_lchan_by_type(struct l1sched_ts *ts, enum l1sched_lchan_type type); +struct l1sched_lchan_state *l1sched_find_lchan_by_chan_nr(struct l1sched_state *sched, + uint8_t chan_nr, uint8_t link_id); /* Primitive management functions */ struct l1sched_ts_prim *l1sched_prim_push(struct l1sched_state *sched, diff --git a/src/host/trxcon/src/sched_trx.c b/src/host/trxcon/src/sched_trx.c index 12c6385..376fec1 100644 --- a/src/host/trxcon/src/sched_trx.c +++ b/src/host/trxcon/src/sched_trx.c @@ -425,6 +425,28 @@ return NULL; } +struct l1sched_lchan_state *l1sched_find_lchan_by_chan_nr(struct l1sched_state *sched, + uint8_t chan_nr, uint8_t link_id) +{ + const struct l1sched_ts *ts = sched->ts[chan_nr & 0x07]; + const struct l1sched_lchan_desc *lchan_desc; + struct l1sched_lchan_state *lchan; + + if (ts == NULL) + return NULL; + + llist_for_each_entry(lchan, &ts->lchans, list) { + lchan_desc = &l1sched_lchan_desc[lchan->type]; + if (lchan_desc->chan_nr != (chan_nr & RSL_CHAN_NR_MASK)) + continue; + if (lchan_desc->link_id != link_id) + continue; + return lchan; + } + + return NULL; +} + int l1sched_set_lchans(struct l1sched_ts *ts, uint8_t chan_nr, int active, uint8_t tch_mode, uint8_t tsc) { -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/32303 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I9917a932c9a4aeb4b3ef7053bd58066b3aa41edb Gerrit-Change-Number: 32303 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(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-CC: msuraev <msuraev(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in osmocom-bb[master]: trxcon/l1sched: add l1sched_find_lchan_by_chan_nr()
by laforge 14 Apr '23

14 Apr '23
Attention is currently required from: fixeria, msuraev. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/32303 ) Change subject: trxcon/l1sched: add l1sched_find_lchan_by_chan_nr() ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/32303 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I9917a932c9a4aeb4b3ef7053bd58066b3aa41edb Gerrit-Change-Number: 32303 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: msuraev <msuraev(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: msuraev <msuraev(a)sysmocom.de> Gerrit-Comment-Date: Fri, 14 Apr 2023 15:38:06 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmocom-bb[master]: trxcon/l1sched: use RSL_CHAN_NR_MASK from libosmogsm
by laforge 14 Apr '23

14 Apr '23
Attention is currently required from: fixeria. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/32305 ) Change subject: trxcon/l1sched: use RSL_CHAN_NR_MASK from libosmogsm ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/32305 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ibec43dcd4acc104ab5f1930112db6fe9aff917a1 Gerrit-Change-Number: 32305 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Fri, 14 Apr 2023 15:37:44 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-pcu[master]: pcu_l1_if: replace magic numbers with IMSI_DIGITS_FOR_PAGING
by laforge 14 Apr '23

14 Apr '23
Attention is currently required from: dexter. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/32307 ) Change subject: pcu_l1_if: replace magic numbers with IMSI_DIGITS_FOR_PAGING ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/32307 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I9a1b6ba4578e2a8875d8d1a9e56c36dc2b33fe0d Gerrit-Change-Number: 32307 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Fri, 14 Apr 2023 15:37:30 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • ...
  • 226
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.