Age | Commit message (Collapse) | Author | Files | Lines |
|
Change-Id: I59da04edd1b8ff965bbfbe00ccae1f7c9b6e5301
|
|
All callers now check the pointer before calling it.
gcc6 is optimizing `if (!this) {CODE}` as this is assumed to never be a
std::nullptr here.
Change-Id: I918a094e0dc59098a9eb00d152c9ae42d36b3a99
|
|
This methods takes all LLC frames from the old LLC queue and moves
them into the current. If both queues are ordered chronologically
(recv_time), the resulting queue is also ordered.
Sponsored-by: On-Waves ehf
|
|
While including time.h is sufficient with Ubuntu's current libc6
2.19, the correct (and portable) include file is sys/time.h.
This commit modifies the include directive in llc.h accordingly.
Fixes: Jenkins #600
Addresses:
In file included from gprs_ms.h:28,
from gprs_ms.cpp:22:
llc.h:68: error: field 'recv_time' has incomplete type
llc.h:69: error: field 'expire_time' has incomplete type
Sponsored-by: On-Waves ehf
|
|
Currently the receive and expiry timestamps are prepended to the LLC
msgb before it is passed to gprs_llc_queue::enqueue(). Since this meta
information should not be counted as LLC octets, the gprs_llc_queue
needs to known about this (unless the correction was done in the LLC
layer).
This commit moves the meta information storage code into
gprs_llc_queue. The meta data is now stored in the control block
(cb) area of the msgb.
Note that the info pointer that is returned from the dequeue method
is only valid if that method returns a (non-NULL) msgb. It must not
be used after that msgb has been modified or freed.
Sponsored-by: On-Waves ehf
|
|
Some struct timeval pointer arguments do not have the const qualifier,
albeit the methods do not write to the structures. The next commit
will change related pointers to const, so this commit provides the
required constness.
Sponsored-by: On-Waves ehf
|
|
To get the number of LLC octets that are stored in the queue, this
commit adds a m_queue_octets member along with a octets() method.
This value is updated similarly to m_queue_size on each modifying
method call.
Sponsored-by: On-Waves ehf
|
|
Currently struct llist_head is used without declaration which
accidently did not produce an error so far.
This commit adds the missing include directive.
Sponsored-by: On-Waves ehf
|
|
Currently llc.h relies on the structs BTS, timeval, and msgb being
declared before the file is included.
This commit adds forward declaration for these structs, because they
will only be used for pointer types.
Sponsored-by: On-Waves ehf
|
|
Currently the gprs_llc class handles both LLC queueing and the
partition into smaller pieces for RLC/MAC encapsulation. This hinders
the separation of TBF and MS related data, since LLC queueing belongs
to the MS related code while the RLC/MAC encoding/decoding belongs to
the TBF layer.
This commits takes the LLC queueing related methods and members and
puts them into a new class gprs_llc_queue. It puts the queueing
object into gprs_rlcmac_tbf and adds accessor functions. The
implementation in tbf.cpp and tbf_dl.cpp is adapted accordingly.
Ticket: #1674
Sponsored-by: On-Waves ehf
|
|
Currently single LLC blocks are discarded when the PDU lifetime
expires. If an IP packet has been fragmented either on the IP or on
the LLC layer and is therefore distributed over several LLC frames,
the kept fragments are transmitted and then discarded by the MS
because of the missing PDU. This can cause massive IP packet loss
when there are many fragmented packets (e.g. when trying 'ping
-s1800' or if the GGSN chops downlink IP packets into several SNDCP
packets).
On the other hand, discarding too many packets might disturb the
congestion handling of TCP. Dropping plain TCP ACKs might also hinder
flow control and congestion avoidance.
This commit adds a hysteresis algorithm to the LLC discard loop. If
an LLC message's age reaches the high water mark, further message's
with an age above the low water mark are discarded, too. This is
aborted, if a GMM, a non-UI, or a small message is detected. In
these cases, that message is kept.
The following VTY commands are added (pcu config node):
- queue hysteresis <1-65535> set the difference between high
(lifetime) and low watermark in
centiseconds
- no queue hysteresis disable this feature (default)
Since the SGSN will most probably send all fragments of a single
N-PDU without much delay between them, a value slightly above the
average transmission delay jitter between SGSN and PCU is probably a
sensible value to discard all fragments of a single IP packet.
This is an experimental feature that might be replaced by more
advanced means of active queue management in the future.
Sponsored-by: On-Waves ehf
|
|
The LLC dummy command is needed for RLC block stuffing, e.g. when a
TBF should be kept open if no LLC data is available. The RLC block
headers do not support stuffing, only the last block of a TBF can be
used partially. LLC dummy commands are discarded by the receiver
immediately, because the have an invalid FCS checksum.
This commit adds the function put_dummy_frame, which puts a LLC dummy
command into the frame buffer. The requested length is given as an
argument, but the real length might be adjusted according to the
specification (see GSM 44.064, 6.4.2.2).
Sponsored-by: On-Waves ehf
|
|
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.
|
|
|
|
* Make append_data, remaining_space and fits_in_current.. work
on m_length and not the index. This ways things can't overflow.
* The current API consumer was moving the m_index so it should have
worked okay.
|
|
This way the generation of the expiry information and the check
is at the same place. This should make reading the code more easy.
|
|
At some point in the future we can start using the private/protected
keywords in this struct.
|
|
Introduce a method to append data to a TBF and then reset the
read pointer when the frame has been sent.
|
|
|
|
|
|
Add some todo items where we could add assertions now that I see
the constraints and invariants of this code.
|
|
|