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

March 2023

  • 1 participants
  • 3642 discussions
[XL] Change in osmocom-bb[master]: {trxcon,virt_phy}: shared GPRS L1 (MAC) implementation
by fixeria 16 Mar '23

16 Mar '23
Attention is currently required from: laforge, pespin. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30743 ) Change subject: {trxcon,virt_phy}: shared GPRS L1 (MAC) implementation ...................................................................... Patch Set 11: (5 comments) File include/l1ctl_proto.h: https://gerrit.osmocom.org/c/osmocom-bb/+/30743/comment/4395d2b1_3a6490a1 PS10, Line 367: uint8_t padding[3]; > I still don't see the point in adding these padding bytes here. […] I already tried to explain and additionally brought this topic up in the IRC. Let's please avoid spending even more time discussing this. Padding is already present in existing L1CTL messages, so it will be in the new ones too. File src/host/virt_phy/src/virt_prim_pdch.c: https://gerrit.osmocom.org/c/osmocom-bb/+/30743/comment/942ed7ba_34ff2bc0 PS10, Line 34: void l1ctl_rx_gprs_uldl_tbf_cfg_req(struct l1_model_ms *ms, struct msgb *msg) > So you send both L1CTL messages to this function, to then split it again to 2 differents functions b […] I think it's fine to have a single function for handling both L1CTL messages, because a) we want to check `ms->gprs` against NULL, and b) we need to `pull()` the `l1ctl_hdr`. This is common for both messages and having two separate functions would be code duplication. The two different functions below are "external" ones from l1gprs. So I disagree that it's "totally unnecesary" and prefer to do it this way. It's not like I am mixing up all GPRS related L1CTL messages here, just the two related ones. https://gerrit.osmocom.org/c/osmocom-bb/+/30743/comment/7f2ed3a0_7fad25de PS10, Line 69: if (OSMO_UNLIKELY(fn_sched != req.hdr.fn)) { > AFAIU this should be OK if req.hdr.fn < fn_sched (taking wraparound into account). No. The frame number must match, otherwise we're sending stuff earlier or later then requested, what is unacceptable in GPRS. We're violating this and not returning early below, but this is rather a temporary hack. https://gerrit.osmocom.org/c/osmocom-bb/+/30743/comment/67a04d89_0da714d1 PS10, Line 73: /* FIXME: return; */ > yes, you must return here and not schedule it. Well, at the moment we always hit this block. So if we return, all UL blocks will be discarded. The root problem needs to be fixed first. Either virtphy is scheduling stuff in advance, or the upper layers are sending block too late. For now it's a FIXME. File src/shared/l1gprs.c: https://gerrit.osmocom.org/c/osmocom-bb/+/30743/comment/ac1f7c60_60c68060 PS10, Line 83: static struct l1gprs_tbf *l1gprs_find_tbf(struct l1gprs_state *gprs, > In the end you find based on uplink and downlink, so yeah having 2 llists makes sense imho. What do we win by having two different lists? -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30743 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I9567d64f9d00262e36147e8d7e541e5e246bda5f Gerrit-Change-Number: 30743 Gerrit-PatchSet: 11 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Thu, 16 Mar 2023 14:28:21 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmocom-bb[master]: modem: route L1CTL prims to/from libosmo-gprs-rlcmac
by pespin 16 Mar '23

16 Mar '23
Attention is currently required from: fixeria. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/31572 ) Change subject: modem: route L1CTL prims to/from libosmo-gprs-rlcmac ...................................................................... Patch Set 7: (1 comment) File src/host/layer23/src/modem/rlcmac.c: https://gerrit.osmocom.org/c/osmocom-bb/+/31572/comment/c55887cb_943c202e PS3, Line 131: lp->pdch_data_req.ts_nr, > return l1ctl_tx_gprs_ul_block_req(ms, […] Not yet fixed. I'm not against aligning parameters, what I'm saying is that you should then align all of them to the same indentation, not doing so for 1..N params and keeping the first one at a different indentation. -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/31572 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I38e9a686f8edc3fe55f961d75e68602c33bbbaaf Gerrit-Change-Number: 31572 Gerrit-PatchSet: 7 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Thu, 16 Mar 2023 14:11:15 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmocom-bb[master]: layer23/{mobile,modem}: prefix VTY prompt with projetc's name
by pespin 16 Mar '23

