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

Include ARQ scheme #10 #37

merged 24 commits into from
Oct 11, 2020

Conversation

lukasostendorf
Copy link
Collaborator

This PR enhances the system with an additional MAC transmission mode.
Currently all MAC frames are sent in Unacknowledged mode, this PR allows to use a selective repeat ARQ in parallel to the existing Unacknowledged mode.

Fixes #10

@dl1com dl1com linked an issue Sep 13, 2020 that may be closed by this pull request
ethertype byte order was wrong
more log outputs to identify which ARQ scheme is currently used
fragmenter_has_fragment returned true in some cases
were no fragment could be sent anymore

reassembler had a memory issue when reassembling a frame
BS will automatically assign UL slots when it transmits a frame that has
to be acked
Copy link
Contributor

@dl1com dl1com left a comment

Choose a reason for hiding this comment

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

I guess it would be nice to have some more verbose documentation on a per-function level, especially the input and output parameters. I'd propose to use doxygen format or something similar.
No need to do everything at once, but all functions which where touched by this PR may be a good start :)

src/mac/mac_messages.h Show resolved Hide resolved
src/mac/mac_bs.c Outdated Show resolved Hide resolved
src/mac/mac_ue.c Outdated Show resolved Hide resolved
src/mac/mac_ue.c Outdated Show resolved Hide resolved
Comment on lines 411 to 414
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?

src/mac/mac_messages.c Outdated Show resolved Hide resolved
src/mac/mac_messages.c Outdated Show resolved Hide resolved
src/mac/mac_messages.c Outdated Show resolved Hide resolved
- include a maximum number of retransmits for the ARQ scheme
- check whether a fragment is available inside get_fragment
- Some doxygen documentation
- Verbose assignment of MacMessage types enum
Copy link
Contributor

@dl1com dl1com left a comment

Choose a reason for hiding this comment

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

Nice work!
Just two more comments:

  • Could you please add an unit test for packet_inspect_is_tcpip?
  • Function mac_frag_get_fragment is of pretty high complexity (with over 100 lines) with a high level of indentations - I've opened an issue for refactoring: Refactoring of mac_frag_get_fragment #42

@lukasostendorf lukasostendorf marked this pull request as ready for review October 10, 2020 16:19
@dl1com dl1com merged commit 7049f88 into develop Oct 11, 2020
@dl1com dl1com deleted the arq_scheme branch October 11, 2020 09:32
@dl1com dl1com linked an issue Oct 11, 2020 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement ARQ for data transmission Refactoring of mac_frag_get_fragment
2 participants