Skip to content

Added pool API, blocking smart polling, and initial mTCP support#4

Merged
rickydebojeet merged 43 commits intomainfrom
dev
Oct 30, 2025
Merged

Added pool API, blocking smart polling, and initial mTCP support#4
rickydebojeet merged 43 commits intomainfrom
dev

Conversation

@rickydebojeet
Copy link
Collaborator

No description provided.

rickydebojeet and others added 30 commits June 12, 2025 23:12
- 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)
 - 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.
rickydebojeet and others added 13 commits October 29, 2025 18:23
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
@rickydebojeet rickydebojeet merged commit e9a03d7 into main Oct 30, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants