Change in osmo-pcu[master]: Add ARQ type helpers
Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13406 ) Change subject: Add ARQ type helpers .. Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13406 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I844aca7dcd9d7f41e5975c1edd1905951f271998 Gerrit-Change-Number: 13406 Gerrit-PatchSet: 5 Gerrit-Owner: Max Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Max Gerrit-Reviewer: osmith Gerrit-Comment-Date: Wed, 27 Mar 2019 13:37:01 + Gerrit-HasComments: No Gerrit-HasLabels: Yes
Change in osmo-pcu[master]: Add ARQ type helpers
Hello Daniel Willmann, Harald Welte, osmith, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13406 to look at the new patch set (#4). Change subject: Add ARQ type helpers .. Add ARQ type helpers Add functions to check/log EGPRS ARQ type (as described in 3GPP TS 44.060 §8.1.1). Note - this requires updating previously incorrect TBF test output. Depends on: I85b7dc8e8786671a054af2f1e7d836b863a25e60 and Ib39e4424f73c677b34f921917440f211e400e14f in OsmoPCU. Change-Id: I844aca7dcd9d7f41e5975c1edd1905951f271998 --- M src/coding_scheme.c M src/coding_scheme.h M src/gprs_coding_scheme.h M src/pcu_vty.c M src/tbf_dl.cpp M tests/tbf/TbfTest.err 6 files changed, 51 insertions(+), 30 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/06/13406/4 -- To view, visit https://gerrit.osmocom.org/13406 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I844aca7dcd9d7f41e5975c1edd1905951f271998 Gerrit-Change-Number: 13406 Gerrit-PatchSet: 4 Gerrit-Owner: Max Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Max Gerrit-Reviewer: osmith
Change in osmo-pcu[master]: Add ARQ type helpers
Max has posted comments on this change. ( https://gerrit.osmocom.org/13406 ) Change subject: Add ARQ type helpers .. Patch Set 3: (2 comments) https://gerrit.osmocom.org/#/c/13406/3/src/coding_scheme.c File src/coding_scheme.c: https://gerrit.osmocom.org/#/c/13406/3/src/coding_scheme.c@177 PS3, Line 177: char *egprs_arq_type_name(const struct gprs_rlcmac_bts *bts) > "const char *"? Ack https://gerrit.osmocom.org/#/c/13406/3/src/pcu_vty.c File src/pcu_vty.c: https://gerrit.osmocom.org/#/c/13406/3/src/pcu_vty.c@222 PS3, Line 222: if (egprs_arq_type_2(bts)) > Just being curious: what's the advantage of using a function here? The > previous statement is shorter […] It makes it easier to modify - see follow-up patch. -- To view, visit https://gerrit.osmocom.org/13406 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I844aca7dcd9d7f41e5975c1edd1905951f271998 Gerrit-Change-Number: 13406 Gerrit-PatchSet: 3 Gerrit-Owner: Max Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Max Gerrit-Reviewer: osmith Gerrit-Comment-Date: Wed, 27 Mar 2019 12:43:01 + Gerrit-HasComments: Yes Gerrit-HasLabels: No
Change in osmo-pcu[master]: Add ARQ type helpers
osmith has posted comments on this change. ( https://gerrit.osmocom.org/13406 ) Change subject: Add ARQ type helpers .. Patch Set 3: Code-Review-1 (2 comments) https://gerrit.osmocom.org/#/c/13406/3/src/coding_scheme.c File src/coding_scheme.c: https://gerrit.osmocom.org/#/c/13406/3/src/coding_scheme.c@177 PS3, Line 177: char *egprs_arq_type_name(const struct gprs_rlcmac_bts *bts) "const char *"? https://gerrit.osmocom.org/#/c/13406/3/src/pcu_vty.c File src/pcu_vty.c: https://gerrit.osmocom.org/#/c/13406/3/src/pcu_vty.c@222 PS3, Line 222: if (egprs_arq_type_2(bts)) Just being curious: what's the advantage of using a function here? The previous statement is shorter and one less function to maintain, so I'm wondering. -- To view, visit https://gerrit.osmocom.org/13406 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I844aca7dcd9d7f41e5975c1edd1905951f271998 Gerrit-Change-Number: 13406 Gerrit-PatchSet: 3 Gerrit-Owner: Max Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Max Gerrit-Reviewer: osmith Gerrit-Comment-Date: Tue, 26 Mar 2019 15:16:26 + Gerrit-HasComments: Yes Gerrit-HasLabels: Yes
Change in osmo-pcu[master]: Add ARQ type helpers
Max has posted comments on this change. ( https://gerrit.osmocom.org/13406 ) Change subject: Add ARQ type helpers .. Patch Set 3: This change is ready for review. -- To view, visit https://gerrit.osmocom.org/13406 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I844aca7dcd9d7f41e5975c1edd1905951f271998 Gerrit-Change-Number: 13406 Gerrit-PatchSet: 3 Gerrit-Owner: Max Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Max Gerrit-Reviewer: osmith Gerrit-Comment-Date: Tue, 26 Mar 2019 12:24:56 + Gerrit-HasComments: No Gerrit-HasLabels: No
Change in osmo-pcu[master]: Add ARQ type helpers
Max has uploaded this change for review. ( https://gerrit.osmocom.org/13406 Change subject: Add ARQ type helpers .. Add ARQ type helpers Add functions to check/log EGPRS ARQ type (as described in 3GPP TS 44.060 §8.1.1). Note - this requires updating previously incorrect TBF test output. Depends on: I85b7dc8e8786671a054af2f1e7d836b863a25e60 and Ib39e4424f73c677b34f921917440f211e400e14f in OsmoPCU. Change-Id: I844aca7dcd9d7f41e5975c1edd1905951f271998 --- M src/coding_scheme.c M src/coding_scheme.h M src/gprs_coding_scheme.h M src/pcu_vty.c M src/tbf_dl.cpp M tests/tbf/TbfTest.err 6 files changed, 51 insertions(+), 30 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/06/13406/1 diff --git a/src/coding_scheme.c b/src/coding_scheme.c index 48a74cd..6ed787e 100644 --- a/src/coding_scheme.c +++ b/src/coding_scheme.c @@ -22,6 +22,7 @@ #include +#include "bts.h" #include "coding_scheme.h" const struct value_string mcs_names[] = { @@ -163,3 +164,20 @@ return egprs_no_reseg[mcs_chan_code(initial_mcs)][mcs_chan_code(demanded_mcs)]; } } + +/* Check whether 3GPP TS 44.060 EGPRS ARQ Type II is configured for BTS */ +bool egprs_arq_type_2(const struct gprs_rlcmac_bts *bts) +{ + if (bts->dl_arq_type != EGPRS_ARQ2) + return false; + + return true; +} + +char *egprs_arq_type_name(const struct gprs_rlcmac_bts *bts) +{ + if (egprs_arq_type_2(bts)) + return "Type II"; + + return "Type I"; +} diff --git a/src/coding_scheme.h b/src/coding_scheme.h index f93a4a2..5e58528 100644 --- a/src/coding_scheme.h +++ b/src/coding_scheme.h @@ -21,6 +21,9 @@ #include +#define EGPRS_ARQ10x0 +#define EGPRS_ARQ20x1 + enum CodingScheme { UNKNOWN, /* GPRS Coding Schemes: */ @@ -64,3 +67,6 @@ }; const char *mode_name(enum mcs_kind val); + +bool egprs_arq_type_2(const struct gprs_rlcmac_bts *bts); +char *egprs_arq_type_name(const struct gprs_rlcmac_bts *bts); diff --git a/src/gprs_coding_scheme.h b/src/gprs_coding_scheme.h index c31f58f..03b92ec 100644 --- a/src/gprs_coding_scheme.h +++ b/src/gprs_coding_scheme.h @@ -30,10 +30,6 @@ class GprsCodingScheme { public: - -#define EGPRS_ARQ10x0 -#define EGPRS_ARQ20x1 - GprsCodingScheme(CodingScheme s = UNKNOWN); operator bool() const {return m_scheme != UNKNOWN;} diff --git a/src/pcu_vty.c b/src/pcu_vty.c index 960c90d..cfc7e85 100644 --- a/src/pcu_vty.c +++ b/src/pcu_vty.c @@ -15,6 +15,7 @@ #include #include "bts.h" #include "tbf.h" +#include "coding_scheme.h" #include "pcu_vty_functions.h" extern void *tall_pcu_ctx; @@ -218,7 +219,7 @@ vty_out(vty, " window-size %d %d%s", bts->ws_base, bts->ws_pdch, VTY_NEWLINE); - if (bts->dl_arq_type) + if (egprs_arq_type_2(bts)) vty_out(vty, " egprs dl arq-type arq2%s", VTY_NEWLINE); diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index c97436a..813a550 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -383,12 +383,12 @@ !bts->bts_data()->dl_arq_type); LOGPTBFDL(this, LOGL_DEBUG, - "initial_cs_dl(%s) last_mcs(%s) demanded_mcs(%s) cs_trans(%s) arq_type(%d) bsn(%d)\n", + "initial_cs_dl(%s) last_mcs(%s) demanded_mcs(%s) cs_trans(%s) ARQ(%s) bsn(%d)\n", mcs_name(m_rlc.block(bsn)->cs_init), mcs_name(m_rlc.block(bsn)->cs_last), mcs_name(ms()->current_cs_dl()), mcs_name(m_rlc.block(bsn)->cs_current_trans), - bts->bts_data()->dl_arq_type, bsn); + egprs_arq_type_name(bts->bts_data()), bsn); /* TODO: Need to remove this check when MCS-8 -> MCS-6 * transistion is handled. diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err index b58b61d..b007f13 100644 --- a/tests/tbf/TbfTest.err +++ b/tests/tbf/TbfTest.err @@ -4754,7 +4754,7 @@ Received RTS for PDCH: TRX=0 TS=4 FN=8 block_nr=2 scheduling free USF for polling at FN=13 of TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) Scheduling data message at RTS for DL TFI=0 (TRX=0, TS=4) prio=3 TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) downlink (V(A)==0 .. V(S)==1) -TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) initial_cs_dl(MCS-7) last_mcs(MCS-5) demanded_mcs(MCS-7) cs_trans(MCS-7) arq_type(1) bsn(0) +TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) initial_cs_dl(MCS-7) last_mcs(MCS-5) demanded_mcs(MCS-7) cs_trans(MCS-7) ARQ(Type II) bsn(0) TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) Resending BSN 0 TBF(TFI=0 TLLI=0xffeeddcc DIR=DL