Fix typos, bugs, and improve fallback mode compatibility #1
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.
This commit addresses several issues identified during a codebase review:
netmap-min-sys/src/lib.rs.Frameto useCow<'a, [u8]>, allowing it to handle both borrowed (sys) and owned (fallback) data. This makes theFrameAPI more consistent across modes.fallback::FallbackRxRingto returnOption<Frame<'static>>using owned data.fallback::create_fallback_channelto facilitate testing of connected fallback rings.tests/mock.rsto usecreate_fallback_channeland corrected test logic for ring capacity. Fallback tests now pass.src/lib.rsprelude for better conditional exports based on features.Cargo.tomlto correctly associatecore_affinitywithfallbackandsysfeatures, andreed-solomon-erasurewith thesysfeature for relevant examples.sys-dependent examples (ping_pong.rs,sliding_window_arq.rs,fec.rs) with#[cfg(feature = "sys")]to prevent compilation errors when thesysfeature is not active.examples/thread_per_ring.rsto operate conditionally based on thesysfeature, allowing it to compile and run core pinning logic in fallback mode.#[allow(unused_imports)]for athiserrormacro that clippy flagged under specific fallback-only builds, believed to be a false positive.Note: Testing of the
sysfeature was not possible in the current sandboxed environment due to missing Netmap system dependencies. The changes aim to ensure thefallbackmode is robust and well-tested.