Skip to content

Remove one unnecessary copy in csp_send_direct per call#27

Open
MErdbruegger wants to merge 1 commit intospaceinventor:masterfrom
MErdbruegger:csp_send_direct_avoid_copy
Open

Remove one unnecessary copy in csp_send_direct per call#27
MErdbruegger wants to merge 1 commit intospaceinventor:masterfrom
MErdbruegger:csp_send_direct_avoid_copy

Conversation

@MErdbruegger
Copy link

This change resolves the todo left in csp_send_direct for eliminating the need to
clone the packet if it will only be sent to a single interface. This is a net neutral
in terms of stack memory usage as it replaces the int used to detect a successful
send with a new interface pointer. If the user has chosen to use the RTable it
decreases stack memory usage by one int. This also eliminates bug prone copy
and paste by using MACROs for reuse of the subnet checks and sending logic.
This comes at a slight cost of increased instruction memory usage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant