-
Notifications
You must be signed in to change notification settings - Fork 6
Stage for pkt io #925
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
Draft
Fredi-raspall
wants to merge
11
commits into
main
Choose a base branch
from
pr/fredi/pkt-io
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Stage for pkt io #925
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
31eccf1
feat(net,dataplane): add local flag in metadata
Fredi-raspall 429f9dd
feat(net): add DoneReason::InternalDrop
Fredi-raspall d0cbc3b
feat(net): display metadata flags
Fredi-raspall 2e2b2f7
feat(pkt-io): add new crate pkt-io
Fredi-raspall 75d5bd3
feat(pkt-io): add tests
Fredi-raspall f8424e2
feat(pkt-io): add sidecar pipeline test
Fredi-raspall 390b94b
feat(pkt-io): allow naming pkt-io instances
Fredi-raspall 87bbea3
feat(dataplane): add single pkt-io to pipeline
Fredi-raspall 79f193e
feat(pkt-io): def. alias PktQueue for readability
Fredi-raspall 79463d0
feat(pkt-io): encapsulate crossbeam queue
Fredi-raspall f717b77
feat(net): Add Allocate trait
Fredi-raspall File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| [package] | ||
| name = "dataplane-pkt-io" | ||
| version = "0.1.0" | ||
| edition = "2024" | ||
| publish = false | ||
| license = "Apache-2.0" | ||
|
|
||
| [dependencies] | ||
| # internal | ||
| net = { workspace = true } | ||
| pipeline = { workspace = true } | ||
| tracectl = { workspace = true } | ||
|
|
||
| # external | ||
| crossbeam = { workspace = true } | ||
| linkme = { workspace = true } | ||
| tracing = { workspace = true } | ||
|
|
||
| [dev-dependencies] | ||
| tracing-test = { workspace = true } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
| // Copyright Open Network Fabric Authors | ||
|
|
||
| //! Local packet I/O for gateway | ||
|
|
||
| mod nf; | ||
| mod tests; | ||
|
|
||
| pub use nf::PktIo; | ||
| pub use nf::PktQueue; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Is my understanding correct that this new stage has no effect until we set the queues calling
set_injectq()andset_puntq()?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.
We can have the behavior that you mention if we create the pkt-io without buffers.
In this commit, I added 10K buffer queue for injection and 100 pkts for punting.
Since some packets may be marked as local, they will be punted. But since no one checks the punt queue, they will be cached there forever. So this PR is not to be merged (I set 100 pkts so that we'd not cache megabytes) as is. The expectation was to add more commits from @daniel-noland to do the actual consumption of those packets).
If we'd want to merge this PR, we'd just need to set zero buffering to the pkt-io, in which case it would be transparent.