Patch Set 6:

(3 comments)

https://gerrit.osmocom.org/#/c/4003/4/include/osmocom/mgcp/mgcp.h
File include/osmocom/mgcp/mgcp.h:

Line 37: 
> Done
ow is he 64 be better? What is this RANGE_END used for?  We have no idea how 
many calls a single osmo-mgw will handle in reality.  Which limitations exist 
in the current implementation? Some explanation is needed I suppose.


https://gerrit.osmocom.org/#/c/4003/6/include/osmocom/mgcp/mgcp_internal.h
File include/osmocom/mgcp/mgcp_internal.h:

Line 246:       struct mgcp_endpoint_type type;
pointer here, to a 'const struct mgcp_endpoint_type' that only exists once (see 
other comment in this review).


https://gerrit.osmocom.org/#/c/4003/6/src/libosmo-mgcp/mgcp_protocol.c
File src/libosmo-mgcp/mgcp_protocol.c:

Line 1258:              tcfg->endpoints[i].type.dispatch_rtp_cb =
you're keeping the 'type' as a static member of each individual endpoint, this 
wastes memory as we now have number_of_endpoints for the same function pointer, 
or for the same digit '2' above.  I tried to explain in the previous commen on 
patch version 4 that from my point of view there should be a 'const struct 
rtp_endpoint_type' and which exists once in memory and is const.  Each 
individual endpoint then has one pointer 'type' which points to the that single 
location in memory where we store things like max_conns and dispatch_rtp_cb.  

This is a common pattern in Osmococm code (and other projects). see e.g. 
"struct gsm_bts_model" in libbsc.  We don't keep the attributes/function 
pointers for each 'struct gsm_bts'  but only once, globally for all BTSs of 
that type.


-- 
To view, visit https://gerrit.osmocom.org/4003
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie008599136c7ed8a0dfbb0cf803188975a499fc5
Gerrit-PatchSet: 6
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <[email protected]>
Gerrit-Reviewer: Harald Welte <[email protected]>
Gerrit-Reviewer: Holger Freyther <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <[email protected]>
Gerrit-Reviewer: dexter <[email protected]>
Gerrit-HasComments: Yes

Reply via email to