Skip to content

Remove one unnecessary copy in csp_send_direct per call #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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