AgeCommit message (Collapse)AuthorFilesLines
2014-01-15sched: Document a possible race conditionHolger Hans Peter Freyther1-0/+6
2014-01-15Set csnStream direction *after* csnStreamInitDaniel Willmann1-1/+1
Fixes a bug introduced in commit 402cdc. That commit sets direction to zero so setting it to 1 should be done after the call to csnStreamInit(). This issue was discovered by the rlcmac test.
2014-01-09Fix warnings in gsm_rlcmac.cppIvan Kluchnikov2-0/+4
1. ar.direction variable was not initialized 2. overrunning array "data->RLC_DATA" of 20 bytes at byte offset 22 using index "i" (which evaluates to 22)
2014-01-09sysmo_l1_if: Fix off-by-one bug when sending UL messages to gsmtapDaniel Willmann1-2/+2
The first byte in data_ind->msgUnitParam.u8Buffer is not part of the GSM frame, but something else, it is also skipped in the call to pcu_rx_data_ind_pdtch(). This patch fixes GSM RLC/MAC UL packet decoding in wireshark, especially ACK/NACK packets are now displayed correctly (amongst others).
2013-12-25sched: Attempt to improve the fairness and schedule UL/AL ACK/ASSHolger Hans Peter Freyther2-14/+23
It is possible that certain UL ACK messages are not sent when there are many many uplink and downlink assignments. Try to be more fair and schedule them round-robin. This way no starvation should occur.
2013-12-25sched: Remove unused bts parameter from the internal methodHolger Hans Peter Freyther1-2/+2
2013-12-25llc: Calculate the average queuing delay of the LLC queuesDaniel Willmann3-4/+28
Use a formula like it is used with TCP. This can help to make decisions about if frames should be dropped or not at the time we enqueue them. This code will store two timeval structs in fron the of the actual data and compute the average at the time of the dequeue.
2013-12-25llc: Initialize the LLC frame with garbage to detect wrong usageHolger Hans Peter Freyther1-0/+2
2013-12-18llc: Count the number of frames queued inside the LLC queueHolger Hans Peter Freyther3-2/+10
2013-12-18rlc: Use sizeof() for the memset instead of ARRAY_SIZEHolger Hans Peter Freyther1-1/+1
In this case both will give the same result but it is better to use sizeof. But it is better to use the raw number of bytes instead of the number of elements.
2013-12-17systemd: Add a service for the sysmopcuHenning Heinold1-0/+15
Provide a systemd service file for sysmopcu, leaves the bundled combined sysvinit for sysmobts and sysmopcu for legacy systems. Sponsored-by: sysmocom
2013-12-12test: Remove the side-effect from the assertionHolger Hans Peter Freyther1-1/+2
Coverity complains about this code as it doesn't know that the OSMO_ASSERT is always on. But it is good practice to now have the side-effect in here. Fixes: Coverity CID 1080724
2013-12-12l1if: Include string.h to fix possible coverity issueHolger Hans Peter Freyther1-0/+1
Coverity warns about the below lines of code. strerror is supposed to return a char* and %s should work on char. Let's see if including string.h will make coverity more happy. The pre-processes file looked sane as well. LOGP(DL1IF, LOGL_ERROR, "error writing to L1 msg_queue: %s\n", strerror(errno)); Coverity: CID 1040951, CID 1040950, CID 1040952
2013-12-12Merge branch 'sysmocom/gprs-window-handling' into sysmocom/masterHolger Hans Peter Freyther8-34/+170
Daniel and me worked on the window handling. We now test that what we encode is compatible to what we decode. The char array now includes SSN-1 to the right of the array (reflecting a time axis that grows towards the right..)
2013-12-12decoding: Cosmetic - change rbb decodingDaniel Willmann1-2/+4
2013-12-12rlc: Make the update loop more understandableDaniel Willmann1-7/+11
Add bitnum_to_bsn() as a convenience function to get the BSN, use it in the update handling and ignore rbb for values outside of our tx window.
2013-12-12tests/TypesTest: Check rbb handling in DLDaniel Willmann2-0/+37
2013-12-12tests/TypesTest: Ensure that extract_rbb(encode_rbb(x)) == xDaniel Willmann1-0/+11
2013-12-12decoding: Use 'I' and 'R' in rbb array for DLDaniel Willmann3-3/+3
We want to match up rbb decoding and encoding so it helps to use the same chars.
2013-12-12tests/TypesTest: Print the result of Encoding::encode_rbb()Daniel Willmann2-0/+17
2013-12-12encoding: Factor out encode_rbb to help testingDaniel Willmann2-13/+24
2013-12-12encoding: Use ul_window ssn()/update_rbb() methods when encoding ul ACKDaniel Willmann1-20/+18
Use the ssn() and update_rbb() methods of gprs_rlc_ul_window when encoding the ACK/NACK packet in write_packet_uplink_ack()
2013-12-12encoding: Change wording to match that of 3GPP TS 04.60Daniel Willmann1-1/+1
The spec (in ch. speaks of RECEIVED or INVALID in the RLC receiver, so change the wording in the log message to match.
2013-12-12tests/TypesTest: Add OSMO_ASSERT_STR_EQ which prints out the parametersDaniel Willmann1-6/+15
Use it to compare rbb
2013-12-12tests/TypesTest: Test ssn() and update_rbb() uplink window methods in TypesTestDaniel Willmann1-0/+27
Test that ssn and rbb are updated correctly.
2013-12-12rlc: Manage the received block bitmap in the ul_windowDaniel Willmann2-0/+20
Added two methods to gprs_rlc_ul_window * ssn() returns the starting sequence number * update_rbb() returns an array of chars representing the state of the received block bitmap. Each element is either 'I'nvalid or 'R'eceived. The rbb is generated from v_n rbb[63] relates to BSN ssn-1 ... rbb[0] relates to BSN ssn-64
2013-12-04rlc: Create a testcase for the uplink windowHolger Hans Peter Freyther1-1/+99
2013-12-04rlc: Make the RLC types only operate on the BSNHolger Hans Peter Freyther4-116/+112
The code has an internal optimization to only use window_size space. This means that the caller needed to know that only half of the size was used. Change the API to work on the BSN and do the mapping internally. The compiler should have plenty of opportunity to propagate the constant(s) but this has not been verified.
2013-12-04tbf: Separate the handling for rh->si and call in case of re-transmissionHolger Hans Peter Freyther2-8/+15
In case of a retransmission ack the window again..
2013-11-26tbf/sched: We pick the _last_ entry, rotate the listsHolger Hans Peter Freyther3-0/+13
We always pick the _last_ entry from the lists. Let's rotate so we make it a bit more fair.
2013-11-26tbf/rlc: Move raising of V(Q) into the ul window codeHolger Hans Peter Freyther3-18/+36
2013-11-26rlc/tbf: Move the code to raise V(R) into the ul_window handlingHolger Hans Peter Freyther3-14/+22
2013-11-26tbf/rlc: Move the putting of a block into the rlc codeHolger Hans Peter Freyther3-2/+8
2013-11-26tbf: Move the extraction of the TLLI into a separate methodHolger Hans Peter Freyther2-38/+49
2013-11-26tbf/rlc: Remove the side-effect from the loop.Holger Hans Peter Freyther1-7/+8
2013-11-26tbf: Reduce complexity and deal with only one way of assignmentHolger Hans Peter Freyther1-16/+4
The normal mode of the PCU doesn't really work right now. There is no place to have certain kind of features that are not built and not unit-tested.
2013-11-26tbf/rlc: Move the check if something is in the window out.Holger Hans Peter Freyther2-6/+16
2013-11-26rlc: The bsn has never been used. Remove it from the Xl_windowHolger Hans Peter Freyther1-2/+0
2013-11-26rlc: Add a basic test for the DL Window and moving the windowHolger Hans Peter Freyther1-0/+49
2013-11-26rlc: Test the basic of the gprs_rlc_v_n code for remembering the stateHolger Hans Peter Freyther4-3/+31
2013-11-26tbf/rlc: Move the v_n handling into a dedicated objectHolger Hans Peter Freyther4-7/+36
2013-11-26tbf/rlc: Big change and move the window handling out to the rlcHolger Hans Peter Freyther5-119/+242
The send and receive window is now managed by an external object. There are some issues that can only be solved with C++11 but it is progres and removes some of the spaghetti code. For GPRS the sns and ws is hardcoded. Move that into the window code.
2013-11-26tbf: Update the legend and mention invalid as wellHolger Hans Peter Freyther1-1/+1
We should not see it but the legend should be complete.
2013-11-26rlc: Use uint16_t for the BSN in all cases.Holger Hans Peter Freyther1-2/+2
The sns is only 128 for GPRS (it can be bigger for EDGE) so the uint8_t was enough but it is bad to have inconsistencies for both of them.
2013-11-26tbf/rlc: Move the counting of unacked frames into the RLC V_B classHolger Hans Peter Freyther3-8/+21
Whenwe receive a final ack we assume that all the unacked frames have been acked now. Move the counting to V_B and now the caller can remove the BSN and the "lost" variable which has always been zero.
2013-11-26tbf: Split the handling of DL ACK/NACK into two separate partsHolger Hans Peter Freyther2-59/+69
Split the handling of the final ack and the handling of frames that is moving frames.
2013-11-26tbf/rlc: Change the code and generate the entire state in the V_BHolger Hans Peter Freyther3-15/+21
2013-11-26tbf/rlc: Move the moving of V(A) into the V_B codeHolger Hans Peter Freyther3-8/+23
Move the code that moves the V_B to the first not acked frame. Return how many indexes the V_B was moved and update the V_A in the caller.
2013-11-26tbf/rlc: Move the parsing of RBB to Decoding, move window marking outHolger Hans Peter Freyther5-26/+61
Move the parsing of the bitbmap out of the TBF code into Decoding. Move the updating of the V_B into the V_B class. Add some comments about handling the mod_sns, mod_sns_half parameters by using template code.
2013-11-26tbf: Fix the indention of this routineHolger Hans Peter Freyther1-1/+1