<p><a href="https://gerrit.osmocom.org/c/osmo-hnodeb/+/26503">View Change</a></p><p>3 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/osmo-hnodeb/+/26503/2/src/osmo-hnodeb/gtp.c">File src/osmo-hnodeb/gtp.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/osmo-hnodeb/+/26503/2/src/osmo-hnodeb/gtp.c@70">Patch Set #2, Line 70:</a> <code style="font-family:monospace,monospace">req</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">comment says request, next line says indication.  Further comment below again says req. […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">I don't really think it's useful. Each path has a clear 1 specific primitive to rx/tx, so it's easier to write the string directly to be able to find it with grep, or simply when reading code.</p><p style="white-space: pre-wrap; word-wrap: break-word;">These names were simply wrong because I forgot to change it when I reworked the code to use proper operations.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-hnodeb/+/26503/2/src/osmo-hnodeb/gtp.c@126">Patch Set #2, Line 126:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><pre style="font-family: monospace,monospace; white-space: pre-wrap;">}<br><br>       osmo_fd_setup(&hnb->gtp.fd0, gsn->fd0, OSMO_FD_READ, hnb_gtp_fd_cb, hnb, 0);<br>        if ((rc = osmo_fd_register(&hnb->gtp.fd0)) < 0)<br>             goto free_ret;<br><br>      osmo_fd_setup(&hnb->gtp.fd1c, gsn->fd1c, OSMO_FD_READ, hnb_gtp_fd_cb, hnb, 1);<br>      if ((rc = osmo_fd_register(&hnb->gtp.fd1c)) < 0)<br>            goto free_ret;<br><br>      osmo_fd_setup(&hnb->gtp.fd1u, gsn->fd1u, OSMO_FD_READ, hnb_gtp_fd_cb, hnb, 2);<br>      if ((rc = osmo_fd_register(&hnb->gtp.fd1u)) < 0)<br></pre></blockquote></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">The Iuh interface only uses GTP-U v1, neither GTPv0 and no GTPv1-C. […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">After having a quick look at libgtp and TS 29 060 I decided to go for libgtp to avoid having to reimplement the wheel and also in order to avoid to take care or think of stuff like sequence numbers, possible retransmits, gtpu-1 vs 0, encoding/decoding fields, etc. which indeed proved useful into having already a working GTP test in TTCN3.</p><p style="white-space: pre-wrap; word-wrap: break-word;">I went initializing the 3 sockets here to speed up the setup and avoid possible failures due to some data structures not being initialized, etc.<br>I plan to give a try now removing the GTPC socket (I was not sure about GTP0 support here btw).<br>I also though about adding a new mode GTP_MODE_GTPU_ONLY (see line 115) to make sure libgtp expects a GTP-U link to be set up too.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-hnodeb/+/26503/2/src/osmo-hnodeb/gtp.c@180">Patch Set #2, Line 180:</a> <code style="font-family:monospace,monospace">              LOG</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">where deos this constraint come from? libgtp?</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Yes, pdp_t below uses "struct in_addr" in several fields, it seems only IPv4 is supported in the transport GTP link (IP/UDP).</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-hnodeb/+/26503">change 26503</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/osmo-hnodeb/+/26503"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-hnodeb </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I5a6f5dfc4e508c92adb35210b4dc576d64353366 </div>
<div style="display:none"> Gerrit-Change-Number: 26503 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Comment-Date: Mon, 13 Dec 2021 16:33:12 +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: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>