Repository navigation
datapath-windows: extract flow key for RARP frames - #55
Merged
Merged
Conversation
The kernel flow-key extractor populated the ARP key only for EtherType 0x0806 (ARP); a RARP frame (0x8035), which shares the ARP wire format, fell through with its ARP key left zero, so OVN/OpenFlow rules matching RARP arp_op/arp_spa/etc. could never hit. Accept ETH_TYPE_RARP in the same arm, and widen the address-copy opcode gate to the RARP request/reply opcodes so the sender/target addresses are populated too, matching Linux.
There was a problem hiding this comment.
Pull request overview
This PR updates the Windows datapath flow-key extractor (OvsExtractFlow) so RARP (EtherType 0x8035) frames populate the existing ARP key fields, enabling OpenFlow/OVN matches on RARP arp_op and addresses to work the same way they do on Linux.
Changes:
- Treat
ETH_TYPE_RARPthe same asETH_TYPE_ARPin the extractor, populatingflow->arpKey. - Extend the ARP-address population gate to include RARP opcodes (
RARPOP_REQUEST/RARPOP_REPLY) soarp_spa/tpaandarp_sha/thaare extracted for RARP frames.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
The Windows kernel flow-key extractor (
OvsExtractFlow) populated the ARP key only for EtherType 0x0806 (ARP). A RARP frame (0x8035), which shares the byte-identicalarp_eth_headerwire format, fell through the ethertype chain with its ARP key left all-zero.This is a Linux-parity / contract-faithfulness fix, not a new feature. OVS userspace already treats RARP as ARP-format everywhere — the
rarpmatch keyword (lib/ofp-parse.c),lib/flow.c,lib/match.c,nx-match,odp-util— and this driver's own Netlink key encode/decode already handleETH_TYPE_ARPandETH_TYPE_RARPidentically. The runtime extractor was the one place out of step: a flow written withrarp,...predicates installs but can never match on Windows, whereas it matches on Linux.Two edits in the existing ARP arm, mirroring Linux (
lib/flow.c):ETH_TYPE_RARPalongsideETH_TYPE_ARP.Live-validated on a Hyper-V test datapath: with the patched driver, a raw RARP request (op=3, with a non-zero sender address) injected from a guest is matched by a flow
dl_type=0x8035,arp_op=3,arp_spa=192.168.99.50(n_packets climbs) — which requires the extractor to populate both the opcode and the sender address. Ordinary ARP extraction is unchanged.Scope: extractor-only.
set(arp)rewrite on RARP frames and the pre-existingRARPOP_REPLY_NBONBO-constant typo are intentionally left to separate changes.