the created RLC PDU was too large to fit inside the MAC grant
because only the header room for the short L field was used.
The patch determines the correct size before passing the opportunity to RLC.
It also improves logging in error case by using the MAC logger instead of
stderr/stdout when error occurs.
building on the previous refactor this patch now adds support
for peridoic BSR reporting (using short BSR). It furthermore does
the following changes:
* add BSR packing
* add proc_bsr_nr unit test
* move mac_nr test code into test folder under src (needs to be done with other test code too)
The window elements are not being correctly cleaned up when clear() is called
or when overwritten by newer SN. Furthermore, the window count member is not being
correctly updated when the insertion of a newer SN overwrites the previous one.
I used the circular_map container to avoid this sort of bugs
previously we were only counting retx if we retx the start of a segment.
this could lead to unwanted behaviour, i.e., not counting retx
correctly and thus not triggering the maxretx attempt, if the receive
always sends NACKs with a SO_start.
The RLC spec is not clear on how this should be handled correctly but
IMHO using an integer number of retx is reasonable, even for segments
that might be retransmitted more often.
The alternative of using a fractional retx counter that may be increamented
proportional to the segment size that is retx is another alternative
but considered too complex to implement (and test correctly).
Main changes:
- addition of pool utilities
- The node size/alignment and batch allocation threshold are now runtime arguments
- object pool and memory pool are not anymore based on the same class.
The object pool cannot use intrusive free list because it would overwrite the object
memory