Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include ARQ scheme #10 #37

Merged
merged 24 commits into from
Oct 11, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
e91fcb3
ARQ mode: change message definitions of dldata and uldata to contain
lukasostendorf Sep 1, 2020
9ca9887
add Unit Tests for some MAC messages
lukasostendorf Sep 1, 2020
91a0395
fix linting
lukasostendorf Sep 1, 2020
4d7d619
ARQ: add constructor and parser for ACK messages
lukasostendorf Sep 2, 2020
fc790d6
ARQ: implement transmission window when sending fragments
lukasostendorf Sep 2, 2020
be349dc
ARQ: include ACK transmissions
lukasostendorf Sep 2, 2020
09a8d23
ARQ: adapt reassembler to work with AM und UM mode
lukasostendorf Sep 2, 2020
1d8e428
ARQ: include handlers for ACK messages
lukasostendorf Sep 2, 2020
94fc0bf
add Unit Tests for some MAC messages
lukasostendorf Sep 3, 2020
727312b
Bugfixes for ARQ:
lukasostendorf Sep 3, 2020
6489d21
ARQ: fix crash in mac fragmenter object
lukasostendorf Sep 13, 2020
bcff676
ARQ: fix TCP/IP packet detection + add some logs
lukasostendorf Sep 28, 2020
b55319c
ARQ: bugfixes for fragmenter and reassembler
lukasostendorf Sep 29, 2020
8d10fb3
Mac messages: increase max sequence number for better flow with ARQ
lukasostendorf Sep 29, 2020
082680e
ARQ: faster ACK transmission from Client to BS
lukasostendorf Sep 29, 2020
e3654ce
Fix mac uldata_ack and dldata_ack messages to 4Bit seqNr size
lukasostendorf Sep 29, 2020
c0f2982
Client scheduler: check if a fragment is available before calling get…
lukasostendorf Oct 1, 2020
21bfe3a
Adjust log levels for some PHY functions
lukasostendorf Oct 3, 2020
5ffd041
ARQ: clean up code
lukasostendorf Oct 3, 2020
acb6b48
ARQ: refactor mac_frag_get_fragment for better readability
lukasostendorf Oct 5, 2020
cf059c9
ARQ: Bugfixes for mac_frag_get_fragment
lukasostendorf Oct 10, 2020
e877088
Add unit tests for packet inspection
lukasostendorf Oct 10, 2020
1a62ff1
Fix linting
lukasostendorf Oct 10, 2020
78399da
Merge branch 'develop' into arq_scheme
Oct 11, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/mac/mac_fragmentation.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "mac_messages.h"
#include <ringbuf.h>

#define MAX_SEQNR 8 // 3 bits are allocated for seqNr in MacMessage
#define MAX_SEQNR 16 // 4 bits are allocated for seqNr in MacMessage
#define MAX_FRAGNR 32 // 5 bits are allocated for fragNr in MacMessage
#define MAX_FRAGMENT_SIZE 512 // max size per fragment, currently static

Expand Down
16 changes: 8 additions & 8 deletions src/mac/mac_messages.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ MacMessage mac_msg_create_ul_data_ack(uint8_t ack_type, uint8_t seqNr,
genericmsg->payload_len = 0;

genericmsg->hdr_bin[0] = (ul_data_ack & 0b111) << 5;
genericmsg->hdr_bin[0] |= (ack_type & 0b11) << 3;
genericmsg->hdr_bin[0] |= (seqNr & 0b111);
genericmsg->hdr_bin[0] |= (ack_type & 0b1) << 4;
genericmsg->hdr_bin[0] |= (seqNr & 0b1111);
genericmsg->hdr_bin[1] = (fragNr & 0b11111) << 3;
dl1com marked this conversation as resolved.
Show resolved Hide resolved

msg->ctrl_id = ul_data_ack & 0b111;
Expand Down Expand Up @@ -262,8 +262,8 @@ MacMessage mac_msg_create_dl_data_ack(uint8_t ack_type, uint8_t seqNr,
genericmsg->payload_len = 0;

genericmsg->hdr_bin[0] = (dl_data_ack & 0b111) << 5;
genericmsg->hdr_bin[0] |= (ack_type & 0b11) << 3;
genericmsg->hdr_bin[0] |= (seqNr & 0b111);
genericmsg->hdr_bin[0] |= (ack_type & 0b1) << 4;
genericmsg->hdr_bin[0] |= (seqNr & 0b1111);
genericmsg->hdr_bin[1] = (fragNr & 0b11111) << 3;
dl1com marked this conversation as resolved.
Show resolved Hide resolved

msg->ctrl_id = dl_data_ack & 0b111;
Expand Down Expand Up @@ -366,8 +366,8 @@ void mac_msg_parse_timing_advance(MacMessage msg) {

void mac_msg_parse_ul_data_ack(MacMessage msg) {
msg->hdr.ULdataAck.ctrl_id = msg->type & 0b111;
msg->hdr.ULdataAck.ack_type = (msg->hdr_bin[0] >> 3) & 0b11;
msg->hdr.ULdataAck.seqNr = msg->hdr_bin[0] & 0b111;
msg->hdr.ULdataAck.ack_type = (msg->hdr_bin[0] >> 4) & 0b1;
msg->hdr.ULdataAck.seqNr = msg->hdr_bin[0] & 0b1111;
msg->hdr.ULdataAck.fragNr = (msg->hdr_bin[1] >> 3) & 0b11111;
}
dl1com marked this conversation as resolved.
Show resolved Hide resolved

Expand Down Expand Up @@ -409,8 +409,8 @@ void mac_msg_parse_mcs_change_req(MacMessage msg) {

void mac_msg_parse_dl_data_ack(MacMessage msg) {
msg->hdr.DLdataAck.ctrl_id = msg->type & 0b111;
msg->hdr.DLdataAck.ack_type = (msg->hdr_bin[0] >> 3) & 0b11;
msg->hdr.DLdataAck.seqNr = msg->hdr_bin[0] & 0b111;
msg->hdr.DLdataAck.ack_type = (msg->hdr_bin[0] >> 4) & 0b1;
msg->hdr.DLdataAck.seqNr = msg->hdr_bin[0] & 0b1111;
msg->hdr.DLdataAck.fragNr = (msg->hdr_bin[1] >> 3) & 0b11111;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to add a unit test for this?

}

Expand Down
8 changes: 4 additions & 4 deletions src/mac/mac_messages.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ typedef struct {

typedef struct {
uint32_t ctrl_id : 3;
uint32_t ack_type : 2;
uint32_t seqNr : 3;
uint32_t ack_type : 1;
uint32_t seqNr : 4;
uint32_t fragNr : 5;
} MacULdataAck;

Expand Down Expand Up @@ -130,8 +130,8 @@ typedef struct {

typedef struct {
uint32_t ctrl_id : 3;
uint32_t ack_type : 2;
uint32_t seqNr : 3;
uint32_t ack_type : 1;
uint32_t seqNr : 4;
uint32_t fragNr : 5;
} MacDLdataAck;

Expand Down