Skip to content
New issue

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

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

Already on GitHub? # to your account

gnrc_sixlowpan_iphc: add fragment forwarding stubs #12629

Merged
merged 4 commits into from
Dec 10, 2019

Conversation

miri64
Copy link
Member

@miri64 miri64 commented Nov 1, 2019

Contribution description

... when VRB is available

This is once again one of these tiny PRs that belong to a bigger PR, @benpicco is always talking about. However, in this case it was already introduced in an earlier version to #11068 (edc9b42) but is now needed also for SFR. So instead of having this piece of code copy-pasted in both, I decided to split it out (even though it is not functional without it).

Testing procedure

There is a test application tests/gnrc_sixlowpan_iphc_w_vrb in this PR that should work on any board that it fits on:

make -C tests/gnrc_sixlowpan_iphc_w_vrb flash test

Confirm that a fragmented and unfragmented UDP packet can still be sent between two 6LoWPAN nodes.

Additionally, you can check-out #11068 and

  1. confirm in its history that that PR only adds the actual minimal forwarding steps to gnrc_sixlowpan_iphc.c
  2. Run its tests make -C tests/gnrc_sixlowpan_frag_minfwd flash test on a board they fit on

Issues/PRs references

Taken out of #11068's edc9b42 (as it is also required for other 6LoWPAN fragment forwarding schemes like SFR). It is however completely independent of that.

Route to 6LoWPAN fragment forwarding

@miri64 miri64 added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Area: network Area: Networking CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Nov 1, 2019
@miri64 miri64 added this to the Release 2020.01 milestone Nov 1, 2019
@miri64 miri64 requested a review from cgundogan November 1, 2019 15:04
miri64 added a commit to miri64/RIOT that referenced this pull request Nov 1, 2019
miri64 added a commit to miri64/RIOT that referenced this pull request Nov 1, 2019
miri64 added a commit to miri64/RIOT that referenced this pull request Nov 1, 2019
@miri64 miri64 force-pushed the gnrc_sixlowpan_iphc/enh/vrb-creation branch from 8f99811 to 4fd7dc9 Compare November 4, 2019 13:08
@miri64 miri64 changed the title gnrc_sixlowpan_iphc: create VRB entry from uncompressed header gnrc_sixlowpan_iphc: add fragment forwarding stub Nov 4, 2019
@miri64 miri64 changed the title gnrc_sixlowpan_iphc: add fragment forwarding stub gnrc_sixlowpan_iphc: add fragment forwarding stubs Nov 4, 2019
@miri64
Copy link
Member Author

miri64 commented Nov 4, 2019

I also added a subroutine to do the actual forwarding in now. This code will be common between #11068 and SFR, so it makes sense to have a common base PR. Currently the function doesn't do anything except for returning -ENOTSUP, but I will provide some patches so it can be tested.

miri64 added a commit to miri64/RIOT that referenced this pull request Nov 4, 2019
@miri64 miri64 added the State: WIP State: The PR is still work-in-progress and its code is not in its final presentable form yet label Nov 4, 2019
@miri64
Copy link
Member Author

miri64 commented Nov 4, 2019

I started a test application. Up until now, only the success case is tested, I plan however to add some failure cases. When setting ENABLE_DEBUG=1 in sys/net/gnrc/network_layer/sixlowpan/iphc/gnrc_sixlowpan_iphc.c one should see something like the following for now:

main(): This is RIOT! (Version: 2020.01-devel-461-g6d46e-gnrc_sixlowpan_iphc/enh/vrb-creation)
.6lo iphc: found route, trying to forward
6lo iphc: Do not know how to forward fragment from (2A:AB:DC:15:54:01:64:79, 15) to (4A:3D:1D:0C:98:31:58:AE, 1)
Original fragmentation header:
00000000  C0  BC  00  0F
IPHC headers + payload:
00000000  7A  00  3A  20  01  0D  B8  00  00  00  00  00  00  00  00  00
00000010  00  00  01  20  01  0D  B8  00  00  00  00  00  00  00  00  00
00000020  00  00  02
00000000  80  00  8E  A0  23  8F  00  02  9D  4B  B2  1C  53  53  53  53
00000010  53  53  53  53  53  53  53  53  53  53  53  53  53  53  53  53
00000020  53  53  53  53  53  53  53  53  53  53  53  53  53  53  53  53
00000030  53  53  53  53  53  53  53  53
packet buffer: first byte: 0x565dc120, last byte: 0x565dc920 (size: 2048)
  position of last byte used: 512
