Skip to content

#319 - ARP Resolution - #322

Merged
cliffburdick merged 7 commits into
mainfrom
cburdick/ibverbs-arp-resolution
Oct 1, 2026
Merged

cliffburdick merged 7 commits into
mainfrom
cburdick/ibverbs-arp-resolution

Conversation

@cliffburdick

Copy link
Copy Markdown
Collaborator

Provide an API to users to do an ARP lookup manually and cache in their own routing tables.

@greptile-apps

greptile-apps Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

[Medium risk] Adds ARP resolution for raw Ethernet TX packets.

The PR should not merge until the required API and onboarding documentation is updated.

Summary

The PR adds a one-shot IPv4 next-hop MAC lookup for raw ibverbs, exposes it to C++ and Python, and uses it in raw TX examples and cross-host configuration. The latest update refreshes stale neighbors and adjusts the TX-only example and guidance. The public-API documentation mapping remains incomplete.

Reviews (6) · Last reviewed commit: "#319 - Refresh stale ARP and fix xhost c..."

Comment thread src/net_neighbor.cpp
Comment thread src/net_neighbor.cpp
Comment thread src/net_neighbor.cpp Outdated
Comment thread scripts/setup_spark_xhost_net.sh
Comment thread examples/raw_gpudirect_bench.cpp
Comment thread docs/api-reference/python.md
@dleshchev

Copy link
Copy Markdown
Collaborator

At PR head 2b7c63b, the committed cross-host TX config adds rx.flow_isolation: true without rx.queues. daqiri_config_validate reports invalid node; first invalid key: "queues" and rejects the YAML. Please make the committed config valid.

There is also a code-path concern: NUD_STALE is returned as usable before a neighbor refresh is triggered. Because raw TX bypasses Linux’s neighbor-use path, a later query after the peer MAC changes may return the old MAC. I did not reproduce a MAC change; please refresh stale entries before returning them.

Two pre-existing config values still block the documented example on the tested hardware: the committed RX flow ID 0 is rejected at init as zero or duplicate, and the committed TX batch_size: 10240 exceeds the device’s 4,096-packet maximum. With temporary config corrections, both an existing-neighbor run and a cold-ARP physical cross-host run sent and received exactly 778,240 packets each, with zero RX CQ errors, application ring drops, or NIC receive-buffer/PHY discards.

@cliffburdick

Copy link
Copy Markdown
Collaborator Author

Addressed in 8f1a263.

  • Removed the invalid TX-only rx block; TX-only ports have no DAQIRI RX catch-all, so ARP remains on the kernel path without rx.flow_isolation. The ibverbs warning now applies only when DAQIRI RX queues exist.
  • Changed the cross-host RX flow ID from 0 to 1.
  • Capped both TX queue and benchmark batch sizes at 4096.
  • Changed STALE/DELAY/PROBE handling so those entries are not returned immediately. The resolver first invalidates the cached neighbor, then uses NTF_USE to make Linux issue fresh broadcast ARP and waits for a confirmed address.
  • Updated the destination-MAC documentation to distinguish TX-only interfaces from interfaces with DAQIRI RX queues and to document stale refresh behavior.

Verification:

  • Both cross-host YAML files pass daqiri_config_validate.
  • All checked-in config validation cases pass with the combined-engine validator.
  • ibverbs-only and ibverbs+DPDK builds pass.
  • CTest passes.
  • Documentation reference check passes.
  • An isolated veth test seeded a wrong STALE MAC and verified that resolution returned the peer current MAC after broadcast ARP, not the cached value.

@cliffburdick
cliffburdick merged commit 993363d into main Oct 1, 2026
3 checks passed
@cliffburdick
cliffburdick deleted the cburdick/ibverbs-arp-resolution branch October 1, 2026 21:17
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.

2 participants