pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/21243 )

Change subject: ns2: add support for frame relay
......................................................................


Patch Set 1: Code-Review-1

(19 comments)

https://gerrit.osmocom.org/c/libosmocore/+/21243/1/src/gb/frame_relay.c
File src/gb/frame_relay.c:

https://gerrit.osmocom.org/c/libosmocore/+/21243/1/src/gb/frame_relay.c@106 
PS1, Line 106: /* RX Message: 14 [ 00 01 03 08 00 75  95 01 01 00 03 02 01 00 ] 
*/
this can be dropped right?


https://gerrit.osmocom.org/c/libosmocore/+/21243/1/src/gb/frame_relay.c@119
PS1, Line 119: //               .default_val = 10,
?


https://gerrit.osmocom.org/c/libosmocore/+/21243/1/src/gb/frame_relay.c@222
PS1, Line 222:          ie[2] |= 0x02;
what are these 0x02 0x04 0x08? Please add defines for those.


https://gerrit.osmocom.org/c/libosmocore/+/21243/1/src/gb/frame_relay.c@276
PS1, Line 276:
line can be dropped.


https://gerrit.osmocom.org/c/libosmocore/+/21243/1/src/gb/frame_relay.c@310
PS1, Line 310:          LOGPFRL(link, LOGL_ERROR, "STATUS-ENQ aren't support 
for role user\n");
"are not supported"


https://gerrit.osmocom.org/c/libosmocore/+/21243/1/src/gb/frame_relay.c@343
PS1, Line 343:                          /* TODO: implement FRNET free */
sounds like leaking memory?


https://gerrit.osmocom.org/c/libosmocore/+/21243/1/src/gb/frame_relay.c@366
PS1, Line 366:  link->succeed = link->succeed << 1;
link->succeed <<= 1;


https://gerrit.osmocom.org/c/libosmocore/+/21243/1/src/gb/frame_relay.c@370
PS1, Line 370:  /* count the bits */
It would be great to explain a bit better what exactly are you doing here or 
provide some spec reference.


https://gerrit.osmocom.org/c/libosmocore/+/21243/1/src/gb/frame_relay.c@461
PS1, Line 461:                          LOGPFRL(link, LOGL_ERROR, "Could not 
create DLC %d\n", dlci);
return, or directly OSMO_ASERT.


https://gerrit.osmocom.org/c/libosmocore/+/21243/1/src/gb/frame_relay.c@468
PS1, Line 468:          dlc->add = pvc->new;
not sure if this "new" here will cause problems when compiling with c++.


https://gerrit.osmocom.org/c/libosmocore/+/21243/1/src/gb/frame_relay.c@657
PS1, Line 657:  tlv_parse2(tp, MAX_SUPPORTED_PVC + 1, &q933_att_tlvdef, 
msgb_l3(msg) + sizeof(*qh), msgb_l3len(msg) - sizeof(*qh), 0, 0);
check return code.


https://gerrit.osmocom.org/c/libosmocore/+/21243/1/src/gb/frame_relay.c@889
PS1, Line 889: /* TODO: osmo_fr_dlc_alloc with deregistering it from the link 
in fr-net */
you probably mean _free here?


https://gerrit.osmocom.org/c/libosmocore/+/21243/1/src/gb/gprs_ns2.c
File src/gb/gprs_ns2.c:

https://gerrit.osmocom.org/c/libosmocore/+/21243/1/src/gb/gprs_ns2.c@262
PS1, Line 262:          snprintf(buf, buf_len, "fr)netif: %s dlci: %s", 
"hdlcX", "unsupported");
this needs work to print correct variables right?


https://gerrit.osmocom.org/c/libosmocore/+/21243/1/src/gb/gprs_ns2_fr.c
File src/gb/gprs_ns2_fr.c:

https://gerrit.osmocom.org/c/libosmocore/+/21243/1/src/gb/gprs_ns2_fr.c@86
PS1, Line 86: struct iphdr
Don't we have this defined somewhere else? We should move this to some osmocom 
compat header IMHO, similar to what we do with timespecs, etc.


https://gerrit.osmocom.org/c/libosmocore/+/21243/1/src/gb/gprs_ns2_fr.c@119 
PS1, Line 119:  char netif[IF_NAMESIZE + 1];
IFNAMSIZ. That's the maximum size including the null char.


https://gerrit.osmocom.org/c/libosmocore/+/21243/1/src/gb/gprs_ns2_fr.c@263
PS1, Line 263:  /* FIXME */
this should be added now right?


https://gerrit.osmocom.org/c/libosmocore/+/21243/1/src/gb/gprs_ns2_fr.c@301
PS1, Line 301:  /* FIXME half writes */
IIUC this should put stuff into a wqueue?


https://gerrit.osmocom.org/c/libosmocore/+/21243/1/src/gb/gprs_ns2_vty.c
File src/gb/gprs_ns2_vty.c:

https://gerrit.osmocom.org/c/libosmocore/+/21243/1/src/gb/gprs_ns2_vty.c@86
PS1, Line 86:   char netif[IF_NAMESIZE + 1];
remove +1


https://gerrit.osmocom.org/c/libosmocore/+/21243/1/src/gb/gprs_ns2_vty.c@484
PS1, Line 484:  uint16_t dlci = atoi(argv[2]);
This looks wrong, I only see 2 arguments in this vty cmd.



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/21243
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Id3b49f93d33c271f77cd9c9db03cde6b727a4d30
Gerrit-Change-Number: 21243
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-Comment-Date: Thu, 19 Nov 2020 10:05:08 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment

Reply via email to