-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Closed
Labels
EnhancementChanges/Updates/Additions to existing featuresChanges/Updates/Additions to existing featuresarea: Networking
Description
Current code base would need serious cleanup/optimization. Current status shows duplicates, un-proper modularization, under optimized data storage/lookup, naming issues etc...
What should be done:
- Keep each specific part into their own C file (i.e.: ipv4, ipv6, etc...).
. For instance, icmpv4 redo in its code what ipv4 does already. - Factorize as much as possible
- Reduce #ifdefs usage inside functions
. Use IS_ENABLED()
. Move CONFIG_* conditioned code to own function - Naming convention
.When it is a public function net_<domain><...>()
.When it is a private function <domain><...>() - de-clutter: if/for/while... imbrication. (The Linux rule of 3 maximum is nice), if functions are way too big, isolate logical blocks in dedicated functions etc...
Areas:
- ipv4.c/icmpv4.c : Network stack cleanup: IPv4 #8720
- ipv6.c/icmpv6.c : Network stack cleanup: IPv6 #8721
- connection.c : Network stack cleanup: connection #8722
- rpl.c : Network stack cleanup: RPL #8724
- net_context.c : Network stack cleanup: Net Context #8725
- dhcpv4 : Network stack cleanup: DHCPv4 #8727
- net_if: Network stack cleanup: Net IF #8728
Metadata
Metadata
Assignees
Labels
EnhancementChanges/Updates/Additions to existing featuresChanges/Updates/Additions to existing featuresarea: Networking