~ unused: 0x565dc120 (next: (nil), size: 2048) ~

OK (1 tests)

@miri64 miri64 force-pushed the gnrc_sixlowpan_iphc/enh/vrb-creation branch from eac9232 to 799261d Compare November 5, 2019 12:44
@miri64 miri64 removed the State: WIP State: The PR is still work-in-progress and its code is not in its final presentable form yet label Nov 5, 2019
@miri64
Copy link
Member Author

miri64 commented Nov 5, 2019

Finished tests and squashd. No longer WIP.

miri64 added a commit to miri64/RIOT that referenced this pull request Nov 5, 2019
miri64 added a commit to miri64/RIOT that referenced this pull request Nov 5, 2019
miri64 added a commit to miri64/RIOT that referenced this pull request Nov 6, 2019
miri64 added a commit to miri64/RIOT that referenced this pull request Nov 7, 2019
miri64 added a commit to miri64/RIOT that referenced this pull request Nov 7, 2019
miri64 added a commit to miri64/RIOT that referenced this pull request Nov 8, 2019
miri64 added a commit to miri64/RIOT that referenced this pull request Nov 12, 2019
miri64 added a commit to miri64/RIOT that referenced this pull request Nov 13, 2019
@miri64
Copy link
Member Author

miri64 commented Nov 13, 2019

Updated the testing procedures

@miri64
Copy link
Member Author

miri64 commented Nov 13, 2019

Not really sure why Murdock is failing on native here... I was not able to reproduce this failure locally, neither with GCC nor mit LLVM and I tried it on two systems.

Arch Linux
  Operating System Environment
-----------------------------
       Operating System: "Arch Linux" 
                 Kernel: Linux 5.3.10-arch1-1 x86_64 unknown

Installed compiler toolchains

         native gcc: gcc (GCC) 9.2.0
  arm-none-eabi-gcc: arm-none-eabi-gcc (Arch Repository) 9.2.0
            avr-gcc: avr-gcc (GCC) 9.2.0
   mips-mti-elf-gcc: missing
         msp430-gcc: missing

riscv-none-embed-gcc: missing
xtensa-esp32-elf-gcc: xtensa-esp32-elf-gcc (crosstool-NG crosstool-ng-1.22.0-80-g6c4433a) 5.2.0
xtensa-lx106-elf-gcc: missing
clang: clang version 9.0.0 (tags/RELEASE_900/final)

Installed compiler libs

arm-none-eabi-newlib: "3.1.0"
mips-mti-elf-newlib: missing
riscv-none-embed-newlib: missing
xtensa-esp32-elf-newlib: "2.2.0"
xtensa-lx106-elf-newlib: missing
avr-libc: "2.0.0" ("20150208")

Installed development tools

              cmake: cmake version 3.15.5
           cppcheck: missing
            doxygen: 1.8.16
                git: git version 2.24.0
               make: GNU Make 4.2.1
            openocd: Open On-Chip Debugger 0.10.0+dev-00746-g8f518d35 (2019-03-21-09:43)
             python: Python 3.7.4
            python2: Python 2.7.17
            python3: Python 3.7.4
             flake8: 3.6.0 (mccabe: 0.6.1, pycodestyle: 2.4.0, pyflakes: 2.0.0) CPython 3.7.4 on Linux
         coccinelle: missing
Ubuntu 19.10
Operating System Environment
-----------------------------
       Operating System: "Ubuntu" "19.10 (Eoan Ermine)"
                 Kernel: Linux 5.3.0-23-generic x86_64 x86_64

Installed compiler toolchains

         native gcc: gcc (Ubuntu 9.2.1-9ubuntu2) 9.2.1 20191008
  arm-none-eabi-gcc: arm-none-eabi-gcc (GNU Tools for Arm Embedded Processors 8-2018-q4-major) 8.2.1 20181213 (release) [gcc-8-branch revision 267074]
            avr-gcc: avr-gcc (GCC) 5.4.0
   mips-mti-elf-gcc: missing
         msp430-gcc: msp430-gcc (GCC) 4.6.3 20120301 (mspgcc LTS 20120406 unpatched)

riscv-none-embed-gcc: missing
xtensa-esp32-elf-gcc: missing
xtensa-lx106-elf-gcc: missing
clang: clang version 9.0.0-2 (tags/RELEASE_900/final)

Installed compiler libs

