lists.osmocom.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
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
List overview
Download
gerrit-log
June 2024
----- 2025 -----
June 2025
May 2025
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
gerrit-log@lists.osmocom.org
1 participants
1566 discussions
Start a n
N
ew thread
[M] Change in osmo-ttcn3-hacks[master]: s1ap: add {enc,dec}_S1AP_Global_ENB_ID() API
by fixeria
fixeria has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37226?usp=email
) Change subject: s1ap: add {enc,dec}_S1AP_Global_ENB_ID() API ...................................................................... s1ap: add {enc,dec}_S1AP_Global_ENB_ID() API Change-Id: I856fd426b92046dcae72149f46737da3e1b65219 --- M library/s1ap/S1AP_EncDec.cc M library/s1ap/S1AP_Types.ttcn M mme/MME_Tests.ttcn 3 files changed, 35 insertions(+), 29 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/26/37226/1 diff --git a/library/s1ap/S1AP_EncDec.cc b/library/s1ap/S1AP_EncDec.cc index 6f82b2b..077ec31 100644 --- a/library/s1ap/S1AP_EncDec.cc +++ b/library/s1ap/S1AP_EncDec.cc @@ -30,4 +30,26 @@ return pdu; } +OCTETSTRING enc__S1AP__Global__ENB__ID(const S1AP__IEs::Global__ENB__ID &ie) +{ + TTCN_Buffer buf; + + buf.clear(); + ie.encode(S1AP__IEs::Global__ENB__ID_descr_, buf, + TTCN_EncDec::CT_PER, PER_ALIGNED); + return OCTETSTRING(buf.get_len(), buf.get_data()); +} + +S1AP__IEs::Global__ENB__ID dec__S1AP__Global__ENB__ID(const OCTETSTRING &stream) +{ + S1AP__IEs::Global__ENB__ID ie; + TTCN_Buffer buf; + + buf.clear(); + buf.put_os(stream); + ie.decode(S1AP__IEs::Global__ENB__ID_descr_, buf, + TTCN_EncDec::CT_PER, PER_ALIGNED); + return ie; +} + } diff --git a/library/s1ap/S1AP_Types.ttcn b/library/s1ap/S1AP_Types.ttcn index 6730ff3..5d0ecbe 100644 --- a/library/s1ap/S1AP_Types.ttcn +++ b/library/s1ap/S1AP_Types.ttcn @@ -1,7 +1,11 @@ module S1AP_Types { import from S1AP_PDU_Descriptions language "ASN.1:1997" all; + import from S1AP_IEs language "ASN.1:1997" all; external function enc_S1AP_PDU(in S1AP_PDU pdu) return octetstring; external function dec_S1AP_PDU(in octetstring stream) return S1AP_PDU; + + external function enc_S1AP_Global_ENB_ID(in Global_ENB_ID ie) return octetstring; + external function dec_S1AP_Global_ENB_ID(in octetstring stream) return Global_ENB_ID; } diff --git a/mme/MME_Tests.ttcn b/mme/MME_Tests.ttcn index 3ea17dd..931ad91 100644 --- a/mme/MME_Tests.ttcn +++ b/mme/MME_Tests.ttcn @@ -124,35 +124,6 @@ var UeParams g_ue_pars[NUM_UE]; } -/* Encode an S1AP Global-ENB-ID into an octetstring */ -private function enc_S1AP_Global_ENB_ID(Global_ENB_ID global_enb_id) return octetstring { - - /* Due to the limitations of libfftranscode, we can not define encoders (or decoders) for individual - * information elements (in S1AP_Types.cc). Unfortuantely Global-ENB-ID also appears in BSSGP in its - * encoded form. (see also: GTP-C 3GPP TS 48.018, section 11.3.70). To encode a given Global-ENB-ID - * we craft a full S1AP PDU and encode it. Then we can cut out the encoded Global-ENB-ID from the - * generated octetstring. */ - - var SupportedTAs supported_tas_dummy := {{ - tAC := '0000'O, - broadcastPLMNs := { '00f000'O }, - iE_Extensions := omit - }}; - var octetstring encoded; - var integer global_enb_id_len; - - if (ispresent(global_enb_id.eNB_ID.macroENB_ID)) { - global_enb_id_len := 8; - } else { - /* All other ENB ID types fit into 8 byte (homeENB_ID, short_macroENB_ID, long_macroENB_ID) */ - global_enb_id_len := 9; - } - - encoded := enc_S1AP_PDU(valueof(ts_S1AP_SetupReq(global_enb_id, supported_tas_dummy, v32))); - - return substr(encoded, 11, global_enb_id_len); -} - type component ConnHdlr extends S1AP_ConnHdlr, SGsAP_ConnHdlr, DIAMETER_ConnHdlr, GTP_ConnHdlr, GTP2_ConnHdlr { var ConnHdlrPars g_pars; timer g_Tguard := 30.0; -- To view, visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37226?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I856fd426b92046dcae72149f46737da3e1b65219 Gerrit-Change-Number: 37226 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 year
1
0
0
0
[L] Change in osmo-ttcn3-hacks[master]: {hnbap,ranap,rua,s1ap,sabp,sbcap}: use TITAN's ASN.1 PER codec
by fixeria
fixeria has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37225?usp=email
) Change subject: {hnbap,ranap,rua,s1ap,sabp,sbcap}: use TITAN's ASN.1 PER codec ...................................................................... {hnbap,ranap,rua,s1ap,sabp,sbcap}: use TITAN's ASN.1 PER codec TITAN version 10.0.0 finally brings support for the ASN.1 PER codec. Drop libfftranscode dependency, use TTCN_EncDec::CT_PER / PER_ALIGNED. Change-Id: I990a9c01d965e185fc64bd751ea0685e5d3b869c --- M cbc/regen_makefile.sh M hnbgw/regen_makefile.sh M hnodeb/regen_makefile.sh M library/hnbap/HNBAP_EncDec.cc M library/hnbap/regen_makefile.sh M library/ranap/RANAP_EncDec.cc M library/ranap/regen_makefile.sh M library/rua/RUA_EncDec.cc M library/rua/regen_makefile.sh M library/s1ap/S1AP_EncDec.cc M library/s1ap/regen_makefile.sh M library/sabp/SABP_EncDec.cc M library/sabp/regen_makefile.sh M library/sbcap/SBC_AP_EncDec.cc M library/sbcap/regen_makefile.sh M mme/regen_makefile.sh M msc/regen_makefile.sh M s1gw/regen_makefile.sh M sgsn/regen_makefile.sh 19 files changed, 98 insertions(+), 310 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/25/37225/1 diff --git a/cbc/regen_makefile.sh b/cbc/regen_makefile.sh index 96900b3..56da962 100755 --- a/cbc/regen_makefile.sh +++ b/cbc/regen_makefile.sh @@ -28,5 +28,3 @@ " ../regen-makefile.sh -e $NAME $FILES - -sed -i -e 's/^LINUX_LIBS = -lxml2/LINUX_LIBS = -lxml2 -lfftranscode/' Makefile diff --git a/hnbgw/regen_makefile.sh b/hnbgw/regen_makefile.sh index 13db985..2f5ab1a 100755 --- a/hnbgw/regen_makefile.sh +++ b/hnbgw/regen_makefile.sh @@ -37,5 +37,3 @@ " ../regen-makefile.sh -e $NAME $FILES - -sed -i -e 's/^LINUX_LIBS = -lxml2 -lsctp/LINUX_LIBS = -lxml2 -lsctp -lfftranscode/' Makefile diff --git a/hnodeb/regen_makefile.sh b/hnodeb/regen_makefile.sh index cf5fed3..91603d0 100755 --- a/hnodeb/regen_makefile.sh +++ b/hnodeb/regen_makefile.sh @@ -36,5 +36,3 @@ " ../regen-makefile.sh -e $NAME $FILES - -sed -i -e 's/^LINUX_LIBS = -lxml2 -lsctp/LINUX_LIBS = -lxml2 -lsctp -lfftranscode/' Makefile diff --git a/library/hnbap/HNBAP_EncDec.cc b/library/hnbap/HNBAP_EncDec.cc index 37d764f..eaf1013 100644 --- a/library/hnbap/HNBAP_EncDec.cc +++ b/library/hnbap/HNBAP_EncDec.cc @@ -1,11 +1,8 @@ - -#include <string.h> -#include <stdarg.h> #include "HNBAP_PDU_Descriptions.hh" -extern "C" { -#include <fftranscode/transcode.h> -} +/* 3GPP TS 25.469, section 9.4 Message transfer syntax: + * HNBAP shall use the ASN.1 Basic Packed Encoding Rules (BASIC-PER) Aligned Variant + * as transfer syntax as specified in ref. ITU-T Rec. X.691 */ namespace HNBAP__Types { @@ -13,52 +10,24 @@ OCTETSTRING enc__HNBAP__PDU(const HNBAP__PDU__Descriptions::HNBAP__PDU &pdu) { - uint8_t *aper_buf; - int aper_buf_len; - TTCN_Buffer TTCN_buf; - TTCN_buf.clear(); + TTCN_Buffer buf; - /* Encode from abstract data type into BER/DER */ - pdu.encode(HNBAP__PDU__Descriptions::HNBAP__PDU_descr_, TTCN_buf, - TTCN_EncDec::CT_BER, BER_ENCODE_DER); - - aper_buf_len = fftranscode_ber2aper(FFTRANSC_T_HNBAP, &aper_buf, TTCN_buf.get_data(), TTCN_buf.get_len()); - if (aper_buf_len < 0) { - TTCN_error("fftranscode failed."); - } - - /* make octetstring from output buffer */ - OCTETSTRING ret_val(aper_buf_len, aper_buf); - - /* release dynamically-allocated output buffer */ - fftranscode_free(aper_buf); - - return ret_val; + buf.clear(); + pdu.encode(HNBAP__PDU__Descriptions::HNBAP__PDU_descr_, buf, + TTCN_EncDec::CT_PER, PER_ALIGNED); + return OCTETSTRING(buf.get_len(), buf.get_data()); } HNBAP__PDU__Descriptions::HNBAP__PDU dec__HNBAP__PDU(const OCTETSTRING &stream) { - uint8_t *ber_buf; - int ber_buf_len; - - /* First, decode APER + re-encode as BER */ - ber_buf_len = fftranscode_aper2ber(FFTRANSC_T_HNBAP, &ber_buf, (const unsigned char *)stream, stream.lengthof()); - if (ber_buf_len < 0) { - TTCN_error("fftranscode failed."); - } - - /* Then, re-encode from BER to TITAN representation */ - HNBAP__PDU__Descriptions::HNBAP__PDU ret_dcc; + HNBAP__PDU__Descriptions::HNBAP__PDU pdu; TTCN_Buffer TTCN_buf; + TTCN_buf.clear(); - TTCN_buf.put_s(ber_buf_len, ber_buf); - - ret_dcc.decode(HNBAP__PDU__Descriptions::HNBAP__PDU_descr_, TTCN_buf, - TTCN_EncDec::CT_BER, BER_ACCEPT_ALL); - - fftranscode_free(ber_buf); - - return ret_dcc; + TTCN_buf.put_os(stream); + pdu.decode(HNBAP__PDU__Descriptions::HNBAP__PDU_descr_, TTCN_buf, + TTCN_EncDec::CT_PER, PER_ALIGNED); + return pdu; } } diff --git a/library/hnbap/regen_makefile.sh b/library/hnbap/regen_makefile.sh index 4da6872..02e7fae 100755 --- a/library/hnbap/regen_makefile.sh +++ b/library/hnbap/regen_makefile.sh @@ -3,7 +3,3 @@ FILES="*.asn *.ttcn HNBAP_EncDec.cc" ../../regen-makefile.sh $FILES - -sed -i -e '/^CPPFLAGS/ s/$/ `pkg-config --cflags libfftranscode`/' Makefile -sed -i -e '/^LDFLAGS/ s/$/ `pkg-config --libs libfftranscode`/' Makefile -sed -i -e '/^LINUX_LIBS/ s/$/ `pkg-config --libs libfftranscode`/' Makefile diff --git a/library/ranap/RANAP_EncDec.cc b/library/ranap/RANAP_EncDec.cc index 7626b7b..5cee694 100644 --- a/library/ranap/RANAP_EncDec.cc +++ b/library/ranap/RANAP_EncDec.cc @@ -1,11 +1,8 @@ - -#include <string.h> -#include <stdarg.h> #include "RANAP_PDU_Descriptions.hh" -extern "C" { -#include <fftranscode/transcode.h> -} +/* 3GPP TS 25.413, section 9.4 Message transfer syntax: + * RANAP shall use the ASN.1 Basic Packed Encoding Rules (BASIC-PER) Aligned Variant + * as transfer syntax as specified in ref. ITU-T Rec. X.691 */ namespace RANAP__Types { @@ -13,54 +10,24 @@ OCTETSTRING enc__RANAP__PDU(const RANAP__PDU__Descriptions::RANAP__PDU &pdu) { - uint8_t *aper_buf; - int aper_buf_len; - TTCN_Buffer TTCN_buf; - TTCN_buf.clear(); + TTCN_Buffer buf; - /* Encode from abstract data type into BER/DER */ - pdu.encode(RANAP__PDU__Descriptions::RANAP__PDU_descr_, TTCN_buf, - TTCN_EncDec::CT_BER, BER_ENCODE_DER); - - aper_buf_len = fftranscode_ber2aper(FFTRANSC_T_RANAP, &aper_buf, TTCN_buf.get_data(), TTCN_buf.get_len()); - if (aper_buf_len < 0) { - TTCN_Logger::begin_event_log2str(); - TTCN_buf.log(); - TTCN_error("fftranscode_ber2aper failed: %s", (const char *) TTCN_Logger::end_event_log2str()); - } - - /* make octetstring from output buffer */ - OCTETSTRING ret_val(aper_buf_len, aper_buf); - - /* release dynamically-allocated output buffer */ - fftranscode_free(aper_buf); - - return ret_val; + buf.clear(); + pdu.encode(RANAP__PDU__Descriptions::RANAP__PDU_descr_, buf, + TTCN_EncDec::CT_PER, PER_ALIGNED); + return OCTETSTRING(buf.get_len(), buf.get_data()); } RANAP__PDU__Descriptions::RANAP__PDU dec__RANAP__PDU(const OCTETSTRING &stream) { - uint8_t *ber_buf; - int ber_buf_len; - - /* First, decode APER + re-encode as BER */ - ber_buf_len = fftranscode_aper2ber(FFTRANSC_T_RANAP, &ber_buf, (const unsigned char *)stream, stream.lengthof()); - if (ber_buf_len < 0) { - TTCN_error("fftranscode_aper2ber failed."); - } - - /* Then, re-encode from BER to TITAN representation */ - RANAP__PDU__Descriptions::RANAP__PDU ret_dcc; + RANAP__PDU__Descriptions::RANAP__PDU pdu; TTCN_Buffer TTCN_buf; + TTCN_buf.clear(); - TTCN_buf.put_s(ber_buf_len, ber_buf); - - ret_dcc.decode(RANAP__PDU__Descriptions::RANAP__PDU_descr_, TTCN_buf, - TTCN_EncDec::CT_BER, BER_ACCEPT_ALL); - - fftranscode_free(ber_buf); - - return ret_dcc; + TTCN_buf.put_os(stream); + pdu.decode(RANAP__PDU__Descriptions::RANAP__PDU_descr_, TTCN_buf, + TTCN_EncDec::CT_PER, PER_ALIGNED); + return pdu; } } diff --git a/library/ranap/regen_makefile.sh b/library/ranap/regen_makefile.sh index 0ae1cfd..2d553b7 100755 --- a/library/ranap/regen_makefile.sh +++ b/library/ranap/regen_makefile.sh @@ -3,7 +3,3 @@ FILES="*.asn *.ttcn RANAP_EncDec.cc" ../../regen-makefile.sh $FILES - -sed -i -e '/^CPPFLAGS/ s/$/ `pkg-config --cflags libfftranscode`/' Makefile -sed -i -e '/^LDFLAGS/ s/$/ `pkg-config --libs libfftranscode`/' Makefile -sed -i -e '/^LINUX_LIBS/ s/$/ `pkg-config --libs libfftranscode`/' Makefile diff --git a/library/rua/RUA_EncDec.cc b/library/rua/RUA_EncDec.cc index 808e317..c702f54 100644 --- a/library/rua/RUA_EncDec.cc +++ b/library/rua/RUA_EncDec.cc @@ -1,11 +1,8 @@ - -#include <string.h> -#include <stdarg.h> #include "RUA_PDU_Descriptions.hh" -extern "C" { -#include <fftranscode/transcode.h> -} +/* 3GPP TS 25.468, section 9.4 Message transfer syntax: + * RUA shall use the ASN.1 Basic Packed Encoding Rules (BASIC-PER) Aligned Variant + * as transfer syntax as specified in ref. ITU-T Rec. X.691 */ namespace RUA__Types { @@ -13,52 +10,24 @@ OCTETSTRING enc__RUA__PDU(const RUA__PDU__Descriptions::RUA__PDU &pdu) { - uint8_t *aper_buf; - int aper_buf_len; - TTCN_Buffer TTCN_buf; - TTCN_buf.clear(); + TTCN_Buffer buf; - /* Encode from abstract data type into BER/DER */ - pdu.encode(RUA__PDU__Descriptions::RUA__PDU_descr_, TTCN_buf, - TTCN_EncDec::CT_BER, BER_ENCODE_DER); - - aper_buf_len = fftranscode_ber2aper(FFTRANSC_T_RUA, &aper_buf, TTCN_buf.get_data(), TTCN_buf.get_len()); - if (aper_buf_len < 0) { - TTCN_error("fftranscode failed."); - } - - /* make octetstring from output buffer */ - OCTETSTRING ret_val(aper_buf_len, aper_buf); - - /* release dynamically-allocated output buffer */ - fftranscode_free(aper_buf); - - return ret_val; + buf.clear(); + pdu.encode(RUA__PDU__Descriptions::RUA__PDU_descr_, buf, + TTCN_EncDec::CT_PER, PER_ALIGNED); + return OCTETSTRING(buf.get_len(), buf.get_data()); } RUA__PDU__Descriptions::RUA__PDU dec__RUA__PDU(const OCTETSTRING &stream) { - uint8_t *ber_buf; - int ber_buf_len; - - /* First, decode APER + re-encode as BER */ - ber_buf_len = fftranscode_aper2ber(FFTRANSC_T_RUA, &ber_buf, (const unsigned char *)stream, stream.lengthof()); - if (ber_buf_len < 0) { - TTCN_error("fftranscode failed."); - } - - /* Then, re-encode from BER to TITAN representation */ - RUA__PDU__Descriptions::RUA__PDU ret_dcc; + RUA__PDU__Descriptions::RUA__PDU pdu; TTCN_Buffer TTCN_buf; + TTCN_buf.clear(); - TTCN_buf.put_s(ber_buf_len, ber_buf); - - ret_dcc.decode(RUA__PDU__Descriptions::RUA__PDU_descr_, TTCN_buf, - TTCN_EncDec::CT_BER, BER_ACCEPT_ALL); - - fftranscode_free(ber_buf); - - return ret_dcc; + TTCN_buf.put_os(stream); + pdu.decode(RUA__PDU__Descriptions::RUA__PDU_descr_, TTCN_buf, + TTCN_EncDec::CT_PER, PER_ALIGNED); + return pdu; } } diff --git a/library/rua/regen_makefile.sh b/library/rua/regen_makefile.sh index 1f45203..b67ef8e 100755 --- a/library/rua/regen_makefile.sh +++ b/library/rua/regen_makefile.sh @@ -3,7 +3,3 @@ FILES="*.asn *.ttcn RUA_EncDec.cc" ../../regen-makefile.sh $FILES - -sed -i -e '/^CPPFLAGS/ s/$/ `pkg-config --cflags libfftranscode`/' Makefile -sed -i -e '/^LDFLAGS/ s/$/ `pkg-config --libs libfftranscode`/' Makefile -sed -i -e '/^LINUX_LIBS/ s/$/ `pkg-config --libs libfftranscode`/' Makefile diff --git a/library/s1ap/S1AP_EncDec.cc b/library/s1ap/S1AP_EncDec.cc index a17f20e..6f82b2b 100644 --- a/library/s1ap/S1AP_EncDec.cc +++ b/library/s1ap/S1AP_EncDec.cc @@ -1,11 +1,8 @@ - -#include <string.h> -#include <stdarg.h> #include "S1AP_PDU_Descriptions.hh" -extern "C" { -#include <fftranscode/transcode.h> -} +/* 3GPP TS 36.413, section 9.4 Message transfer syntax: + * S1AP shall use the ASN.1 Basic Packed Encoding Rules (BASIC-PER) Aligned Variant + * as transfer syntax as specified in ref. ITU-T Rec. X.691 */ namespace S1AP__Types { @@ -13,52 +10,24 @@ OCTETSTRING enc__S1AP__PDU(const S1AP__PDU__Descriptions::S1AP__PDU &pdu) { - uint8_t *aper_buf; - int aper_buf_len; - TTCN_Buffer TTCN_buf; - TTCN_buf.clear(); + TTCN_Buffer buf; - /* Encode from abstract data type into BER/DER */ - pdu.encode(S1AP__PDU__Descriptions::S1AP__PDU_descr_, TTCN_buf, - TTCN_EncDec::CT_BER, BER_ENCODE_DER); - - aper_buf_len = fftranscode_ber2aper(FFTRANSC_T_S1AP, &aper_buf, TTCN_buf.get_data(), TTCN_buf.get_len()); - if (aper_buf_len < 0) { - TTCN_error("fftranscode failed."); - } - - /* make octetstring from output buffer */ - OCTETSTRING ret_val(aper_buf_len, aper_buf); - - /* release dynamically-allocated output buffer */ - fftranscode_free(aper_buf); - - return ret_val; + buf.clear(); + pdu.encode(S1AP__PDU__Descriptions::S1AP__PDU_descr_, buf, + TTCN_EncDec::CT_PER, PER_ALIGNED); + return OCTETSTRING(buf.get_len(), buf.get_data()); } S1AP__PDU__Descriptions::S1AP__PDU dec__S1AP__PDU(const OCTETSTRING &stream) { - uint8_t *ber_buf; - int ber_buf_len; - - /* First, decode APER + re-encode as BER */ - ber_buf_len = fftranscode_aper2ber(FFTRANSC_T_S1AP, &ber_buf, (const unsigned char *)stream, stream.lengthof()); - if (ber_buf_len < 0) { - TTCN_error("fftranscode failed."); - } - - /* Then, re-encode from BER to TITAN representation */ - S1AP__PDU__Descriptions::S1AP__PDU ret_dcc; + S1AP__PDU__Descriptions::S1AP__PDU pdu; TTCN_Buffer TTCN_buf; + TTCN_buf.clear(); - TTCN_buf.put_s(ber_buf_len, ber_buf); - - ret_dcc.decode(S1AP__PDU__Descriptions::S1AP__PDU_descr_, TTCN_buf, - TTCN_EncDec::CT_BER, BER_ACCEPT_ALL); - - fftranscode_free(ber_buf); - - return ret_dcc; + TTCN_buf.put_os(stream); + pdu.decode(S1AP__PDU__Descriptions::S1AP__PDU_descr_, TTCN_buf, + TTCN_EncDec::CT_PER, PER_ALIGNED); + return pdu; } } diff --git a/library/s1ap/regen_makefile.sh b/library/s1ap/regen_makefile.sh index fae086c..059c6b3 100755 --- a/library/s1ap/regen_makefile.sh +++ b/library/s1ap/regen_makefile.sh @@ -3,7 +3,3 @@ FILES="*.asn *.ttcn S1AP_EncDec.cc" ../../regen-makefile.sh $FILES - -sed -i -e '/^CPPFLAGS/ s/$/ `pkg-config --cflags libfftranscode`/' Makefile -sed -i -e '/^LDFLAGS/ s/$/ `pkg-config --libs libfftranscode`/' Makefile -sed -i -e '/^LINUX_LIBS/ s/$/ `pkg-config --libs libfftranscode`/' Makefile diff --git a/library/sabp/SABP_EncDec.cc b/library/sabp/SABP_EncDec.cc index 3c60e82..4aa0498 100644 --- a/library/sabp/SABP_EncDec.cc +++ b/library/sabp/SABP_EncDec.cc @@ -1,11 +1,8 @@ - -#include <string.h> -#include <stdarg.h> #include "SABP_PDU_Descriptions.hh" -extern "C" { -#include <fftranscode/transcode.h> -} +/* 3GPP TS 25.419, section 9.4 Message transfer syntax: + * SABP shall use the ASN.1 Basic Packed Encoding Rules (BASIC-PER) Aligned Variant + * as transfer syntax as specified in ref. ITU-T Rec. X.691 */ namespace SABP__Types { @@ -13,52 +10,24 @@ OCTETSTRING enc__SABP__PDU(const SABP__PDU__Descriptions::SABP__PDU &pdu) { - uint8_t *aper_buf; - int aper_buf_len; - TTCN_Buffer TTCN_buf; - TTCN_buf.clear(); + TTCN_Buffer buf; - /* Encode from abstract data type into BER/DER */ - pdu.encode(SABP__PDU__Descriptions::SABP__PDU_descr_, TTCN_buf, - TTCN_EncDec::CT_BER, BER_ENCODE_DER); - - aper_buf_len = fftranscode_ber2aper(FFTRANSC_T_SABP, &aper_buf, TTCN_buf.get_data(), TTCN_buf.get_len()); - if (aper_buf_len < 0) { - TTCN_error("fftranscode failed."); - } - - /* make octetstring from output buffer */ - OCTETSTRING ret_val(aper_buf_len, aper_buf); - - /* release dynamically-allocated output buffer */ - fftranscode_free(aper_buf); - - return ret_val; + buf.clear(); + pdu.encode(SABP__PDU__Descriptions::SABP__PDU_descr_, buf, + TTCN_EncDec::CT_PER, PER_ALIGNED); + return OCTETSTRING(buf.get_len(), buf.get_data()); } SABP__PDU__Descriptions::SABP__PDU dec__SABP__PDU(const OCTETSTRING &stream) { - uint8_t *ber_buf; - int ber_buf_len; - - /* First, decode APER + re-encode as BER */ - ber_buf_len = fftranscode_aper2ber(FFTRANSC_T_SABP, &ber_buf, (const unsigned char *)stream, stream.lengthof()); - if (ber_buf_len < 0) { - TTCN_error("fftranscode failed."); - } - - /* Then, re-encode from BER to TITAN representation */ - SABP__PDU__Descriptions::SABP__PDU ret_dcc; + SABP__PDU__Descriptions::SABP__PDU pdu; TTCN_Buffer TTCN_buf; + TTCN_buf.clear(); - TTCN_buf.put_s(ber_buf_len, ber_buf); - - ret_dcc.decode(SABP__PDU__Descriptions::SABP__PDU_descr_, TTCN_buf, - TTCN_EncDec::CT_BER, BER_ACCEPT_ALL); - - fftranscode_free(ber_buf); - - return ret_dcc; + TTCN_buf.put_os(stream); + pdu.decode(SABP__PDU__Descriptions::SABP__PDU_descr_, TTCN_buf, + TTCN_EncDec::CT_PER, PER_ALIGNED); + return pdu; } } diff --git a/library/sabp/regen_makefile.sh b/library/sabp/regen_makefile.sh index 382fbd5..d53a09c 100755 --- a/library/sabp/regen_makefile.sh +++ b/library/sabp/regen_makefile.sh @@ -3,7 +3,3 @@ FILES="*.asn *.ttcn SABP_EncDec.cc" ../../regen-makefile.sh $FILES - -sed -i -e '/^CPPFLAGS/ s/$/ `pkg-config --cflags libfftranscode`/' Makefile -sed -i -e '/^LDFLAGS/ s/$/ `pkg-config --libs libfftranscode`/' Makefile -sed -i -e '/^LINUX_LIBS/ s/$/ `pkg-config --libs libfftranscode`/' Makefile diff --git a/library/sbcap/SBC_AP_EncDec.cc b/library/sbcap/SBC_AP_EncDec.cc index 08ee75f..26e3364 100644 --- a/library/sbcap/SBC_AP_EncDec.cc +++ b/library/sbcap/SBC_AP_EncDec.cc @@ -1,11 +1,8 @@ - -#include <string.h> -#include <stdarg.h> #include "SBC_AP_PDU_Descriptions.hh" -extern "C" { -#include <fftranscode/transcode.h> -} +/* 3GPP TS 29.168, section 9.4 Message transfer syntax: + * SBC-AP shall use the ASN.1 Basic Packed Encoding Rules (BASIC-PER) Aligned Variant + * as transfer syntax as specified in ref. ITU-T Rec. X.691 */ namespace SBC__AP__Types { @@ -13,52 +10,24 @@ OCTETSTRING enc__SBC__AP__PDU(const SBC__AP__PDU__Descriptions::SBC__AP__PDU &pdu) { - uint8_t *aper_buf; - int aper_buf_len; - TTCN_Buffer TTCN_buf; - TTCN_buf.clear(); + TTCN_Buffer buf; - /* Encode from abstract data type into BER/DER */ - pdu.encode(SBC__AP__PDU__Descriptions::SBC__AP__PDU_descr_, TTCN_buf, - TTCN_EncDec::CT_BER, BER_ENCODE_DER); - - aper_buf_len = fftranscode_ber2aper(FFTRANSC_T_SBCAP, &aper_buf, TTCN_buf.get_data(), TTCN_buf.get_len()); - if (aper_buf_len < 0) { - TTCN_error("fftranscode failed."); - } - - /* make octetstring from output buffer */ - OCTETSTRING ret_val(aper_buf_len, aper_buf); - - /* release dynamically-allocated output buffer */ - fftranscode_free(aper_buf); - - return ret_val; + buf.clear(); + pdu.encode(SBC__AP__PDU__Descriptions::SBC__AP__PDU_descr_, buf, + TTCN_EncDec::CT_PER, PER_ALIGNED); + return OCTETSTRING(buf.get_len(), buf.get_data()); } SBC__AP__PDU__Descriptions::SBC__AP__PDU dec__SBC__AP__PDU(const OCTETSTRING &stream) { - uint8_t *ber_buf; - int ber_buf_len; - - /* First, decode APER + re-encode as BER */ - ber_buf_len = fftranscode_aper2ber(FFTRANSC_T_SBCAP, &ber_buf, (const unsigned char *)stream, stream.lengthof()); - if (ber_buf_len < 0) { - TTCN_error("fftranscode failed."); - } - - /* Then, re-encode from BER to TITAN representation */ - SBC__AP__PDU__Descriptions::SBC__AP__PDU ret_dcc; + SBC__AP__PDU__Descriptions::SBC__AP__PDU pdu; TTCN_Buffer TTCN_buf; + TTCN_buf.clear(); - TTCN_buf.put_s(ber_buf_len, ber_buf); - - ret_dcc.decode(SBC__AP__PDU__Descriptions::SBC__AP__PDU_descr_, TTCN_buf, - TTCN_EncDec::CT_BER, BER_ACCEPT_ALL); - - fftranscode_free(ber_buf); - - return ret_dcc; + TTCN_buf.put_os(stream); + pdu.decode(SBC__AP__PDU__Descriptions::SBC__AP__PDU_descr_, TTCN_buf, + TTCN_EncDec::CT_PER, PER_ALIGNED); + return pdu; } } diff --git a/library/sbcap/regen_makefile.sh b/library/sbcap/regen_makefile.sh index 0cd6083..064979e 100755 --- a/library/sbcap/regen_makefile.sh +++ b/library/sbcap/regen_makefile.sh @@ -3,7 +3,3 @@ FILES="*.asn *.ttcn SBC_AP_EncDec.cc" ../../regen-makefile.sh $FILES - -sed -i -e '/^CPPFLAGS/ s/$/ `pkg-config --cflags libfftranscode`/' Makefile -sed -i -e '/^LDFLAGS/ s/$/ `pkg-config --libs libfftranscode`/' Makefile -sed -i -e '/^LINUX_LIBS/ s/$/ `pkg-config --libs libfftranscode`/' Makefile diff --git a/mme/regen_makefile.sh b/mme/regen_makefile.sh index 6e86346..3520296 100755 --- a/mme/regen_makefile.sh +++ b/mme/regen_makefile.sh @@ -34,4 +34,4 @@ ../regen-makefile.sh -e $NAME $FILES -sed -i -e 's/^LINUX_LIBS = -lxml2 -lsctp/LINUX_LIBS = -lxml2 -lsctp -lfftranscode -lgnutls/' Makefile +sed -i -e 's/^LINUX_LIBS = -lxml2 -lsctp/LINUX_LIBS = -lxml2 -lsctp -lgnutls/' Makefile diff --git a/msc/regen_makefile.sh b/msc/regen_makefile.sh index 081d2cb..6034e1f 100755 --- a/msc/regen_makefile.sh +++ b/msc/regen_makefile.sh @@ -46,4 +46,4 @@ ../regen-makefile.sh -e $NAME $FILES -sed -i -e 's/^LINUX_LIBS = -lxml2 -lsctp/LINUX_LIBS = -lxml2 -lsctp -lfftranscode -lssl/' Makefile +sed -i -e 's/^LINUX_LIBS = -lxml2 -lsctp/LINUX_LIBS = -lxml2 -lsctp -lssl/' Makefile diff --git a/s1gw/regen_makefile.sh b/s1gw/regen_makefile.sh index 7eef51b..50cce0e 100755 --- a/s1gw/regen_makefile.sh +++ b/s1gw/regen_makefile.sh @@ -20,7 +20,3 @@ " ../regen-makefile.sh -e $NAME $FILES - -sed -i -e '/^CPPFLAGS/ s/$/ `pkg-config --cflags libfftranscode`/' Makefile -sed -i -e '/^LDFLAGS/ s/$/ `pkg-config --libs libfftranscode`/' Makefile -sed -i -e '/^LINUX_LIBS/ s/$/ `pkg-config --libs libfftranscode`/' Makefile diff --git a/sgsn/regen_makefile.sh b/sgsn/regen_makefile.sh index 5c9c5ea..1f89dee 100755 --- a/sgsn/regen_makefile.sh +++ b/sgsn/regen_makefile.sh @@ -33,5 +33,3 @@ " ../regen-makefile.sh -e $NAME $FILES - -sed -i -e 's/^LINUX_LIBS = -lxml2 -lsctp/LINUX_LIBS = -lxml2 -lsctp -lfftranscode/' Makefile -- To view, visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37225?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I990a9c01d965e185fc64bd751ea0685e5d3b869c Gerrit-Change-Number: 37225 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 year
1
0
0
0
[M] Change in osmocom-bb[master]: trxcon/l1sched: refactor prim management in tx_tch[fh]_fn()
by fixeria
fixeria has submitted this change. (
https://gerrit.osmocom.org/c/osmocom-bb/+/36915?usp=email
) Change subject: trxcon/l1sched: refactor prim management in tx_tch[fh]_fn() ...................................................................... trxcon/l1sched: refactor prim management in tx_tch[fh]_fn() The code path below the switch statement in tx_tch[fh]_fn() is no longer common since we added CSD specific channel coding. This is why we had to jump over it in several case statements. This patch significantly reduces the number of goto statements in these two functions and makes them easier to read/follow at the price of code duplication, which is tolerable. Change-Id: I5292abf6fcd308c9f7f12c7145d004103c9c7675 --- M src/host/trxcon/src/sched_lchan_tchf.c M src/host/trxcon/src/sched_lchan_tchh.c 2 files changed, 87 insertions(+), 69 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve fixeria: Looks good to me, approved diff --git a/src/host/trxcon/src/sched_lchan_tchf.c b/src/host/trxcon/src/sched_lchan_tchf.c index 7cc1856..985bea4 100644 --- a/src/host/trxcon/src/sched_lchan_tchf.c +++ b/src/host/trxcon/src/sched_lchan_tchf.c @@ -3,7 +3,7 @@ * TDMA scheduler: handlers for DL / UL bursts on logical channels * * (C) 2017-2022 by Vadim Yanitskiy <axilirator(a)gmail.com> - * (C) 2021-2023 by sysmocom - s.f.m.c. GmbH <info(a)sysmocom.de> + * (C) 2021-2024 by sysmocom - s.f.m.c. GmbH <info(a)sysmocom.de> * * All Rights Reserved * @@ -290,39 +290,49 @@ /* fall-through */ case GSM48_CMODE_SPEECH_V1: case GSM48_CMODE_SPEECH_EFR: - if (msg == NULL) { - /* transmit a dummy speech block with inverted CRC3 */ - gsm0503_tch_fr_encode(bursts_p, NULL, 0, 1); - goto send_burst; - } + /* if msg == NULL, transmit a dummy speech block with inverted CRC3 */ rc = gsm0503_tch_fr_encode(BUFPOS(bursts_p, 0), - msgb_l2(msg), - msgb_l2len(msg), 1); + msg ? msgb_l2(msg) : NULL, + msg ? msgb_l2len(msg) : 0, 1); + /* confirm traffic sending (pass ownership of the msgb/prim) */ + if (OSMO_LIKELY(rc == 0)) + l1sched_lchan_emit_data_cnf(lchan, msg, br->fn); + else /* unlikely: encoding failed, drop msgb/prim */ + msgb_free(msg); + /* drop the other msgb/prim */ + msgb_free((msg == msg_facch) ? msg_tch : msg_facch); break; case GSM48_CMODE_SPEECH_AMR: { bool amr_fn_is_cmr = !sched_tchf_ul_amr_cmi_map[br->fn % 26]; - const uint8_t *data = msg ? msgb_l2(msg) : NULL; - size_t data_len = msg ? msgb_l2len(msg) : 0; + unsigned int offset = 0; if (msg != NULL && msg != msg_facch) { /* TCH/AFS: speech */ - if (!l1sched_lchan_amr_prim_is_valid(lchan, msg, amr_fn_is_cmr)) - goto free_bad_msg; + if (!l1sched_lchan_amr_prim_is_valid(lchan, msg, amr_fn_is_cmr)) { + msgb_free(msg); + msg_tch = NULL; + msg = NULL; + } /* pull the AMR header - sizeof(struct amr_hdr) */ - data_len -= 2; - data += 2; + offset = 2; } /* if msg == NULL, transmit a dummy speech block with inverted CRC6 */ rc = gsm0503_tch_afs_encode(BUFPOS(bursts_p, 0), - data, data_len, + msg ? msgb_l2(msg) + offset : NULL, + msg ? msgb_l2len(msg) - offset : 0, amr_fn_is_cmr, lchan->amr.codec, lchan->amr.codecs, lchan->amr.ul_ft, lchan->amr.ul_cmr); - if (msg == NULL) - goto send_burst; + /* confirm traffic sending (pass ownership of the msgb/prim) */ + if (OSMO_LIKELY(rc == 0)) + l1sched_lchan_emit_data_cnf(lchan, msg, br->fn); + else /* unlikely: encoding failed, drop prim */ + msgb_free(msg); + /* drop the other primitive */ + msgb_free((msg == msg_facch) ? msg_tch : msg_facch); break; } /* CSD (TCH/F14.4): 14.5 kbit/s radio interface rate */ @@ -342,7 +352,7 @@ /* Confirm FACCH sending (pass ownership of the msgb/prim) */ l1sched_lchan_emit_data_cnf(lchan, msg, br->fn); } - goto send_burst; + break; /* CSD (TCH/F9.6): 12.0 kbit/s radio interface rate */ case GSM48_CMODE_DATA_12k0: if ((msg = msg_tch) != NULL) { @@ -360,7 +370,7 @@ /* Confirm FACCH sending (pass ownership of the msgb/prim) */ l1sched_lchan_emit_data_cnf(lchan, msg, br->fn); } - goto send_burst; + break; /* CSD (TCH/F4.8): 6.0 kbit/s radio interface rate */ case GSM48_CMODE_DATA_6k0: if ((msg = msg_tch) != NULL) { @@ -378,42 +388,33 @@ /* Confirm FACCH sending (pass ownership of the msgb/prim) */ l1sched_lchan_emit_data_cnf(lchan, msg, br->fn); } - goto send_burst; + break; /* CSD (TCH/F2.4): 3.6 kbit/s radio interface rate */ case GSM48_CMODE_DATA_3k6: if ((msg = msg_facch) != NULL) { /* FACCH/F does steal a TCH/F2.4 frame completely */ - rc = gsm0503_tch_fr_facch_encode(BUFPOS(bursts_p, 0), msgb_l2(msg)); + gsm0503_tch_fr_facch_encode(BUFPOS(bursts_p, 0), msgb_l2(msg)); + l1sched_lchan_emit_data_cnf(lchan, msg, br->fn); + msgb_free(msg_tch); } else if ((msg = msg_tch) != NULL) { OSMO_ASSERT(msgb_l2len(msg) == 2 * 36); - rc = gsm0503_tch_fr24_encode(BUFPOS(bursts_p, 0), msgb_l2(msg)); + gsm0503_tch_fr24_encode(BUFPOS(bursts_p, 0), msgb_l2(msg)); + l1sched_lchan_emit_data_cnf(lchan, msg, br->fn); } else { ubit_t idle[2 * 36]; memset(&idle[0], 0x01, sizeof(idle)); gsm0503_tch_fr24_encode(BUFPOS(bursts_p, 0), &idle[0]); - goto send_burst; } break; default: LOGP_LCHAND(lchan, LOGL_ERROR, "TCH mode %s is unknown or not supported\n", gsm48_chan_mode_name(lchan->tch_mode)); - goto free_bad_msg; - } - - if (rc) { - LOGP_LCHAND(lchan, LOGL_ERROR, "Failed to encode L2 payload (len=%u): %s\n", - msgb_l2len(msg), msgb_hexdump_l2(msg)); -free_bad_msg: msgb_free(msg_facch); msgb_free(msg_tch); - return -EINVAL; + break; } - /* Confirm data / traffic sending (pass ownership of the msgb/prim) */ - l1sched_lchan_emit_data_cnf(lchan, msg, br->fn); - msgb_free((msg == msg_facch) ? msg_tch : msg_facch); - send_burst: /* Determine which burst should be sent */ burst = BUFPOS(bursts_p, br->bid); diff --git a/src/host/trxcon/src/sched_lchan_tchh.c b/src/host/trxcon/src/sched_lchan_tchh.c index 6c88d19..d684976 100644 --- a/src/host/trxcon/src/sched_lchan_tchh.c +++ b/src/host/trxcon/src/sched_lchan_tchh.c @@ -4,7 +4,7 @@ * * (C) 2018-2022 by Vadim Yanitskiy <axilirator(a)gmail.com> * (C) 2018 by Harald Welte <laforge(a)gnumonks.org> - * (C) 2020-2023 by sysmocom - s.f.m.c. GmbH <info(a)sysmocom.de> + * (C) 2020-2024 by sysmocom - s.f.m.c. GmbH <info(a)sysmocom.de> * * All Rights Reserved * @@ -497,39 +497,53 @@ msg = l1sched_lchan_prim_dummy_lapdm(lchan); /* fall-through */ case GSM48_CMODE_SPEECH_V1: - if (msg == NULL) { - /* transmit a dummy speech block with inverted CRC3 */ - gsm0503_tch_hr_encode(bursts_p, NULL, 0); - goto send_burst; - } + /* if msg == NULL, transmit a dummy speech block with inverted CRC3 */ rc = gsm0503_tch_hr_encode(BUFPOS(bursts_p, 0), - msgb_l2(msg), - msgb_l2len(msg)); + msg ? msgb_l2(msg) : NULL, + msg ? msgb_l2len(msg) : 0); + /* confirm traffic sending (pass ownership of the msgb/prim) */ + if (OSMO_LIKELY(rc == 0)) { + if (msg && msgb_l2len(msg) == GSM_MACBLOCK_LEN) + lchan->ul_facch_blocks = 6; + l1sched_lchan_emit_data_cnf(lchan, msg, br->fn); + } else /* unlikely: encoding failed, drop msgb/prim */ + msgb_free(msg); + /* drop the other msgb/prim */ + msgb_free((msg == msg_facch) ? msg_tch : msg_facch); break; case GSM48_CMODE_SPEECH_AMR: { bool amr_fn_is_cmr = !sched_tchh_ul_amr_cmi_map[br->fn % 26]; - const uint8_t *data = msg ? msgb_l2(msg) : NULL; - size_t data_len = msg ? msgb_l2len(msg) : 0; + unsigned int offset = 0; if (msg != NULL && msg != msg_facch) { /* TCH/AHS: speech */ - if (!l1sched_lchan_amr_prim_is_valid(lchan, msg, amr_fn_is_cmr)) - goto free_bad_msg; + if (!l1sched_lchan_amr_prim_is_valid(lchan, msg, amr_fn_is_cmr)) { + msgb_free(msg); + msg_tch = NULL; + msg = NULL; + } /* pull the AMR header - sizeof(struct amr_hdr) */ - data_len -= 2; - data += 2; + offset = 2; } /* if msg == NULL, transmit a dummy speech block with inverted CRC6 */ rc = gsm0503_tch_ahs_encode(BUFPOS(bursts_p, 0), - data, data_len, + msg ? msgb_l2(msg) + offset : NULL, + msg ? msgb_l2len(msg) - offset : 0, amr_fn_is_cmr, lchan->amr.codec, lchan->amr.codecs, lchan->amr.ul_ft, lchan->amr.ul_cmr); - if (msg == NULL) - goto send_burst; + /* confirm traffic sending (pass ownership of the msgb/prim) */ + if (OSMO_LIKELY(rc == 0)) { + if (msg && msgb_l2len(msg) == GSM_MACBLOCK_LEN) + lchan->ul_facch_blocks = 6; + l1sched_lchan_emit_data_cnf(lchan, msg, br->fn); + } else /* unlikely: encoding failed, drop msgb/prim */ + msgb_free(msg); + /* drop the other msgb/prim */ + msgb_free((msg == msg_facch) ? msg_tch : msg_facch); break; } /* CSD (TCH/H4.8): 6.0 kbit/s radio interface rate */ @@ -549,7 +563,7 @@ /* Confirm FACCH sending (pass ownership of the msgb/prim) */ l1sched_lchan_emit_data_cnf(lchan, msg, br->fn); } - goto send_burst; + break; /* CSD (TCH/H2.4): 3.6 kbit/s radio interface rate */ case GSM48_CMODE_DATA_3k6: if ((msg = msg_tch) != NULL) { @@ -567,30 +581,16 @@ /* Confirm FACCH sending (pass ownership of the msgb/prim) */ l1sched_lchan_emit_data_cnf(lchan, msg, br->fn); } - goto send_burst; + break; default: LOGP_LCHAND(lchan, LOGL_ERROR, "TCH mode %s is unknown or not supported\n", gsm48_chan_mode_name(lchan->tch_mode)); - goto free_bad_msg; - } - - if (rc) { - LOGP_LCHAND(lchan, LOGL_ERROR, "Failed to encode L2 payload (len=%u): %s\n", - msgb_l2len(msg), msgb_hexdump_l2(msg)); -free_bad_msg: msgb_free(msg_facch); msgb_free(msg_tch); - return -EINVAL; + break; } - if (msgb_l2len(msg) == GSM_MACBLOCK_LEN) - lchan->ul_facch_blocks = 6; - - /* Confirm data / traffic sending (pass ownership of the msgb/prim) */ - l1sched_lchan_emit_data_cnf(lchan, msg, br->fn); - msgb_free((msg == msg_facch) ? msg_tch : msg_facch); - send_burst: /* Determine which burst should be sent */ burst = BUFPOS(bursts_p, br->bid); -- To view, visit
https://gerrit.osmocom.org/c/osmocom-bb/+/36915?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I5292abf6fcd308c9f7f12c7145d004103c9c7675 Gerrit-Change-Number: 36915 Gerrit-PatchSet: 3 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 year
1
0
0
0
[M] Change in osmocom-bb[master]: trxcon/l1sched: refactor prim management in tx_tch[fh]_fn()
by fixeria
fixeria has posted comments on this change. (
https://gerrit.osmocom.org/c/osmocom-bb/+/36915?usp=email
) Change subject: trxcon/l1sched: refactor prim management in tx_tch[fh]_fn() ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit
https://gerrit.osmocom.org/c/osmocom-bb/+/36915?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I5292abf6fcd308c9f7f12c7145d004103c9c7675 Gerrit-Change-Number: 36915 Gerrit-PatchSet: 3 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-Comment-Date: Thu, 13 Jun 2024 18:00:55 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 year
1
0
0
0
[S] Change in osmo-qcdiag[master]: Makefile: use $(shell ...) to invoke pkg-config
by fixeria
fixeria has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-qcdiag/+/37220?usp=email
) Change subject: Makefile: use $(shell ...) to invoke pkg-config ...................................................................... Makefile: use $(shell ...) to invoke pkg-config This way the values are evaluated by make itself (not by the shell), and can be seen in the output when running make. Change-Id: I44db058c92377b741e24c7cdf4891ae020f37ff1 --- M src/Makefile 1 file changed, 14 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-qcdiag refs/changes/20/37220/1 diff --git a/src/Makefile b/src/Makefile index 3591ece..ef1c7ed 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,5 +1,5 @@ -CPPFLAGS ?= -g -O0 -Wall `pkg-config --cflags libosmocore` `pkg-config --cflags qmi-glib` -LIBS ?= `pkg-config --libs libosmocore` `pkg-config --libs qmi-glib` +CPPFLAGS ?= -g -O0 -Wall $(shell pkg-config --cflags libosmocore qmi-glib) +LIBS ?= $(shell pkg-config --libs libosmocore qmi-glib) all: osmo-qcdiag-log MODS_LOG = gprs_l1.c gprs_rlc.o gprs_mac.o diag_gsm.o diag_log.o diag_log_gsm.o diag_log_gprs.o diag_log_wcdma.o diag_log_umts.o diag_log_qmi.o diag_dpl.o diag_log_simcard.o diag_event.o -- To view, visit
https://gerrit.osmocom.org/c/osmo-qcdiag/+/37220?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-qcdiag Gerrit-Branch: master Gerrit-Change-Id: I44db058c92377b741e24c7cdf4891ae020f37ff1 Gerrit-Change-Number: 37220 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 year
1
0
0
0
[S] Change in osmo-qcdiag[master]: Makefile: add explicit rule for building *.o files
by fixeria
fixeria has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-qcdiag/+/37222?usp=email
) Change subject: Makefile: add explicit rule for building *.o files ...................................................................... Makefile: add explicit rule for building *.o files Change-Id: Ib886c0ef5fa5b1c62cb22eef017e9bf822b914b1 --- M src/Makefile 1 file changed, 13 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-qcdiag refs/changes/22/37222/1 diff --git a/src/Makefile b/src/Makefile index f14f418..199b712 100644 --- a/src/Makefile +++ b/src/Makefile @@ -4,8 +4,11 @@ MODS_LOG = gprs_l1.o gprs_rlc.o gprs_mac.o diag_gsm.o diag_log.o diag_log_gsm.o diag_log_gprs.o diag_log_wcdma.o diag_log_umts.o diag_log_qmi.o diag_dpl.o diag_log_simcard.o diag_event.o +%.o: %.c + $(CC) $(CPPFLAGS) -c -o $@ $^ + osmo-qcdiag-log: diagchar_hdlc.o diag_io.o osmo-qcdiag-log.o diag_msg.o protocol.o diag_cmd.o $(MODS_LOG) - $(CC) $(CPPFLAGS) -o $@ $^ $(LIBS) + $(CC) $(LIBS) -o $@ $^ clean: @rm -f osmo-qcdiag-log *.o -- To view, visit
https://gerrit.osmocom.org/c/osmo-qcdiag/+/37222?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-qcdiag Gerrit-Branch: master Gerrit-Change-Id: Ib886c0ef5fa5b1c62cb22eef017e9bf822b914b1 Gerrit-Change-Number: 37222 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 year
1
0
0
0
[S] Change in osmo-qcdiag[master]: Makefile: gprs_l1.{c -> o} (must be an object)
by fixeria
fixeria has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-qcdiag/+/37221?usp=email
) Change subject: Makefile: gprs_l1.{c -> o} (must be an object) ...................................................................... Makefile: gprs_l1.{c -> o} (must be an object) Change-Id: I0ca8145c5ebb801c50cd26f64c5922e2022cfad0 --- M src/Makefile 1 file changed, 10 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-qcdiag refs/changes/21/37221/1 diff --git a/src/Makefile b/src/Makefile index ef1c7ed..f14f418 100644 --- a/src/Makefile +++ b/src/Makefile @@ -2,7 +2,7 @@ LIBS ?= $(shell pkg-config --libs libosmocore qmi-glib) all: osmo-qcdiag-log -MODS_LOG = gprs_l1.c gprs_rlc.o gprs_mac.o diag_gsm.o diag_log.o diag_log_gsm.o diag_log_gprs.o diag_log_wcdma.o diag_log_umts.o diag_log_qmi.o diag_dpl.o diag_log_simcard.o diag_event.o +MODS_LOG = gprs_l1.o gprs_rlc.o gprs_mac.o diag_gsm.o diag_log.o diag_log_gsm.o diag_log_gprs.o diag_log_wcdma.o diag_log_umts.o diag_log_qmi.o diag_dpl.o diag_log_simcard.o diag_event.o osmo-qcdiag-log: diagchar_hdlc.o diag_io.o osmo-qcdiag-log.o diag_msg.o protocol.o diag_cmd.o $(MODS_LOG) $(CC) $(CPPFLAGS) -o $@ $^ $(LIBS) -- To view, visit
https://gerrit.osmocom.org/c/osmo-qcdiag/+/37221?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-qcdiag Gerrit-Branch: master Gerrit-Change-Id: I0ca8145c5ebb801c50cd26f64c5922e2022cfad0 Gerrit-Change-Number: 37221 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 year
1
0
0
0
[S] Change in osmo-qcdiag[master]: Makefile: print files removed when running 'clean'
by fixeria
fixeria has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-qcdiag/+/37224?usp=email
) Change subject: Makefile: print files removed when running 'clean' ...................................................................... Makefile: print files removed when running 'clean' Change-Id: Ic93a43a8ee771f5d8eb5f36cc0c90aedea72a51c --- M src/Makefile 1 file changed, 10 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-qcdiag refs/changes/24/37224/1 diff --git a/src/Makefile b/src/Makefile index 795a1ac..149c03e 100644 --- a/src/Makefile +++ b/src/Makefile @@ -12,4 +12,4 @@ $(CC) $(shell pkg-config --libs $(LIBS)) -o $@ $^ clean: - @rm -f osmo-qcdiag-log *.o + $(RM) osmo-qcdiag-log *.o -- To view, visit
https://gerrit.osmocom.org/c/osmo-qcdiag/+/37224?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-qcdiag Gerrit-Branch: master Gerrit-Change-Id: Ic93a43a8ee771f5d8eb5f36cc0c90aedea72a51c Gerrit-Change-Number: 37224 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 year
1
0
0
0
[S] Change in osmo-qcdiag[master]: Makefile: fix CFLAGS != CPPFLAGS, allow overriding them
by fixeria
fixeria has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-qcdiag/+/37223?usp=email
) Change subject: Makefile: fix CFLAGS != CPPFLAGS, allow overriding them ...................................................................... Makefile: fix CFLAGS != CPPFLAGS, allow overriding them Change-Id: Id31923856915a3d2c3a03201ef8922c2129bc635 --- M src/Makefile 1 file changed, 14 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-qcdiag refs/changes/23/37223/1 diff --git a/src/Makefile b/src/Makefile index 199b712..795a1ac 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,14 +1,15 @@ -CPPFLAGS ?= -g -O0 -Wall $(shell pkg-config --cflags libosmocore qmi-glib) -LIBS ?= $(shell pkg-config --libs libosmocore qmi-glib) +CFLAGS ?= -g -O0 -Wall +LIBS = libosmocore qmi-glib + all: osmo-qcdiag-log MODS_LOG = gprs_l1.o gprs_rlc.o gprs_mac.o diag_gsm.o diag_log.o diag_log_gsm.o diag_log_gprs.o diag_log_wcdma.o diag_log_umts.o diag_log_qmi.o diag_dpl.o diag_log_simcard.o diag_event.o %.o: %.c - $(CC) $(CPPFLAGS) -c -o $@ $^ + $(CC) $(shell pkg-config --cflags $(LIBS)) $(CFLAGS) -c -o $@ $^ osmo-qcdiag-log: diagchar_hdlc.o diag_io.o osmo-qcdiag-log.o diag_msg.o protocol.o diag_cmd.o $(MODS_LOG) - $(CC) $(LIBS) -o $@ $^ + $(CC) $(shell pkg-config --libs $(LIBS)) -o $@ $^ clean: @rm -f osmo-qcdiag-log *.o -- To view, visit
https://gerrit.osmocom.org/c/osmo-qcdiag/+/37223?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-qcdiag Gerrit-Branch: master Gerrit-Change-Id: Id31923856915a3d2c3a03201ef8922c2129bc635 Gerrit-Change-Number: 37223 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 year
1
0
0
0
[M] Change in osmocom-bb[master]: trxcon/l1sched: refactor prim management in tx_tch[fh]_fn()
by laforge
Attention is currently required from: fixeria. laforge has posted comments on this change. (
https://gerrit.osmocom.org/c/osmocom-bb/+/36915?usp=email
) Change subject: trxcon/l1sched: refactor prim management in tx_tch[fh]_fn() ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit
https://gerrit.osmocom.org/c/osmocom-bb/+/36915?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I5292abf6fcd308c9f7f12c7145d004103c9c7675 Gerrit-Change-Number: 36915 Gerrit-PatchSet: 3 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: Thu, 13 Jun 2024 14:50:49 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 year
1
0
0
0
← Newer
1
...
45
46
47
48
49
50
51
...
157
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
Results per page:
10
25
50
100
200