Added pool API, blocking smart polling, and initial mTCP support#4
Merged
rickydebojeet merged 43 commits intomainfrom Oct 30, 2025
Merged
Added pool API, blocking smart polling, and initial mTCP support#4rickydebojeet merged 43 commits intomainfrom
rickydebojeet merged 43 commits intomainfrom
Conversation
- Added a new flash_pool API for memory management, it enables us to transmit packets even without requiring any packet reception. - Shifted the stats thread function to periodically dump statistics for each socket to library. NFs may write their own function using our advanced API. - Refactored existing functions in flash_nf and flash_txrx to handle error and integrate the new pool API. - Updated command line argument parsing to include new options and improve usability. - Improved error handling and logging throughout the codebase. - The l2fwd application is modified to support the new pool API, all other NFs may not work. They will be updated in future commits. The old API will be retired subsequently. - Introduced new version number 25.5.0 following year.month.version paradigm.
- supports new pool API - you can provide fwd ratio percentage
- smart poll will be blocked untill packet is received, unlike previous implementation which was configurable. - if there are pending transmissions the data path will not be blocked.
- UDS APIs has error handling. - documentation added to UDS APIs - modified UDS configuration paths in flash__configure_nf() to handle errors gracefully - removed unnecessary *next in config and NFs (unused variable) - monitor will be updated with proper error handling in upcomming commits
- a new flash__allocmsg() data path API which uses the pool library to allocate tx packets - a new txgen nf which transmit packets at max rate. caveats: there are packet copies involved in the implementation. performance decreases with increasing packet sizes.
- add MAC address retrieval function and integrate into existing components. - bug fixes in l2fwd, simplefwd, fwdrr, and fwddrop
- debug is compiled out in release builds - color logs can be configured using meson_options - all required dependencies are kept private
- the commit tries to fix issue #1 - default is set to false
- refactored modules - added pool feature - updated data types - removed poll timeout
- log_use_color as well as debug logs were not getting printed due to wrong setup of meson arguments. - meson uses a wrapper arround cargo to build the rust flash libraries and examples (Issue #1)
…o the new library API.
- Useful for debugging when large amounts of data need to be written to a file. - Supports creating multiple target files (e.g. one per NF) for debugging output.
- Implement backpressure with poll wait instead of sleep. - Updated the __reserve_tx algorithm. - When unable to reserve space in the TX ring, the NF waits until downstream NFs wake it up (enough FQ buffers and free RX ring space available) - Replace periodic sleep flag `p` with flag `s` - Use flag `p` for poll with POLLOUT
- Added new option track_tx_budget to track outstanding_tx per outgoing edge (disabled by default). - Introduced an option to specify the total maximum outstanding TX when track_tx_budget is enabled (default: 256). - Added new API: flash__track_tx_and_drop. When track_tx_budget is enabled, this function selectively transmits or drops packets to maximize total throughput. - Added new NF example: multi-flow-tx.c demonstrates the usage of the above features.
rust library: - refactored stats module - added tui - added msrv to Cargo.toml - updated repo in Cargo.toml - chained if lets - reset idle timestamp after bp timeout - added minor optimizations and refactors - fixed/allowed clippy warnings rust examples: - added stats and tui - made ctrlc optional but default - updated nf mac and dest mac logic - preallocated vectors for send and drop descs
- added pollout feature, updated polling logic - added backpressure fd, renamed poll_fd to idle - added kick_rx, updated kick to kick_tx - added try_kick_rx - renamed Fd to SocketFd - updated umem and nf id to usize - updated default backpressure sense to 1 - updated socket shared config
- libxdp is not building on old ubuntu - quick fix removed ubuntu 22 from ci/cd pipeline
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.