<blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">Patch Set 9: Code-Review-1</p><p style="white-space: pre-wrap; word-wrap: break-word;">(3 comments)</p><p style="white-space: pre-wrap; word-wrap: break-word;">Maybe the thing here is that I don't really see the point in having that done for all TCP sockets. Specially not by default. IMHO the app should specifically allocate and register specific sats_tcp-entry to the API and then they would become available. </p></blockquote><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">If then you still want to have somehow a possibility to get all the sockets registered automatically (which I don't see the point), then one may register those as done here but have it disabled by default. </p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">This is what I suggested.  Simply have the timer be '0' by default, thereby disabling the entire mechanism.</p><p style="white-space: pre-wrap; word-wrap: break-word;">But in this case there's going to be no hood "name" or "description" to show for those, well maybe yes, by printing rem_addr:rem_port<->local_addr:local_port or alike on its stats name</p><p style="white-space: pre-wrap; word-wrap: break-word;">exactly.</p><p style="white-space: pre-wrap; word-wrap: break-word;">So I think we move ahead as described above: register/unregister happens automatically, but the TCP_INFO is not called as the timer is inactive unless the user explicitly requests it via VTY..  The multithread question of course also still needs to be resolved.</p><p><a href="https://gerrit.osmocom.org/c/libosmocore/+/26454">View Change</a></p><p>2 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/libosmocore/+/26454/9/src/stats_tcp.c">File src/stats_tcp.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/+/26454/9/src/stats_tcp.c@194">Patch Set #9, Line 194:</a> <code style="font-family:monospace,monospace">            return;</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">return error?</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">agreed</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/libosmocore/+/26454/9/src/stats_tcp.c@210">Patch Set #9, Line 210:</a> <code style="font-family:monospace,monospace">void osmo_stats_tcp_osmo_fd_unregister(const struct osmo_fd *fd)</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">By exposing struct stats_tcp_entry and using it as a param, you convert these functions from O(n) to […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">yes, but I don't think it matters all that much.  Registering/unregistering sockets is something we don't do that frequently compared to processing packets on any of those sockets.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmocore/+/26454">change 26454</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/+/26454"/><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: I1416f95aff2adcf13689646b7574845de169fa3d </div>
<div style="display:none"> Gerrit-Change-Number: 26454 </div>
<div style="display:none"> Gerrit-PatchSet: 9 </div>
<div style="display:none"> Gerrit-Owner: dexter <pmaier@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: daniel <dwillmann@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-CC: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Thu, 16 Dec 2021 15:59:51 +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>