Skip to content

Eliminate lls_req() and sister functions #288

@AltraMayor

Description

@AltraMayor

submit_arp() allocates struct lls_arp_req in the execution stack just so lls_req() can allocate a mailbox message and linearly copy struct lls_arp_req. Moreover, lls_req() is mostly a big switch statement for each type. If the allocation of the mailbox message is moved to submit_arp(), not only is the data copy going to be avoided, but it'll also simplify lls_req(). Repeating this strategy on all the other case substatements of the switch statement of lls_req(), other data copies can be avoided and lls_req() would become empty, unnecessary.

This code pattern shows up in other blocks beside the LLS block used as an example above. Thus, to fully address this issue, one has to identify all the locations where this issue applies. It's also advisable to first have a small pull request dealing with only submit_arp(), so one has a reviewed model to apply in the following pull requests, which would cover all the repository.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions