-
Notifications
You must be signed in to change notification settings - Fork 35
Update memory region names #45
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
base: main
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -50,7 +50,15 @@ pub const MM_STACK_START: u64 = MM_REGION_SIZE * 2; | |
| /// Virtual address of the heap region | ||
| pub const MM_HEAP_START: u64 = MM_REGION_SIZE * 3; | ||
| /// Virtual address of the input region | ||
| pub const MM_INPUT_START: u64 = MM_REGION_SIZE * 4; | ||
| pub const MM_TX_AREA: u64 = MM_REGION_SIZE * 4; | ||
| /// Virtual address of the scratch pad area | ||
| pub const MM_SCRATCHPAD_AREA: u64 = MM_REGION_SIZE * 5; | ||
|
||
| /// Virtual address of the instruction area | ||
| pub const MM_TX_INSTRUCTION_AREA: u64 = MM_REGION_SIZE * 6; | ||
| /// Virtual address of the instruction input payload | ||
| pub const MM_TX_INSTRUCTION_DATA: u64 = MM_REGION_SIZE * 7; | ||
| /// Virtual address of the accounts payload area | ||
| pub const MM_ACCOUNTS_AREA: u64 = MM_REGION_SIZE * 8; | ||
|
|
||
| // eBPF op codes. | ||
| // See also https://www.kernel.org/doc/Documentation/networking/filter.txt | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't "Input" be renamed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not rename it, because it is still the same. Should it be called
MM_TX_INPUT_START?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Input" is kinda a useless name because it does not say from where to where, it is subjective depending on the perspective, like "left" and "right". Maybe
MM_TX_AREA,MM_TX_INSTRUCTION_AREAandMM_TX_INSTRUCTION_DATA.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then again, we probably want multiple instructions mapped in at once. So MM_TX_INSTRUCTION_DATA might not cut it either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even if we follow that path, the most important instruction for a program is the one being executed, so having that one in a predicted address that can be read without any other dependencies is preferable. The SDK could then access other instructions on demand.