Attention is currently required from: pespin, fixeria.
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/29403 )
Change subject: llc: add struct value_string osmo_gprs_llc_sapi_names[]
......................................................................
Patch Set 2:
(1 comment)
File include/osmocom/gprs/llc/llc.h:
https://gerrit.osmocom.org/c/libosmo-gprs/+/29403/comment/e5b57f07_cfd95dbd
PS2, Line 22: #define osmo_gprs_llc_sapi_name(val) \
> we usually have static inlines for this, it also becomes clearer regarding the value passed to it.
ack
--
To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/29403
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-gprs
Gerrit-Branch: master
Gerrit-Change-Id: I8ae048ab9e6b63697951fa3f74ce671c88328f5f
Gerrit-Change-Number: 29403
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: neels <nhofmeyr(a)sysmocom.de>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 19 Sep 2022 11:42:24 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: pespin, fixeria.
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/29402 )
Change subject: llc: implement LLC PDU codec based on code from osmo-sgsn.git
......................................................................
Patch Set 2:
(12 comments)
File include/osmocom/gprs/llc/llc.h:
https://gerrit.osmocom.org/c/libosmo-gprs/+/29402/comment/f79d3fd9_4976821e
PS2, Line 132:
with bitmasks like this it is often much more flexibly useful to define the constants as the shift amount, i.e.
enum osmo_gprs_llc_pdu_f {
OSMO_..._CMD_RSP = 0,
..._FOLL_FIN = 1,
...
}
because it is computationally trivial to do '(1 << OSMO__CMD_RSP)', but hard to do the reverse (get the bit nr from a bitmask).
Also I'd prefer an enum to group these.
File include/osmocom/gprs/llc/llc.h:
https://gerrit.osmocom.org/c/libosmo-gprs/+/29402/comment/7f4302bd_72744db8
PS1, Line 135: #define OSMO_GPRS_LLC_PDU_F_ACK_REQ (1 << 2) /* 6.3.5.2 Acknowledgement request bit (A) */
> No, this is how it's written in the specs.
i would always have written "acknowledgement" but apparently the accepted correct spelling is "acknowledgment". i'd be fine with the 'wrong' spelling
File src/llc/llc_pdu.c:
https://gerrit.osmocom.org/c/libosmo-gprs/+/29402/comment/ad02aeb0_16e80e53
PS2, Line 80: void osmo_gprs_llc_pdu_hdr_dump_buf(const struct osmo_gprs_llc_pdu_decoded *pdu,
please make this function signature match snprintf(), because then it can be used by OSMO_STRBUF_APPEND(), as well as OSMO_NAME_C_IMPL to make a foo_dump_c() function:
int foo(char *buf, size_t buf_size, const arg)
{
...
return sb.chars_needed;
}
https://gerrit.osmocom.org/c/libosmo-gprs/+/29402/comment/e74514e7_f1269c1c
PS2, Line 122: static __thread char buf[256];
much prefer to move away from static buffers and instead make this a ctx function
char *osmo_gprs_llc_pdu_hdr_dump_c(void *ctx, const ... pdu)
{
OSMO_NAME_C_IMPL(ctx, 128, "ERROR", osmo_gprs_llc_pdu_hdr_dump_buf, pdu)
}
https://gerrit.osmocom.org/c/libosmo-gprs/+/29402/comment/51dd925c_51d0031a
PS2, Line 127: /* 6.4.1 Unnumbered (U) frames */
i'd prefer an enum to group these
https://gerrit.osmocom.org/c/libosmo-gprs/+/29402/comment/056565e4_0260d851
PS2, Line 144: addr[0] |= pdu->sapi & 0x0f;
The msgb is passed in from the caller, who knows what data may linger from a previous msgb_trim() or other msgb manipulation. So cannot be sure that the msgb is zero initialized. rather make the first assignments '=', not '|='. (same for ctrl[*])
https://gerrit.osmocom.org/c/libosmo-gprs/+/29402/comment/d5d37f59_9f05df90
PS2, Line 157: ctrl[0] |= (pdu->seq_tx >> 4) & 0x1f;
> looks like we want a packed struct for "ctrl" here?
bit shifting would be fine with me; but the advantage of a packed struct is that the decode function below can use the same struct, hence not "duplicating" the bit shifting code.
OTOH if this is code copied 1:1 from osmo-sgsn.git then let's not edit it, just adopt it the way it always was, at least to begin with.
https://gerrit.osmocom.org/c/libosmo-gprs/+/29402/comment/3e1cdd8f_3cf8d17e
PS2, Line 166: OSMO_ASSERT(pdu->sack.len > 0);
hmm, mildly disagree with OSMO_ASSERT() in a library function, would be more polite to return an error code instead (same below)
https://gerrit.osmocom.org/c/libosmo-gprs/+/29402/comment/5b756aac_c3b92349
PS2, Line 277: che
weird to see this linter vote after
https://gerrit.osmocom.org/c/osmo-ci/+/29359https://gerrit.osmocom.org/c/libosmo-gprs/+/29402/comment/7b27cb6b_8c60834a
PS2, Line 293: check_len(sizeof(*addr), "missing Address field");
addr being a uint8_t*, sizeof(*addr) is a very elaborate and possibly confusing way to write "1". Please just write "1".
https://gerrit.osmocom.org/c/libosmo-gprs/+/29402/comment/faca719d_0638b9e6
PS2, Line 326: check_len(sizeof(*ctrl), "missing Control field");
s/sizeof(*ctrl)/1
File tests/llc_pdu_codec/pdu_codec_test.c:
https://gerrit.osmocom.org/c/libosmo-gprs/+/29402/comment/39befa3a_64d3cce6
PS2, Line 66: struct msgb *msg = msgb_alloc(1024, "LLC-PDU");
declare msg at start of scope
--
To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/29402
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-gprs
Gerrit-Branch: master
Gerrit-Change-Id: I61d7e2e6d0a8f2cdfc2113e637e447dc428cc70d
Gerrit-Change-Number: 29402
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: neels <nhofmeyr(a)sysmocom.de>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 19 Sep 2022 11:41:15 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: pespin.
osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/meta-telephony/+/29368 )
Change subject: git clones: git.osmocom.org -> gerrit.osmocom.org
......................................................................
Patch Set 2: Verified+1
(1 comment)
File recipes-osmocom/libosmo-netif/libosmo-netif.inc:
https://gerrit.osmocom.org/c/meta-telephony/+/29368/comment/6b599d28_c42b59…
PS1, Line 2: HOMEPAGE = "http://gerrit.osmocom.org"
> -> https://gerrit.osmocom.org/c/meta-telephony/+/29413 […]
actually the homepage shouldn't have been changed in this patch, only SRC_URI. I've updated the patch to leave this line as-is, and the next patch updates the homepage.
--
To view, visit https://gerrit.osmocom.org/c/meta-telephony/+/29368
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: meta-telephony
Gerrit-Branch: 201705
Gerrit-Change-Id: I2b9640b542ed68b3f5abf63e774e4f878232211a
Gerrit-Change-Number: 29368
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 19 Sep 2022 10:56:54 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: osmith <osmith(a)sysmocom.de>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: pespin.
osmith has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/meta-telephony/+/29368 )
Change subject: git clones: git.osmocom.org -> gerrit.osmocom.org
......................................................................
git clones: git.osmocom.org -> gerrit.osmocom.org
Related: SYS#6022
Change-Id: I2b9640b542ed68b3f5abf63e774e4f878232211a
---
M recipes-misc/libsmpp/libsmpp34_git.bb
M recipes-osmocom/libasn1c/libasn1c_git.bb
M recipes-osmocom/libosmo-abis/libosmo-abis_git.bb
M recipes-osmocom/libosmo-netif/libosmo-netif_git.bb
M recipes-osmocom/libosmo-sccp/libosmo-sccp_git.bb
M recipes-osmocom/libosmocore/libosmocore_git.bb
M recipes-osmocom/openbsc/openbsc_git.bb
M recipes-osmocom/osmo-bsc/osmo-bsc_git.bb
M recipes-osmocom/osmo-gbproxy/osmo-gbproxy_git.bb
M recipes-osmocom/osmo-ggsn/osmo-ggsn_git.bb
M recipes-osmocom/osmo-hlr/osmo-hlr_git.bb
M recipes-osmocom/osmo-hnbgw/osmo-hnbgw_git.bb
M recipes-osmocom/osmo-iuh/osmo-iuh_git.bb
M recipes-osmocom/osmo-mgw/osmo-mgw_git.bb
M recipes-osmocom/osmo-msc/osmo-msc_git.bb
M recipes-osmocom/osmo-pcap/osmo-pcap_git.bb
M recipes-osmocom/osmo-sgsn/osmo-sgsn_git.bb
M recipes-osmocom/osmo-sip-connector/osmo-sip-connector_git.bb
M recipes-osmocom/osmo-sysmon/osmo-sysmon_git.bb
19 files changed, 19 insertions(+), 19 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/meta-telephony refs/changes/68/29368/2
--
To view, visit https://gerrit.osmocom.org/c/meta-telephony/+/29368
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: meta-telephony
Gerrit-Branch: 201705
Gerrit-Change-Id: I2b9640b542ed68b3f5abf63e774e4f878232211a
Gerrit-Change-Number: 29368
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: pespin, fixeria.
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/29398 )
Change subject: llc: add missing LLE <-> (RLC/MAC,BSSGP) primitives
......................................................................
Patch Set 2: Code-Review+1
(1 comment)
File include/osmocom/gprs/llc/llc.h:
https://gerrit.osmocom.org/c/libosmo-gprs/+/29398/comment/78d3b315_90c3fd73
PS2, Line 58: /* LLE <-> RLC/MAC (MS side) */
> These look like different interfaces, are you sure these should be in the same enum? the scope looks […]
i thought the same in previous patch: LLGMM vs LL. But all is prefixed LLC and i trust fixeria that it makes sense
--
To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/29398
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-gprs
Gerrit-Branch: master
Gerrit-Change-Id: I10bb63220585424584185ce2bde2d9f8fd0d8342
Gerrit-Change-Number: 29398
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 19 Sep 2022 10:49:03 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment