daniel has posted comments on this change. ( https://gerrit.osmocom.org/13004 )

Change subject: gsm0808: make msgb size and headroom configurable
......................................................................


Patch Set 1: Code-Review-1

(1 comment)

https://gerrit.osmocom.org/#/c/13004/1/include/osmocom/gsm/gsm0808.h
File include/osmocom/gsm/gsm0808.h:

https://gerrit.osmocom.org/#/c/13004/1/include/osmocom/gsm/gsm0808.h@37
PS1, Line 37: #define BSSMAP_MSG_SIZE (osmo_gsm0808_msg_size ? : 
BSSMAP_MSG_DEFAULT_SIZE - BSSMAP_MSG_DEFAULT_HEADROOM + BSSMAP_MSG_HEADROOM)
I don't really understand what you are trying to do here.

It's now possible to allocate less than MSG_DEFAULT_SIZE if you set 
msg_headroom to something smaller than the default. Is that intentional?

osmo_gsm0808_msg_headroom = 32;
-> BSSMAP_MSG_HEADROOM == 32
-> BSSMAP_MSG_SIZE == 512 - 128 + 32 == 416

I think you did this to ensure the tailroom doesn't decrease when you increase 
the headroom, but I think this is a bit strange as BSSMAP_MSG_DEFAULT_SIZE 
seems to mean how much to allocate for the complete msgb including headroom and 
now it sort of means how much tailroom you want to have.

Rename the _DEFAULT_ or simplify the define? I'd be fine with either.



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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I95729991eb49555f8bba60c5dc916131b03b6cf2
Gerrit-Change-Number: 13004
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr <[email protected]>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: daniel <[email protected]>
Gerrit-Comment-Date: Fri, 22 Feb 2019 14:14:57 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes

Reply via email to