Skip to content

Network stack cleanup #8723

@tbursztyka

Description

@tbursztyka

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:

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions