PRRT issueshttps://git.nt.uni-saarland.de/LARN/PRRT/-/issues2021-01-28T09:43:13Zhttps://git.nt.uni-saarland.de/LARN/PRRT/-/issues/56`Receiver::on_application_write` does nothing2021-01-28T09:43:13ZSven Liefgen`Receiver::on_application_write` does nothingThe first parameter to `Receiver::on_application_write` is always 1, thus the if inside always fails.
In the C version, the first parameter was a queue size. As far as I understand the code, this queue will always only contain one or ze...The first parameter to `Receiver::on_application_write` is always 1, thus the if inside always fails.
In the C version, the first parameter was a queue size. As far as I understand the code, this queue will always only contain one or zero elements. In the async case, it should always be one at this point.
I guess it should be zero in the sync case, but then I think it should be added to the if blocks and we should drop this parameter.https://git.nt.uni-saarland.de/LARN/PRRT/-/issues/41Check if packet-to-be-delivered is not expired2020-01-14T14:24:38ZAndreas SchmidtCheck if packet-to-be-delivered is not expiredCurrently, the `DeliveryStore_get*` methods do not check whether the packet is expired. Needs to be checked.Currently, the `DeliveryStore_get*` methods do not check whether the packet is expired. Needs to be checked.Marlene BöhmerMarlene Böhmerhttps://git.nt.uni-saarland.de/LARN/PRRT/-/issues/34Merge feature/aachen to main branches2020-01-17T08:26:37ZAndreas SchmidtMerge feature/aachen to main branches* `try_send_async` should be added to `feature/pacing`
* fixed receive calls should be added to `develop`* `try_send_async` should be added to `feature/pacing`
* fixed receive calls should be added to `develop`https://git.nt.uni-saarland.de/LARN/PRRT/-/issues/31Check that gitlab-ci uses cmaketype DEBUG2018-11-02T11:33:08ZAndreas SchmidtCheck that gitlab-ci uses cmaketype DEBUGKai VogelgesangKai Vogelgesanghttps://git.nt.uni-saarland.de/LARN/PRRT/-/issues/30Optimize PrrtPacket_type2018-09-05T14:40:50ZAndreas SchmidtOptimize PrrtPacket_typeDefine a macro for this function or make it inline.Define a macro for this function or make it inline.Kai VogelgesangKai Vogelgesanghttps://git.nt.uni-saarland.de/LARN/PRRT/-/issues/28Add consistency check for coding parameters in C2018-09-05T14:46:25ZAndreas SchmidtAdd consistency check for coding parameters in CThe `PrrtSocket_set_coding_parameters` should check for k < n and a proper schedule, similar to the constructor in the Cython bindings.The `PrrtSocket_set_coding_parameters` should check for k < n and a proper schedule, similar to the constructor in the Cython bindings.Kai VogelgesangKai Vogelgesanghttps://git.nt.uni-saarland.de/LARN/PRRT/-/issues/25PrrtPacket_copy should be shallow2018-08-27T08:06:47ZAndreas SchmidtPrrtPacket_copy should be shallowAt the moment PrrtPacket_copy copies the complete packet. In all use cases the copy does not need to be deep, but a reference sufficies.
Hence, there should be reference counting in PrrtPacket (copy just increases a counter, destroys re...At the moment PrrtPacket_copy copies the complete packet. In all use cases the copy does not need to be deep, but a reference sufficies.
Hence, there should be reference counting in PrrtPacket (copy just increases a counter, destroys reduces it).Kai VogelgesangKai Vogelgesanghttps://git.nt.uni-saarland.de/LARN/PRRT/-/issues/24PrrtSocket_bind() should support DNS names2018-11-02T11:36:20ZAndreas SchmidtPrrtSocket_bind() should support DNS namesThere should be a call to `get_host_by_name` in `PrrtSocket_bind()` if the passed address is a domain name.There should be a call to `get_host_by_name` in `PrrtSocket_bind()` if the passed address is a domain name.Kai VogelgesangKai Vogelgesanghttps://git.nt.uni-saarland.de/LARN/PRRT/-/issues/17Refactor packet encode/decode2018-06-28T08:21:38ZAndreas SchmidtRefactor packet encode/decodeThere should be encode/decode macro like this:
```c
PrrtPacketField_encode(data_payload, buf_ptr, prrtPacketLength_t, packetLength, htonl);
PrrtPacketField_decode(feeback_payload, dstBuffer, prrtTimedelta_t, btl_pace, ntohl);
```
```c
...There should be encode/decode macro like this:
```c
PrrtPacketField_encode(data_payload, buf_ptr, prrtPacketLength_t, packetLength, htonl);
PrrtPacketField_decode(feeback_payload, dstBuffer, prrtTimedelta_t, btl_pace, ntohl);
```
```c
// encode
prrtPacketLength_t *packetLength = (prrtPacketLength_t *) buf_ptr;
*packetLength = htonl(data_payload->dataLength);
buf_ptr += sizeof(prrtPacketLength_t);
// decode
prrtTimedelta_t * btl_pace = (prrtTimedelta_t *) dstBuffer;
feedback_payload->btl_pace = ntohl(*btl_pace);
dstBuffer += sizeof(prrtTimedelta_t);
```https://git.nt.uni-saarland.de/LARN/PRRT/-/issues/16Remove Wrappers to libc methods from socket.c2018-06-29T08:32:18ZAndreas SchmidtRemove Wrappers to libc methods from socket.cDrop `PrrtSocket_inet_ntoa(struct in_addr* in)` and replace with Python's `socket.inet_ntoa`.
Do the same with `PrrtSocket_ntohs(uint16_t v)` and `socket.ntohs`.Drop `PrrtSocket_inet_ntoa(struct in_addr* in)` and replace with Python's `socket.inet_ntoa`.
Do the same with `PrrtSocket_ntohs(uint16_t v)` and `socket.ntohs`.Marlene BöhmerMarlene Böhmerhttps://git.nt.uni-saarland.de/LARN/PRRT/-/issues/14Add PaceFilter2018-06-06T09:43:45ZAndreas SchmidtAdd PaceFilterA `PaceFilter` stores the smallest pace sample encountered in a predefined window (after which the minimal sample expires and the filter returns 0 until it gets a new sample).
`paceFilter.h`
```c
typedef struct prrtPaceFilter {
prr...A `PaceFilter` stores the smallest pace sample encountered in a predefined window (after which the minimal sample expires and the filter returns 0 until it gets a new sample).
`paceFilter.h`
```c
typedef struct prrtPaceFilter {
prrtTimedelta window_us;
bool valid;
prrtTimestamp updated;
prrtTimedelta value;
} PrrtPaceFilter;
PrrtPaceFilter* PrrtPaceFilter_create(prrtTimedelta window_us);
bool PrrtPaceFilter_destroy(PrrtPaceFilter* filter);
prrtTimedelta PrrtPaceFilter_get(PrrtPaceFilter* filter);
void PrrtPaceFilter_update(PrrtPaceFilter* filter, prrtTimedelta value);
```
`paceFilter.c`
```c
PrrtPaceFilter* PrrtPaceFilter_create(int window_us) {
...
}
bool PrrtPaceFilter_destroy(PrrtPaceFilter* filter) {
...
}
void inline invalidate(PrrtPaceFilter* filter) {
filter->valid = false;
filter->updated = now;
filter->value = 0;
}
prrtTimedelta PrrtPaceFilter_get(PrrtPaceFilter* filter) {
prrtTimestamp now = PrrtClock_get_current_time_us();
if (filter->updated + filter->length < now) {
invalidate(filter);
}
return value;
}
void PrrtPaceFilter_update(PrrtPaceFilter* filter, prrtTimedelta value) {
prrtTimestamp now = PrrtClock_get_current_time_us();
if (filter->valid == false) {
filter->value = value;
filter->valid = true;
filter->updated = now
} else {
if (value < filter->value) {
filter->value = value;
filter->updated = now;
} else {
// ignore sample
}
}
if (filter->updated + filter->length < now) {
invalidate(filter);
}
}
```Andreas SchmidtAndreas Schmidthttps://git.nt.uni-saarland.de/LARN/PRRT/-/issues/12Improve receive_timedwait methods to return proper error/value upon TIMEOUT2018-06-15T12:08:23ZAndreas SchmidtImprove receive_timedwait methods to return proper error/value upon TIMEOUTMarlene BöhmerMarlene Böhmerhttps://git.nt.uni-saarland.de/LARN/PRRT/-/issues/10Improve PrrtCodingConfiguration2018-03-26T15:45:56ZAndreas SchmidtImprove PrrtCodingConfiguration* Create a proper __init__ function, so that we can call `PrrtCodingConfiguration(n=7,k=4,n_cycle=[3])`.
* Allow the `coding_configuration` property of `PrrtSocket` to be set to a new `PrrtCodingConfiguration`.
* Validate with Wireshark.* Create a proper __init__ function, so that we can call `PrrtCodingConfiguration(n=7,k=4,n_cycle=[3])`.
* Allow the `coding_configuration` property of `PrrtSocket` to be set to a new `PrrtCodingConfiguration`.
* Validate with Wireshark.Kai VogelgesangKai Vogelgesanghttps://git.nt.uni-saarland.de/LARN/PRRT/-/issues/9Deadline data type in Python2018-06-14T12:57:02ZAndreas SchmidtDeadline data type in Python# Task
`receive_*timedwait`-calls should take a Python `datetime` object as a `deadline` parameter and convert this to something PRRT understands.
Code changes:
```python
# prrt.pyx
...
class TimeoutException()
...
cdef class PrrtSock...# Task
`receive_*timedwait`-calls should take a Python `datetime` object as a `deadline` parameter and convert this to something PRRT understands.
Code changes:
```python
# prrt.pyx
...
class TimeoutException()
...
cdef class PrrtSocket:
def __cinit__(self, address, target_delay = 1, thread_pinning = False):
...
self.epoch = epoch = datetime.datetime.utcfromtimestamp(0)
def recv_*_wait(... deadline: datetime):
diff = deadline - epoch
seconds = diff.total_seconds() # DIV/FLOOR
nanoseconds = diff.totalseconds() # MOD * 1000**3
cdef timespec deadline_timespec = timespec(seconds, nanoseconds)
with nogil:
len = recv()
if len < 0:
raise TimeoutException()
```
API Documentation (https://git.nt.uni-saarland.de/LARN/PRRT/wikis/receive-modes). Examples for calling `receive_*_timedwait(...)` should be given.
# Hints
* Define custom exceptions: https://stackoverflow.com/questions/1319615/proper-way-to-declare-custom-exceptions-in-modern-pythonMarlene BöhmerMarlene Böhmerhttps://git.nt.uni-saarland.de/LARN/PRRT/-/issues/8PrrtReceive_ordered_wait is not correct2018-02-19T14:21:02ZAndreas SchmidtPrrtReceive_ordered_wait is not correctAndreas SchmidtAndreas Schmidthttps://git.nt.uni-saarland.de/LARN/PRRT/-/issues/7Add Delivery Rate Estimation2018-03-15T07:51:02ZAndreas SchmidtAdd Delivery Rate Estimation## Details
* A PrrtReceiver is equivalent to a BBR "Connection".
## ToDo (Common)
* Introduce new type:
```c
typedef uint32_t prrtByteCount_t;
```
## ToDo (Sender)
* Make PrrtReceiver thread-safe (add a mutex that is locked upon chan...## Details
* A PrrtReceiver is equivalent to a BBR "Connection".
## ToDo (Common)
* Introduce new type:
```c
typedef uint32_t prrtByteCount_t;
```
## ToDo (Sender)
* Make PrrtReceiver thread-safe (add a mutex that is locked upon changes). Extend it as follows:
```c
typedef struct PrrtReceiver {
...
pthread_mutex_t lock;
prrtByteCount_t delivered; // tracked in octets
prrtTimestamp_t delivered_time;
prrtTimestamp_t first_sent_time;
bool app_limited;
BPTreeNode* outstandingPacketStates; // PrrtPacketStates are managed here
}
```
* Introduce a PacketState structure:
```c
typedef struct PrrtPacketState {
prrtByteCount_t delivered;
prrtTimestamp_t expiry_time;
prrtPacketLength_t payload_length;
prrtTimestamp_t delivered_time;
prrtTimestamp_t first_sent_time;
bool is_app_limited;
prrtTimestamp_t sent_time;
} PrrtPacketState;
```
* For each Receiver, we add a B-tree to keep track of PrrtPacketStates. The process works as follows:
* Upon sending of the packet, the PrrtPacketState is added to the `outstandingPacketStates`.
* When a feedback is received, and a packet is ACKed, the PacketState is removed and the rate sample is generated [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/net/ipv4/tcp_rate.c](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/net/ipv4/tcp_rate.c).
* Introduce a PrrtRateSample structure (see [http://elixir.free-electrons.com/linux/latest/source/include/net/tcp.h](http://elixir.free-electrons.com/linux/latest/source/include/net/tcp.h):
```c
typedef struct PrrtRateSample {
...
prrtTimedelta_t interval;
prrtByteCount_t delivered;
bool is_app_limited;
} PrrtRateSample;
```
* For now, printing out rate samples is sufficient.
## ToDo (Receiver)
* Extend send_feedback() method to also include the packet sequence number that is to be acked.
* Extend feedback packet to include a prrtSequenceNumber to ACK a certain packet.https://git.nt.uni-saarland.de/LARN/PRRT/-/issues/6Application Layer Rate Limiting2018-03-08T11:02:09ZAndreas SchmidtApplication Layer Rate Limiting### Description
PrrtSocket_send should not take an indefinite number of packets.
### Iterations
#### 1) Introduce a socket option and limit queue
* Add the following application parameter
```c
PrrtSocket_set_opt("app_queue_size", 1000...### Description
PrrtSocket_send should not take an indefinite number of packets.
### Iterations
#### 1) Introduce a socket option and limit queue
* Add the following application parameter
```c
PrrtSocket_set_opt("app_queue_size", 1000)
```
* Block on `List_push` if `List_size()` is >= `app_queue_size`.
#### 2) Move outQueue and condition variables in separate struct
* Add `PrrtApplicationQueue` store (under `proto/stores`)
* Move condition variable and mutexes to this.
* Rename mutex outQueueFilled into something that indicates "NonEmpty".
* Add condition variable that indicates "NotFull".
* Ensure that PrrtSocket_send is pushing and gets blocked if full (subscribing to NotFullCV).
* Ensure that dataTransmitter pops and blocks if empty (subscribing to NonEmptyCV).
#### 3) Automatically set parameters
* The channel state information "bottleneck bandwidth" and "rtt" are measured.
* Based on these, it is possible to calculate the BDP.
* Using the BDP, the size of the ApplicationQueue can be limited (subtracting the packets already saved to the block store).
**Note:** This might also be influenced by joint work on cross-layer pacing (idea: OS throttles the application directly).Lukas BardLukas Bardhttps://git.nt.uni-saarland.de/LARN/PRRT/-/issues/4Correct Channel Loss Statistics2017-12-22T16:01:23ZAndreas SchmidtCorrect Channel Loss Statistics* Current loss statistics gathered at application interface (how many packets get through the receiver stack).
* Loss should instead be captured for the channel, to give a stack-independent view on reliability.* Current loss statistics gathered at application interface (how many packets get through the receiver stack).
* Loss should instead be captured for the channel, to give a stack-independent view on reliability.Andreas SchmidtAndreas Schmidthttps://git.nt.uni-saarland.de/LARN/PRRT/-/issues/1Implement efficient test for relevance of a block of sequence numbers2017-07-13T13:23:10ZAndreas SchmidtImplement efficient test for relevance of a block of sequence numbers