Skip to content
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

Add PacketList Datatypes #76

Merged
merged 7 commits into from
Dec 2, 2024
Merged

Conversation

thearossman
Copy link
Collaborator

Create multiple, user-defined datatypes for caching Mbufs (raw packets) for end of connection delivery.

This also adds infrastructure for sharing Mbufs using DPDK's reference counting infrastructure (see memory/mbuf file). This gives us a way to share Mbufs between multiple data structures (e.g., pre- and post-reassembly) without copying and with lower overhead than Rust's Rc or Arc infrastructure. It may encounter issues if Mbufs are shared across threads, but they will not be in the current architecture. This infrastructure is critical for supporting future streaming datatypes.

Note that, with some of these datatypes, mempool availability can become the bottleneck, especially when working with UDP connections (which cannot be delivered until timeout). In some cases, it is more efficient to copy Mbufs into byte arrays.

Testing done: wrote examples for offline mode; printed out raw bytes (hex) in packet lists and compared to wireshark raw bytes.

Thea Rossman and others added 7 commits November 12, 2024 11:58
Allow data structures to share mbufs by introducing a reference
counter (DPDK primitives). This could have been done with an Rc
in Rust stdlib; that would be more idiomatic but would come with
more overhead. It also would have introduced challenges with
cross-core data sharing.
@thearossman thearossman requested a review from thegwan November 24, 2024 19:18
@thearossman
Copy link
Collaborator Author

thearossman commented Nov 24, 2024

Will go ahead and merge soon, but would be nice to have someone else take a look at this to see if it makes sense at some point (especially the mbuf refcounting)

@thearossman thearossman merged commit 5598165 into stanford-esrg:main Dec 2, 2024
2 checks passed
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