Change in libosmocore[master]: select: gather statistics for TCP connections

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Thu Dec 16 15:59:51 UTC 2021


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

Change subject: select: gather statistics for TCP connections
......................................................................


Patch Set 9:

(2 comments)

> Patch Set 9: Code-Review-1
> 
> (3 comments)
> 
> 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. 

> 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. 

This is what I suggested.  Simply have the timer be '0' by default, thereby disabling the entire mechanism.

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

exactly.

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.

https://gerrit.osmocom.org/c/libosmocore/+/26454/9/src/stats_tcp.c 
File src/stats_tcp.c:

https://gerrit.osmocom.org/c/libosmocore/+/26454/9/src/stats_tcp.c@194 
PS9, Line 194: 		return;
> return error?
agreed


https://gerrit.osmocom.org/c/libosmocore/+/26454/9/src/stats_tcp.c@210 
PS9, Line 210: void osmo_stats_tcp_osmo_fd_unregister(const struct osmo_fd *fd)
> By exposing struct stats_tcp_entry and using it as a param, you convert these functions from O(n) to […]
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.



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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I1416f95aff2adcf13689646b7574845de169fa3d
Gerrit-Change-Number: 26454
Gerrit-PatchSet: 9
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-CC: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Comment-Date: Thu, 16 Dec 2021 15:59:51 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin at sysmocom.de>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211216/56f8f92a/attachment.htm>


More information about the gerrit-log mailing list