16 Mar '23
Attention is currently required from: fixeria. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/31946 ) Change subject: layer23/{mobile,modem}: prefix VTY prompt with projetc's name ...................................................................... Patch Set 1: Code-Review+1 (1 comment) Commit Message: https://gerrit.osmocom.org/c/osmocom-bb/+/31946/comment/48c95001_91122969 PS1, Line 7: layer23/{mobile,modem}: prefix VTY prompt with projetc's name typo project -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/31946 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: If7ce89362c75e2c15995dfb08cfcfdcad24e2529 Gerrit-Change-Number: 31946 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Thu, 16 Mar 2023 14:05:00 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmocom-bb[master]: layer23/{mobile,modem}: fix segfault on VTY connection
by pespin 16 Mar '23

16 Mar '23
Attention is currently required from: fixeria. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/31945 ) Change subject: layer23/{mobile,modem}: fix segfault on VTY connection ...................................................................... Patch Set 1: Code-Review+1 (1 comment) Patchset: PS1: so that means the struct is not copied by the function but keeps a reference to it, did I understand correctly? -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/31945 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I75843a964254243c70bedcf8ff97d854107ee21a Gerrit-Change-Number: 31945 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Thu, 16 Mar 2023 14:04:42 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmocom-bb[master]: layer23: implement Rx/Tx API for GPRS related messages
by pespin 16 Mar '23

16 Mar '23
Attention is currently required from: fixeria. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/31571 ) Change subject: layer23: implement Rx/Tx API for GPRS related messages ...................................................................... Patch Set 7: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/31571 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I87950e893ef96ff8328f43f1548111aa9f66439b Gerrit-Change-Number: 31571 Gerrit-PatchSet: 7 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, 16 Mar 2023 13:54:57 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[XL] Change in osmocom-bb[master]: {trxcon,virt_phy}: shared GPRS L1 (MAC) implementation
by pespin 16 Mar '23

