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

ci: Enable github CI for developers forks #21

Open
wants to merge 80 commits into
base: main
Choose a base branch
from

Conversation

rzr
Copy link
Contributor

@rzr rzr commented Nov 5, 2024

jerome-pouiller and others added 30 commits June 11, 2024 12:21
Currently, if lowpan_adaptation_queue_size() returns > 2, the tun
interface is not read. However, poll() still wake up the main loop.
This behavior lead to a useless wake up of the main loop and a waste of
CPU resources.

This issue typically happens during throughput tests when the Linux
stack send frames faster than the RCP is able to send.

See WI_SUN-3494.

Signed-off-by: Jérôme Pouiller <[email protected]>
Only the local copy of the variable was incremented.
tcflush() does not work for this purpose as it discards unsent bytes.
This prevents frame cancelation, which creates annoyances regarding
framing detection on the RCP.
APIv2 has an additional field to allow for a different payload size
between the request and the confirmation. This oversight went unnoticed
because the way the payload is contructed starts with 00 01 02..., which
was interpreted as "a 1 byte buffer with contents 0x02". Testing the TX
mode makes the issue apparent as the RCP expects to read payload length
of 0 but instead finds that there are not enough bytes.
With --no-daemon, dnsmasq outputs logs to both stderr and syslog, which
results in line duplication in journalctl. Using --keep-in-foreground
fixes this issue.
Since PAN Advertisements transmission can be canceled by trickle, it is
best to also include JM-IEs in data frames.
Aparently this is how the API is supposed to work, but it makes the
DELETE endpoint very confusing and/or useless.
Aparently this is how the API is supposed to work, but it makes the
DELETE endpoint very confusing and/or useless.
The hop limit selected at a tunnel entry is a local configuration of the
ingress, and has no relation with the received hop limit of the packet
to encapsulate. RFC 2473 section 6.3 describes the use of hop limit in
the case of tunnels in more details.

IP tunnels are normally invisible to tools like traceroute since an
increment of the probe hop limit covers the whole tunnel. However with
this quirk, traceroute needs to increase to hop limit for every
intermediate Wi-SUN router in the tunnel, but it also does not receive
ICMP error messages since they are destined to the ingress.

Here is an example to demonstrate the difference in behavior:

           +  2001:db8::1
 Backhaul--|      | Ethernet link
           +  2001:db8::2           (eth0)
                  | Linux + wsbrd
           +  fd12:3456::200:0:80:3 (tun0)
           |      | Radio
           |  fd12:3456::200:0:80:0
 Wi-SUN----|      | Radio
           |  fd12:3456::200:0:80:1
           |      | Radio
           +  fd12:3456::200:0:80:2

Executing traceroute from the backhaul device:
Before:

    $ traceroute fd12:3456::200:0:80:2
    traceroute to fd12:3456::200:0:80:2 (fd12:3456::200:0:80:2), 30 hops max, 80 byte packets
     1  2001:db8::1 (2001:db8::1)  0.323 ms  0.368 ms  0.280 ms
     2  * * *
     3  * * *
     4  fd12:3456::200:0:80:2 (fd12:3456::200:0:80:2)  40.184 ms  43.054 ms  45.506 ms

After:

    $ traceroute fd12:3456::200:0:80:2
    traceroute to fd12:3456::200:0:80:2 (fd12:3456::200:0:80:2), 30 hops max, 80 byte packets
     1  2001:db8::1 (2001:db8::1)  0.353 ms  0.393 ms  0.318 ms
     2  fd12:3456::200:0:80:2 (fd12:3456::200:0:80:2)  19.228 ms  25.906 ms *

WI_SUN-3547
Kilio22 and others added 26 commits September 6, 2024 17:31
Unfortunately, sigdescr_np() is only available since glibc v2.32, which
is not provided by older distros such as Raspbian bullseye which packages
glibc v2.31.
After receiving an EAP reply from a target, this reply is forwarded to
the radius server and the state machine transitions to the
EAP_TLS_STATE_EAP_REQUEST state.
If an incorrect frame is received from the same target while in this
state, we would wrongly try to apply an offset to skip the socket and
EAPOL headers. This would result in a segmentation fault.

WI_SUN-3691
Exposing them would not make sense considering such FFNs are not
operational yet.
See the updated CHANGES.md.

WI_SUN-3747
For most functions, CPC documents:

    On error, a negative value of errno is returned.
Note that with the current RCP API (2.4.1), there is no way to disable
the destination address filtering, and the filter starts enabled with
the hardware specific address.

WI_SUN-3744
This new link has restricted access, but it turns out that the original
swagger page was unofficial.
Keeping a "fragmenter_tx_entry_t" with field "buf" as NULL basically
results in a corrupted entry in activeUnicastList, causing a SegFault
in functions that try to process the buffer. Dropping the fragment
altogether seems like the better thing to do.

WI_SUN-3769
The max size is given as a STR_MAX_LEN_EUI64, but it really should
be STR_MAX_LEN_EUI48

Origin: SiliconLabs#18
Valgrind reported:

    ==14914== 948,792 (4,896 direct, 943,896 indirect) bytes in 136 blocks are definitely lost in loss record 85 of 85
    ==14914==    at 0x486AC6C: calloc (vg_replace_malloc.c:1328)
    ==14914==    by 0x4908055: nl_cache_alloc (in /usr/lib/libnl-3.so.200.26.0)

WI_SUN-3772
Fixes: 279ba86193 ("ws: update regulation with values from Wi-SUN TPS 2v01")
The struct returned by rtnl_neigh_get() gets its reference count
incremented so it must be explicitly unreferenced by calling
rtnl_neigh_put().

WI_SUN-3772
Enable to setup a reference system for building,
it can be used for various automation (eg: github actions)

Most of changes are isolated in this simple makefile
that more or less script what has been described in readme file

Signed-off-by: Philippe Coval <[email protected]>
Just run the native helper script in docker,
it is not optimized for bandwidth but minimize duplication of changes.

Signed-off-by: Philippe Coval <[email protected]>
Enable github actions that build any branches using docker along helper script.
To reduces the dependency on github and
avoid bringing more ambiguity or complexity
most tasks are isolated at lowerlevel (in helper for cmake).

More checks to come next, unit tests, lint etc.

Relate-to: https://github.com/rzr/wisun-br-linux/actions/runs/11687474586/job/32545660605
Signed-off-by: Philippe Coval <[email protected]>
@jerome-pouiller
Copy link
Collaborator

Very nice! However, I wonder if it make sense to involve docker and a makefile for a such simple CI. I assume we could do the same with only .github/workflows/build.yml?

@rzr
Copy link
Contributor Author

rzr commented Nov 5, 2024

well it is developer preference,.

IHMO Depending on docker is not ideal, but supporting it is nice (again it can be a reference that can help troubleshooting), I think there are benefits to have minimal (like this one) docker file in tree, something nice for DX one can build directly with a oneliner:

docker build https://github.com/rzr/wisun-br-linux.git#phcoval/ci/review/main

Sending build context to Docker daemon  3.194MB
Step 1/10 : FROM debian:12
 ---> 617f2e89852e
(...)

@MathisMARION
Copy link
Collaborator

Hello,

I have re-worked your proposal to not use Docker nor a bash script. I believe it is more suited to include everything in the workflow file in our case. I have also added a final step showing --version, which involved fetching the upstream tags (forks usually don't include them). Thank you for the idea, it is very much appreciated!

MathisMARION@9f07c1c

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.

5 participants