<p><a href="https://gerrit.osmocom.org/c/libosmocore/+/21243">View Change</a></p><p>9 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/libosmocore/+/21243/1/include/osmocom/gprs/frame_relay.h">File include/osmocom/gprs/frame_relay.h:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/libosmocore/+/21243/1/include/osmocom/gprs/frame_relay.h@1">Patch Set #1, Line 1:</a> <code style="font-family:monospace,monospace">/*! \file frame_relay.h */</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">missing copyright / license statement (yes, my fault in the initial code, but I don't want to mess with your patchset now)</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/libosmocore/+/21243/1/src/gb/frame_relay.c">File src/gb/frame_relay.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/libosmocore/+/21243/1/src/gb/frame_relay.c@14">Patch Set #1, Line 14:</a> <code style="font-family:monospace,monospace"></code></p><p style="white-space: pre-wrap; word-wrap: break-word;">missing copyright / license statement (yes, my fault in the initial code, but I don't want to mess with your patchset now)</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/libosmocore/+/21243/1/src/gb/frame_relay.c@106">Patch Set #1, Line 106:</a> <code style="font-family:monospace,monospace">/* RX Message: 14 [ 00 01 03 08 00 75  95 01 01 00 03 02 01 00 ] */</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">this can be dropped right?</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">what's bad about some examples of the messages in a comment?</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/libosmocore/+/21243/1/src/gb/frame_relay.c@222">Patch Set #1, Line 222:</a> <code style="font-family:monospace,monospace">         ie[2] |= 0x02;</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">what are these 0x02 0x04 0x08? Please add defines for those.</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">They are the bits we need to use for the "active" "add" and "del" situations. I find the existing code sufficiently clear, as the name of the function is visible from every "if" statement above.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/libosmocore/+/21243/1/src/gb/frame_relay.c@366">Patch Set #1, Line 366:</a> <code style="font-family:monospace,monospace">      link->succeed = link->succeed << 1;</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">link->succeed <<= 1;</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">works either way, there is no rule that your version is superior or preferred, IMHO. Matter of taste.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/libosmocore/+/21243/1/src/gb/frame_relay.c@461">Patch Set #1, Line 461:</a> <code style="font-family:monospace,monospace">                         LOGPFRL(link, LOGL_ERROR, "Could not create DLC %d\n", dlci);</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">return, or directly OSMO_ASERT.</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">why? all the other DLCs in the message might just as well have been created?  This function is executed in response to data received from the peer.  I don't think we should assert here.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/libosmocore/+/21243/1/src/gb/frame_relay.c@468">Patch Set #1, Line 468:</a> <code style="font-family:monospace,monospace">               dlc->add = pvc->new;</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">not sure if this "new" here will cause problems when compiling with c++.</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">we do not anticipate the compilation of the frame relay code in C++ programs.</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/libosmocore/+/21243/1/src/gb/gprs_ns2_fr.c">File src/gb/gprs_ns2_fr.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/libosmocore/+/21243/1/src/gb/gprs_ns2_fr.c@86">Patch Set #1, Line 86:</a> <code style="font-family:monospace,monospace">struct iphdr</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Don't we have this defined somewhere else? We should move this to some osmocom compat header IMHO, s […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">We don't really support FreeBSD, Apple or Cygwin platforms, so best to remove it altogether.  Nobody ever even does compile testing on these.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/libosmocore/+/21243/1/src/gb/gprs_ns2_fr.c@301">Patch Set #1, Line 301:</a> <code style="font-family:monospace,monospace">      /* FIXME half writes */</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">IIUC this should put stuff into a wqueue?</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">yes, indeed.  An osmo_wqueue is probably the best approach.  I also think that for datagram oriented sockets you either can write a full packet or you cannot write, so you don't have to care about partial writes.   A partial write would make no sense, as every write is one packet on the network (unless you play with CORK options).</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmocore/+/21243">change 21243</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/libosmocore/+/21243"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmocore </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Id3b49f93d33c271f77cd9c9db03cde6b727a4d30 </div>
<div style="display:none"> Gerrit-Change-Number: 21243 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: lynxis lazus <lynxis@fe80.eu> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-CC: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Comment-Date: Thu, 19 Nov 2020 17:44:56 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Comment-In-Reply-To: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>