arm-none-eabi-newlib: "3.0.0"
mips-mti-elf-newlib: missing
riscv-none-embed-newlib: missing
xtensa-esp32-elf-newlib: missing
xtensa-lx106-elf-newlib: missing
avr-libc: "2.0.0" ("20150208")

Installed development tools

              cmake: cmake version 3.13.4
           cppcheck: missing
            doxygen: 1.8.13
                git: git version 2.20.1
               make: GNU Make 4.2.1
            openocd: Open On-Chip Debugger 0.10.0+dev-00910-g4dbcb1e7 (2019-06-17-16:24)
             python: Python 2.7.17rc1
            python2: Python 2.7.17rc1
            python3: Python 3.7.5rc1
             flake8: 3.7.8 (mccabe: 0.6.1, pycodestyle: 2.5.0, pyflakes: 2.1.1) CPython 3.7.5rc1 on Linux
         coccinelle: missing

miri64 added a commit to miri64/RIOT that referenced this pull request Nov 25, 2019
miri64 added a commit to miri64/RIOT that referenced this pull request Nov 29, 2019
miri64 added a commit to miri64/RIOT that referenced this pull request Dec 3, 2019
@benpicco
Copy link
Contributor

benpicco commented Dec 5, 2019

tests/gnrc_sixlowpan_iphc_w_vrb is still failing.

Also no review on this one yet, so I guess it's easier for everyone if you just squash.

@miri64
Copy link
Member Author

miri64 commented Dec 6, 2019

Mhhhhh... they do work on my machine :-/

@miri64 miri64 added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR CI: run tests If set, CI server will run tests on hardware for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Dec 6, 2019
@miri64
Copy link
Member Author

miri64 commented Dec 6, 2019

Ah, there might be something going wrong with current master rebased. Will check!

@miri64 miri64 force-pushed the gnrc_sixlowpan_iphc/enh/vrb-creation branch from b0aa053 to d964e69 Compare December 6, 2019 09:53
@miri64
Copy link
Member Author

miri64 commented Dec 6, 2019

First of all: squashed!

@miri64
Copy link
Member Author

miri64 commented Dec 6, 2019

(and rebased, though this wasn't my intention ^^")

@miri64 miri64 force-pushed the gnrc_sixlowpan_iphc/enh/vrb-creation branch from d964e69 to ddcc6ea Compare December 6, 2019 10:05
@miri64
Copy link
Member Author

miri64 commented Dec 6, 2019

Fixed. The reason was that the arrival time of the VRB entries that filled the VRB was not set for the VRB-full test, so the garbage collection just through them out when the new entry was created.

@miri64
Copy link
Member Author

miri64 commented Dec 6, 2019

Not sure why this worked with the old version of this PR... But now its fixed so 🤷‍♀️

@miri64 miri64 force-pushed the gnrc_sixlowpan_iphc/enh/vrb-creation branch from ddcc6ea to b31d0db Compare December 10, 2019 09:34
@miri64
Copy link
Member Author

miri64 commented Dec 10, 2019

Another update to Makefile.ci (hopefully the last) and squashed directly. Would be great to have this in soonish. Though I tried to make it not to conflict too much with #12879, merging the FF branches with that one was quite hellish ^^"

Copy link
Contributor

@benpicco benpicco left a comment

Choose a reason for hiding this comment

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

Looks good overall, most of it is just adding stub code that doesn't do anything on it's own yet.
b1d4cb3 is a nice small cleanup.

Only found some small things - comments are always good to not get lost in the sea of acronyms.

@miri64 miri64 force-pushed the gnrc_sixlowpan_iphc/enh/vrb-creation branch from b31d0db to 3273602 Compare December 10, 2019 13:00
@miri64
Copy link
Member Author

miri64 commented Dec 10, 2019

Addressed comments and squashed directly as otherwise I wouldn't have been able to adapt the comment that was removed in a later commit.

Copy link
Contributor

@benpicco benpicco left a comment

Choose a reason for hiding this comment

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

Code looks good and tests are still passing - changes outside of MODULE_GNRC_SIXLOWPAN_FRAG_VRB are minimal anyway.

@miri64
Copy link
Member Author

miri64 commented Dec 10, 2019

Thanks for the review!

@miri64 miri64 merged commit f38f974 into RIOT-OS:master Dec 10, 2019
@miri64 miri64 deleted the gnrc_sixlowpan_iphc/enh/vrb-creation branch December 10, 2019 14:00
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Area: network Area: Networking CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR CI: run tests If set, CI server will run tests on hardware for the labeled PR Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants