RIOT icon indicating copy to clipboard operation
RIOT copied to clipboard

sys/net/gnrc: Remove code duplication

Open francois-berder opened this issue 3 years ago • 7 comments

Contribution description

While using simian (a tool that can detect code duplication) on RIOT-OS, I found two snippets of code that were good candidates for being factorized. This pull request does not change the behavior of gnrc.

Testing procedure

I compiled for the SAMD21-XPRO board the following examples: gnrc_minimal, gnrc_networking and gnrc_networking_mac.

Issues/PRs references

None.

francois-berder avatar May 27 '21 08:05 francois-berder

I compiled for the SAMD21-XPRO board the following examples: gnrc_minimal, gnrc_networking and gnrc_networking_mac.

Since I don't have the time to test it myself at the moment, to all testers: Only gnrc_networking_mac uses the modules that are changed here and gnrc_lwmac is only used when explicitly selected in the Makefile.

miri64 avatar May 27 '21 08:05 miri64

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions.

stale[bot] avatar Mar 02 '22 13:03 stale[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions.

stale[bot] avatar Sep 21 '22 05:09 stale[bot]

@jia200x what do you think of this PR?

miri64 avatar Sep 21 '22 06:09 miri64

I think it makes sense!

jia200x avatar Sep 21 '22 09:09 jia200x

I think it makes sense!

I mean in the scope of DSME coming in and the MAC layers fixed here potentially going out soon ;-)

miri64 avatar Sep 21 '22 10:09 miri64

Ping! :> Where do we stand here?

Teufelchen1 avatar Jan 30 '24 17:01 Teufelchen1

The question still stands if those mac layers are still needed. We have DSME now, and lwmac and gomach are effectively unmaintained for years. I'd say: Let's rebase this one and merge, then deprecate lwmac and gomach.

miri64 avatar Mar 26 '24 14:03 miri64

Murdock results

:heavy_check_mark: PASSED

9056e14e74ff51aafec2257427f58d8d92c12ddb gnrc/gomach: Reduce code duplication

Success Failures Total Runtime
10031 0 10031 09m:45s

Artifacts

riot-ci avatar Mar 26 '24 16:03 riot-ci