You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
perf(net): pool-back ARP reply frames in FrameClassifier #265
ethernet.rs::ArpResponder::handle_arp allocates a new Vec<u8> for every ARP reply (Vec::with_capacity(ARP_FRAME_MIN_LEN) = 42 bytes). Replies are buffered in FrameClassifier::pending_arp_replies: Vec<Vec<u8>> and drained each tick.
ARP volume is low in steady state (guest typically caches the gateway MAC for minutes), so this is the lowest-priority allocation on the hot path. But:
On boot, the guest does an initial ARP Request → we reply → guest caches → no more ARP for a while.
Under aggressive ARP expiry or misconfigured guest, or in test scenarios, ARP can become frequent.
Cleaning it up removes the last Vec::with_capacity in the classifier's inline path, leaving only the packet pool.
Proposed fix
Return FrameBuf instead of Vec<u8> from ArpResponder::handle_arp:
FrameClassifier already owns a PacketPool (pool: Arc<PacketPool>).
Pass a &Arc<PacketPool> into handle_arp or restructure so the classifier builds the reply itself using its pool.
Activity
linear commentedon Apr 24, 2026
ABX-371