16 Mar '23
Attention is currently required from: laforge, fixeria. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30743 ) Change subject: {trxcon,virt_phy}: shared GPRS L1 (MAC) implementation ...................................................................... Patch Set 10: (10 comments) Patchset: PS10: Most messages are improvements which can be done at a later stuff. Some others really need looking at. File include/l1ctl_proto.h: https://gerrit.osmocom.org/c/osmocom-bb/+/30743/comment/b567ecd3_2af0709c PS10, Line 367: uint8_t padding[3]; I still don't see the point in adding these padding bytes here. Can you explain? What's the rationale behind aligning to 4 bytes? File include/l1gprs.h: https://gerrit.osmocom.org/c/osmocom-bb/+/30743/comment/aa8c6737_9baa6b40 PS10, Line 39: /*! Uplink and Downlink TBFs */ It probably makes sense to have 1 list for DL_TBF and another one for UL_TBF. After all, you get a CFG UL TBF or CFG DL TBF, so you know which of the 2 lists to lookup. File src/host/virt_phy/src/virt_prim_pdch.c: https://gerrit.osmocom.org/c/osmocom-bb/+/30743/comment/970fc438_950cac98 PS10, Line 34: void l1ctl_rx_gprs_uldl_tbf_cfg_req(struct l1_model_ms *ms, struct msgb *msg) So you send both L1CTL messages to this function, to then split it again to 2 differents functions below. This function sounds totally unnecesary and only makes things more complex/confusing. https://gerrit.osmocom.org/c/osmocom-bb/+/30743/comment/dcd07d9f_1a1bbc5b PS10, Line 69: if (OSMO_UNLIKELY(fn_sched != req.hdr.fn)) { AFAIU this should be OK if req.hdr.fn < fn_sched (taking wraparound into account). https://gerrit.osmocom.org/c/osmocom-bb/+/30743/comment/3fc69557_4b7292e3 PS10, Line 73: /* FIXME: return; */ yes, you must return here and not schedule it. File src/shared/l1gprs.c: https://gerrit.osmocom.org/c/osmocom-bb/+/30743/comment/6380e460_9a75a685 PS10, Line 83: static struct l1gprs_tbf *l1gprs_find_tbf(struct l1gprs_state *gprs, In the end you find based on uplink and downlink, so yeah having 2 llists makes sense imho. https://gerrit.osmocom.org/c/osmocom-bb/+/30743/comment/c93808bb_096403d7 PS10, Line 111: if (tbf->uplink) { Again sounds like you could perfectly have 2 functions. You could also have 2 tbf structs (UL and DL) and spare the dl_tfi_mask in ul_tbf ones. https://gerrit.osmocom.org/c/osmocom-bb/+/30743/comment/ce85645c_b0a3408f PS10, Line 294: l1gprs_register_tbf(gprs, tbf); I think it may be good to always first unregister, and if != 0x00, also register. This way a TBF can updated its TS allocation in 1 go. https://gerrit.osmocom.org/c/osmocom-bb/+/30743/comment/974fee06_900233fb PS10, Line 330: l1gprs_register_tbf(gprs, tbf); Same as per what I said on ul_tbf above. -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30743 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I9567d64f9d00262e36147e8d7e541e5e246bda5f Gerrit-Change-Number: 30743 Gerrit-PatchSet: 10 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Thu, 16 Mar 2023 13:51:45 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmocom-bb[master]: modem: route L1CTL prims to/from libosmo-gprs-rlcmac
by fixeria 16 Mar '23

16 Mar '23
Attention is currently required from: pespin. Hello Jenkins Builder, pespin, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmocom-bb/+/31572 to look at the new patch set (#7). Change subject: modem: route L1CTL prims to/from libosmo-gprs-rlcmac ...................................................................... modem: route L1CTL prims to/from libosmo-gprs-rlcmac Change-Id: I38e9a686f8edc3fe55f961d75e68602c33bbbaaf Related: OS#5500 --- M src/host/layer23/src/modem/rlcmac.c 1 file changed, 74 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/72/31572/7 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/31572 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I38e9a686f8edc3fe55f961d75e68602c33bbbaaf Gerrit-Change-Number: 31572 Gerrit-PatchSet: 7 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
[M] Change in osmocom-bb[master]: layer23: implement Rx/Tx API for GPRS related messages
by fixeria 16 Mar '23

16 Mar '23
Attention is currently required from: fixeria. Hello Jenkins Builder, laforge, pespin, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmocom-bb/+/31571 to look at the new patch set (#7). Change subject: layer23: implement Rx/Tx API for GPRS related messages ...................................................................... layer23: implement Rx/Tx API for GPRS related messages Change-Id: I87950e893ef96ff8328f43f1548111aa9f66439b Related: OS#5500 --- M src/host/layer23/include/osmocom/bb/common/l1ctl.h M src/host/layer23/include/osmocom/bb/common/ms.h M src/host/layer23/src/common/l1ctl.c 3 files changed, 127 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/71/31571/7 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/31571 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I87950e893ef96ff8328f43f1548111aa9f66439b Gerrit-Change-Number: 31571 Gerrit-PatchSet: 7 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-MessageType: newpatchset
1 0
0 0
[M] Change in osmocom-bb[master]: modem: add test VTY command for sending raw LLC PDUs
by fixeria 16 Mar '23

16 Mar '23
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/31657 ) ( 4 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: modem: add test VTY command for sending raw LLC PDUs ...................................................................... modem: add test VTY command for sending raw LLC PDUs Change-Id: I14f58e715d77a1b1cb40fdd3ddd09084360f2274 Related: OS#5500 --- M src/host/layer23/src/modem/vty.c 1 file changed, 83 insertions(+), 0 deletions(-) Approvals: pespin: Looks good to me, but someone else must approve osmith: Looks good to me, but someone else must approve fixeria: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/layer23/src/modem/vty.c b/src/host/layer23/src/modem/vty.c index b8e0e2d..4fa8e1d 100644 --- a/src/host/layer23/src/modem/vty.c +++ b/src/host/layer23/src/modem/vty.c @@ -23,6 +23,9 @@ #include <osmocom/core/talloc.h> #include <osmocom/core/linuxlist.h> +#include <osmocom/gprs/llc/llc.h> +#include <osmocom/gprs/llc/llc_prim.h> + #include <osmocom/vty/vty.h> #include <osmocom/vty/command.h> @@ -56,6 +59,7 @@ #define MS_NAME_DESC "Name of MS (see \"show ms\")\n" #define TEST_CMD_DESC "Testing commands for developers\n" #define GRR_CMDG_DESC "GPRS RR specific commands\n" +#define LLC_CMDG_DESC "GPRS LLC specific commands\n" /* testing commands */ DEFUN_HIDDEN(test_grr_tx_chan_req, @@ -81,6 +85,73 @@ return CMD_SUCCESS; } +DEFUN_HIDDEN(test_llc_unitdata_req_hexpdu, + test_llc_unitdata_req_hexpdu_cmd, + "test MS_NAME llc unitdata-req <0x00-0xffffffff> SAPI HEXSTRING", + TEST_CMD_DESC MS_NAME_DESC LLC_CMDG_DESC + "Enqueue an LLC UNITDATA.req for transmission\n" + "TLLI (Temporary Logical Link Identifier) value to be used\n" + "SAPI value to be used (for example, GMM, SMS, SNDCP3)\n" + "LLC PDU as a hexstring (up to 512 octets)\n") +{ + struct osmo_gprs_llc_prim *llc_prim; + struct osmocom_ms *ms; + uint8_t buf[512]; + int tlli, sapi, pdu_len; + + if ((ms = l23_vty_get_ms(argv[0], vty)) == NULL) + return CMD_WARNING; + + if (osmo_str_to_int(&tlli, argv[1], 0, 0, 0xffffff) < 0) + return CMD_WARNING; + sapi = get_string_value(osmo_gprs_llc_sapi_names, argv[2]); + if (sapi < 0) + return CMD_WARNING; + pdu_len = osmo_hexparse(argv[3], &buf[0], sizeof(buf)); + if (pdu_len < 0) + return CMD_WARNING; + + llc_prim = osmo_gprs_llc_prim_alloc_ll_unitdata_req(tlli, sapi, &buf[0], pdu_len); + if (osmo_gprs_llc_prim_upper_down(llc_prim) != 0) { + vty_out(vty, "Failed to enqueue an LLC PDU%s", VTY_NEWLINE); + return CMD_WARNING; + } + + return CMD_SUCCESS; +} + +static uint8_t pdu_gmmm_attach_req[] = { + 0x08, 0x01, 0x02, 0xe5, 0xe0, 0x01, 0x0a, 0x00, 0x05, 0xf4, 0xf4, 0x3c, 0xec, 0x71, 0x32, 0xf4, + 0x07, 0x00, 0x05, 0x00, 0x17, 0x19, 0x33, 0x43, 0x2b, 0x37, 0x15, 0x9e, 0xf9, 0x88, 0x79, 0xcb, + 0xa2, 0x8c, 0x66, 0x21, 0xe7, 0x26, 0x88, 0xb1, 0x98, 0x87, 0x9c, 0x00, 0x17, 0x05, +}; + +/* TODO: remove this command once we have the GMM layer implemented */ +DEFUN_HIDDEN(test_llc_unitdata_req_gmm_attch, + test_llc_unitdata_req_gmm_attch_cmd, + "test MS_NAME llc unitdata-req gmm-attach-req", + TEST_CMD_DESC MS_NAME_DESC LLC_CMDG_DESC + "Enqueue an LLC UNITDATA.req for transmission\n" + "Hard-coded GMM Attach Request (SAPI=GMM, TLLI=0xe1c5d364)\n") +{ + struct osmo_gprs_llc_prim *llc_prim; + const uint32_t tlli = 0xe1c5d364; + struct osmocom_ms *ms; + + if ((ms = l23_vty_get_ms(argv[0], vty)) == NULL) + return CMD_WARNING; + + llc_prim = osmo_gprs_llc_prim_alloc_ll_unitdata_req(tlli, OSMO_GPRS_LLC_SAPI_GMM, + &pdu_gmmm_attach_req[0], + sizeof(pdu_gmmm_attach_req)); + if (osmo_gprs_llc_prim_upper_down(llc_prim) != 0) { + vty_out(vty, "Failed to enqueue an LLC PDU%s", VTY_NEWLINE); + return CMD_WARNING; + } + + return CMD_SUCCESS; +} + /* per APN config */ DEFUN(cfg_ms_apn, cfg_ms_apn_cmd, "apn APN_NAME", "Configure an APN\n" @@ -262,6 +333,8 @@ return rc; install_element_ve(&l23_show_ms_cmd); install_element_ve(&test_grr_tx_chan_req_cmd); + install_element_ve(&test_llc_unitdata_req_hexpdu_cmd); + install_element_ve(&test_llc_unitdata_req_gmm_attch_cmd); install_element(CONFIG_NODE, &l23_cfg_ms_cmd); install_element(MS_NODE, &cfg_ms_apn_cmd); -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/31657 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I14f58e715d77a1b1cb40fdd3ddd09084360f2274 Gerrit-Change-Number: 31657 Gerrit-PatchSet: 5 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in osmocom-bb[master]: modem: add test VTY command to send CHANNEL REQUEST
by fixeria 16 Mar '23

16 Mar '23
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/31656 ) ( 4 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: modem: add test VTY command to send CHANNEL REQUEST ...................................................................... modem: add test VTY command to send CHANNEL REQUEST Do not call grr_tx_chan_req() unconditionally from grr_rx_bcch(). Add a special (hidden, expert mode) VTY command for that. Change-Id: I049a8d7f58ae9703d06dff235973ba376702c873 Related: OS#5500 --- M src/host/layer23/include/osmocom/bb/modem/grr.h M src/host/layer23/src/modem/grr.c M src/host/layer23/src/modem/vty.c 3 files changed, 52 insertions(+), 7 deletions(-) Approvals: pespin: Looks good to me, but someone else must approve osmith: Looks good to me, but someone else must approve fixeria: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/host/layer23/include/osmocom/bb/modem/grr.h b/src/host/layer23/include/osmocom/bb/modem/grr.h index 208dbb1..1f2b08c 100644 --- a/src/host/layer23/include/osmocom/bb/modem/grr.h +++ b/src/host/layer23/include/osmocom/bb/modem/grr.h @@ -1,6 +1,12 @@ #pragma once +#include <stdbool.h> +#include <stdint.h> + struct msgb; +struct osmocom_ms; struct lapdm_entity; int modem_grr_rslms_cb(struct msgb *msg, struct lapdm_entity *le, void *ctx); +int modem_grr_tx_chan_req(struct osmocom_ms *ms, uint8_t chan_req); +uint8_t modem_grr_gen_chan_req(bool single_block); diff --git a/src/host/layer23/src/modem/grr.c b/src/host/layer23/src/modem/grr.c index e46f77d..b22832e 100644 --- a/src/host/layer23/src/modem/grr.c +++ b/src/host/layer23/src/modem/grr.c @@ -47,7 +47,7 @@ #include <l1ctl_proto.h> /* Generate an 8-bit CHANNEL REQUEST message as per 3GPP TS 44.018, 9.1.8 */ -static uint8_t grr_gen_chan_req(bool single_block) +uint8_t modem_grr_gen_chan_req(bool single_block) { uint8_t rnd = (uint8_t)rand(); @@ -76,7 +76,7 @@ return false; } -static int grr_tx_chan_req(struct osmocom_ms *ms, bool single_block) +int modem_grr_tx_chan_req(struct osmocom_ms *ms, uint8_t chan_req) { struct gsm322_cellsel *cs = &ms->cellsel; struct gsm48_rrlayer *rr = &ms->rrlayer; @@ -88,7 +88,7 @@ if (!cs->sel_si.gprs.supported) return -ENOTSUP; - rr->cr_ra = grr_gen_chan_req(single_block); + rr->cr_ra = chan_req; memset(&rr->cr_hist[0], 0x00, sizeof(rr->cr_hist)); LOGP(DRR, LOGL_NOTICE, "Sending CHANNEL REQUEST (0x%02x)\n", rr->cr_ra); @@ -209,10 +209,6 @@ LOGP(DRR, LOGL_INFO, "BCCH message (type=0x%02x): %s\n", si_type, gsm48_rr_msg_name(si_type)); - /* HACK: request an Uplink TBF here (one phase access) */ - if (ms->rrlayer.state == GSM48_RR_ST_IDLE) - grr_tx_chan_req(ms, false); - switch (si_type) { case GSM48_MT_RR_SYSINFO_1: return grr_handle_si1(ms, msg); diff --git a/src/host/layer23/src/modem/vty.c b/src/host/layer23/src/modem/vty.c index e462a23..b8e0e2d 100644 --- a/src/host/layer23/src/modem/vty.c +++ b/src/host/layer23/src/modem/vty.c @@ -30,6 +30,7 @@ #include <osmocom/bb/common/vty.h> #include <osmocom/bb/common/apn.h> #include <osmocom/bb/common/ms.h> +#include <osmocom/bb/modem/grr.h> #include <osmocom/bb/modem/vty.h> static struct cmd_node apn_node = { @@ -52,6 +53,34 @@ return vty->node; } +#define MS_NAME_DESC "Name of MS (see \"show ms\")\n" +#define TEST_CMD_DESC "Testing commands for developers\n" +#define GRR_CMDG_DESC "GPRS RR specific commands\n" + +/* testing commands */ +DEFUN_HIDDEN(test_grr_tx_chan_req, + test_grr_tx_chan_req_cmd, + "test MS_NAME grr tx-chan-req (1phase|2phase)", + TEST_CMD_DESC MS_NAME_DESC GRR_CMDG_DESC + "Send a CHANNEL REQUEST (RACH) to the network\n" + "One-phase packet access (011110xx or 01111x0x or 01111xx0)\n" + "Two-phase (single block) packet access (01110xxx)\n") +{ + struct osmocom_ms *ms; + uint8_t chan_req; + + if ((ms = l23_vty_get_ms(argv[0], vty)) == NULL) + return CMD_WARNING; + + chan_req = modem_grr_gen_chan_req(argv[1][0] == '2'); + if (modem_grr_tx_chan_req(ms, chan_req) != 0) { + vty_out(vty, "Failed to send a CHANNEL REQUEST%s", VTY_NEWLINE); + return CMD_WARNING; + } + + return CMD_SUCCESS; +} + /* per APN config */ DEFUN(cfg_ms_apn, cfg_ms_apn_cmd, "apn APN_NAME", "Configure an APN\n" @@ -232,6 +261,7 @@ if ((rc = l23_vty_init(config_write, NULL)) < 0) return rc; install_element_ve(&l23_show_ms_cmd); + install_element_ve(&test_grr_tx_chan_req_cmd); install_element(CONFIG_NODE, &l23_cfg_ms_cmd); install_element(MS_NODE, &cfg_ms_apn_cmd); -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/31656 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I049a8d7f58ae9703d06dff235973ba376702c873 Gerrit-Change-Number: 31656 Gerrit-PatchSet: 5 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • ...
  • 365
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.