Skip to content

Migrate packet forwarding functionality to rust#2632

Merged
robgjansen merged 3 commits intoshadow:mainfrom
robgjansen:relay-rs
Jan 29, 2023
Merged

Migrate packet forwarding functionality to rust#2632
robgjansen merged 3 commits intoshadow:mainfrom
robgjansen:relay-rs

Conversation

@robgjansen
Copy link
Copy Markdown
Member

@robgjansen robgjansen commented Dec 22, 2022

Adds a new relay module that simplifies and encompasses the packet forwarding logic that was previously embedded inside of the network interface module.

closes #1727
closes #1728

@robgjansen robgjansen added Type: Enhancement New functionality or improved design Component: Main Composing the core Shadow executable labels Dec 22, 2022
@robgjansen robgjansen self-assigned this Dec 22, 2022
@codecov
Copy link
Copy Markdown

codecov bot commented Dec 22, 2022

Codecov Report

Base: 68.12% // Head: 68.11% // Decreases project coverage by -0.01% ⚠️

Coverage data is based on head (22f81f9) compared to base (0a2b8ff).
Patch coverage: 80.00% of modified lines in pull request are covered.

❗ Current head 22f81f9 differs from pull request most recent head b76ed42. Consider uploading reports for the commit b76ed42 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2632      +/-   ##
==========================================
- Coverage   68.12%   68.11%   -0.01%     
==========================================
  Files         202      203       +1     
  Lines       30398    30407       +9     
  Branches     5948     5935      -13     
==========================================
+ Hits        20708    20712       +4     
- Misses       4983     4992       +9     
+ Partials     4707     4703       -4     
Flag Coverage Δ
tests 68.11% <80.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/main/network/mod.rs 100.00% <ø> (ø)
src/main/network/router/codel_queue.rs 66.80% <ø> (ø)
src/main/network/relay/token_bucket.rs 69.53% <65.51%> (-2.25%) ⬇️
src/main/network/relay/mod.rs 75.70% <75.70%> (ø)
src/main/network/router/mod.rs 86.00% <85.71%> (+11.00%) ⬆️
src/main/host/network_interface.rs 91.37% <86.95%> (+14.45%) ⬆️
src/main/host/host.rs 79.61% <90.62%> (-1.11%) ⬇️
src/main/core/worker.rs 82.63% <100.00%> (+0.59%) ⬆️
src/main/network/net_namespace.rs 80.41% <100.00%> (-2.78%) ⬇️
src/main/network/packet.rs 20.43% <100.00%> (-0.46%) ⬇️
... and 42 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Copy Markdown
Contributor

@sporksmith sporksmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks plausible!

Copy link
Copy Markdown
Contributor

@stevenengler stevenengler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here are some comments from when I looked at the code yesterday when working on the tgen onion service stuff. I haven't looked at the new changes, so some of these might not be relevant anymore.

@robgjansen
Copy link
Copy Markdown
Member Author

After the new TGen graceful shutdown was added (shadow/tgen#43) and set to run in the benchmarks, this PR now performs similarly to main with no download timeouts.
https://github.com/shadow/benchmark-results/tree/master/tgen/2023-01-24-T00-39-39

@robgjansen robgjansen marked this pull request as ready for review January 26, 2023 23:44
@robgjansen
Copy link
Copy Markdown
Member Author

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

Labels

Component: Main Composing the core Shadow executable Type: Enhancement New functionality or improved design

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add new upstream routers Refactor location of bandwidth token buckets

3 participants