Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xskfwd fails with error 0x80070002 #757

Open
jamwaffles opened this issue Dec 6, 2024 · 1 comment
Open

xskfwd fails with error 0x80070002 #757

jamwaffles opened this issue Dec 6, 2024 · 1 comment
Labels
documentation Improvements or additions to documentation question Further information is requested

Comments

@jamwaffles
Copy link

My end goal is to use the AF_XDP functionality in this project to send Ethernet II frames containing EtherCAT packets without bothering the rest of the network stack. To get started with this repo I thought I'd just try running an existing example. I followed the development.md guide and, after installing VS2022 and all the build dependencies, I ran:

  • .\tools\build.ps1
  • .\tools\prepare-machine.ps1 -ForSpinxskTest
  • .\artifacts\bin\x64_Debug\test\xskfwd.exe 13

The last command fails with ERR: XskCreate failed: 80070002. I searched around and didn't find anything about that specific error code so, assuming it was permissions based, tried to run the binary in an admin powershell but that didn't change anything. I also did the whole set-executionpolicy unrestricted dance to no avail.

I appreciate ForSpinxskTest doesn't include the string xskfwd but I figured they'd need similar setup so went with it.

My NICs look like this (from netsh int ipv4 show interfaces):

Idx     Met         MTU          State                Name
---  ----------  ----------  ------------  ---------------------------
  1          75  4294967295  connected     Loopback Pseudo-Interface 1
 19          35        1500  connected     Wi-Fi
 17          65        1500  disconnected  Bluetooth Network Connection
  3          25        1500  disconnected  Local Area Connection* 1
  6          25        1500  disconnected  Local Area Connection* 2
 13          25        1500  connected     Ethernet 3
  5           5        1500  disconnected  Ethernet 4

Neither Ethernet 3 nor Ethernet 4 have anything connected to them, although the same error message is printed if I do plug a cable in. They're both Intel i226-V chipsets with Intel driver version 2.1.3.3. I'm on Windows 11 Pro 24H2.

Is there a common thing I need to do/change/configure to be able to run the examples (and subsequently my own programs with AF_XDP)? I'm a very new Windows developer so hopefully something obvious I've missed.

@mtfriesen
Copy link
Contributor

Hey, to set up a machine for general testing, I'd recommend using .\tools\prepare-machine.ps1 -ForTest which will install the bare-minimum dependencies to test XDP.

The 80070002 error is simply "error: not found" which is very common. Based on your repro steps, the XDP driver has not actually been installed on your test machine, causing the xskfwd.exe program to fail to open a handle to the XDP driver. You can follow the steps at https://github.com/microsoft/xdp-for-windows/blob/main/docs/usage.md to install the XDP driver after you've built it and configured the machine for testing, or tools\setup.ps1" -Install xdp -Config $Config -Platform $Platform will do the same thing if you have the repo checked out.

@mtfriesen mtfriesen added documentation Improvements or additions to documentation question Further information is requested labels Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants