Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 16, 2025

Fix XDP submodule build failures after update

Problem

After updating the XDP submodule from commit 793dc2a to 23fbfdd, all Windows builds were failing with compilation errors like:

  • error C2065: 'XDP_TX_PACKET': undeclared identifier
  • error C2065: 'XdpFrameTxChecksumActionPassthrough': undeclared identifier
  • error C2065: 'XdpFrameLayer3TypeIPv4NoOptions': undeclared identifier
  • error C2065: 'XdpFrameTxChecksumActionRequired': undeclared identifier

Root Cause

The file src/platform/datapath_raw_xdp_win.c uses XDP offload types and enums (XDP_FRAME_LAYOUT, XDP_FRAME_CHECKSUM, XdpFrameTxChecksumActionPassthrough, etc.) but was not explicitly including <xdp/offload.h>.

These types are defined in xdp/offload.h in the XDP submodule, but this header is not transitively included by any other XDP headers. The build likely worked before due to some implicit includes that may have changed with the XDP update.

Solution

  • Investigate build failures in Windows builds
  • Identify missing XDP types and headers
  • Add #include <xdp/offload.h> to datapath_raw_xdp_win.c
  • Verify all required types are present in the header
  • Commit the minimal fix

Changes Made

Added a single line to src/platform/datapath_raw_xdp_win.c:

#include <xdp/offload.h>

This provides the definitions for:

  • XDP_FRAME_LAYOUT struct
  • XDP_FRAME_CHECKSUM struct
  • XdpFrameTxChecksumActionPassthrough enum value
  • XdpFrameTxChecksumActionRequired enum value
  • XdpFrameLayer3TypeIPv4NoOptions enum value
  • XdpFrameLayer3TypeIPv6NoExtensions enum value
  • XdpFrameLayer4TypeTcp enum value
  • XdpFrameLayer4TypeUdp enum value

Verification

✅ All required types verified to exist in xdp/offload.h in the updated XDP submodule (commit 23fbfdd)
✅ No other source files affected (only datapath_raw_xdp_win.c uses these types)
✅ Linux XDP files don't need this header (they don't use these Windows-specific offload types)

Original prompt

This section details on the original issue you should resolve

<issue_title>Consuming the latest XDP submodule is breaking the build</issue_title>
<issue_description>In this dependabot PR: #5517, we see that after ingesting the latest XDP submodule, our MsQuic builds are all failing.

The submodule update includes changes in XDP to include recent changes in various WDK and build manifests.

We need to figure out what broke the contract between XDP and MsQuic, and resolve the build failures.</issue_description>

Comments on the Issue (you are @copilot in this section)

Fixes #5524


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI and others added 2 commits October 16, 2025 18:40
Co-authored-by: ProjectsByJackHe <43735701+ProjectsByJackHe@users.noreply.github.com>
Co-authored-by: ProjectsByJackHe <43735701+ProjectsByJackHe@users.noreply.github.com>
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.

Consuming the latest XDP submodule is breaking the build

2 participants