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

Attach XDP program to interface before running ctstraffic #152

Merged
merged 6 commits into from
Apr 15, 2024

Conversation

Alan-Jowett
Copy link
Member

@Alan-Jowett Alan-Jowett commented Apr 12, 2024

This pull request includes several changes to the .github/workflows/ebpf.yml file that improve the testing process for eBPF (Extended Berkeley Packet Filter) on Windows. The most significant changes include adding a step to clean up the installer, updating the anti-malware signatures for Windows Defender, updating the URL for downloading the bpf_performance repository artifacts, and adding steps to run the CTS traffic with and without XDP installed to measure performance impacts. There are also changes to merge and upload the results.

Installer cleanup:

  • Added a step to clean up the installer by executing a PowerShell script from a URL. This helps to ensure a clean environment for each test run.

Windows Defender updates:

  • Updated the anti-malware signatures for Windows Defender to prevent false positives that could interfere with the tests.

Repository artifacts:

  • Updated the URL for downloading the bpf_performance repository artifacts. This ensures that the latest version of the artifacts is used for testing.

CTS traffic testing:

  • Added steps to run the CTS traffic with and without XDP installed to measure the impact of XDP on performance. This provides more comprehensive performance data.

Results merging and uploading:

  • Added steps to merge and upload the results of the CTS traffic tests and the BPF performance tests. This makes it easier to compare the results and analyze the performance data.

Windows Defender exclusions restoration:

  • Added a step to restore Windows Defender exclusions after the tests are completed. This ensures that the system is returned to its original state after testing.

@Alan-Jowett
Copy link
Member Author

@nibanks @mtfriesen How do I determine why XDP is refusing the attach? What logs can I gather?
https://github.com/microsoft/netperf/actions/runs/8667710722/job/23771476176?pr=152#step:11:19

@Alan-Jowett
Copy link
Member Author

@nibanks @mtfriesen How do I determine why XDP is refusing the attach? What logs can I gather? https://github.com/microsoft/netperf/actions/runs/8667710722/job/23771476176?pr=152#step:11:19

Got traces.

Issue remains:
IfIndex passed to netsh doesn't match ifindex in trace.

@Alan-Jowett
Copy link
Member Author

Run $remote_address = [System.Net.Dns]::GetHostAddresses("netperf-peer")[0]
Remote address: 10.1.0.[11](https://github.com/microsoft/netperf/actions/runs/8668687020/job/23774371589?pr=152#step:12:12)
Route: 10.1.0.12 MSFT_NetRoute (InstanceID = ";:8;8:8:9??55B55:8:8:8:55;")
Interface index: 8

Name                      InterfaceDescription                    ifIndex Status       MacAddress             LinkSpeed
----                      --------------------                    ------- ------       ----------             ---------
Ethernet 2                Microsoft Hyper-V Network Adapter #2          8 Up           00-0D-3A-1E-48-86        50 Gbps
error 23: could not attach program
[0]1878.2E24::04/12/2024-15:38:21.327 [xdp] EbpfExtensionProviderAttachClient:108 ---> ProviderContext=FFFFE18A4E126110
[0]1878.2E24::04/12/2024-15:38:21.327 [xdp] EbpfProgramOnClientAttach:1643 ---> AttachingProvider=FFFFE18A4E126110 AttachingClient=FFFFE18A42943480
[0]1878.2E24::04/12/2024-15:38:21.327 [rtl] XdpRegQueryDwordValue:65 KeyName=\REGISTRY\MACHINE\SYSTEM\ControlSet001\Services\xdp\Parameters ValueName=XdpEbpfMode Value=0 Status=0xc0000034(STATUS_OBJECT_NAME_NOT_FOUND)
[0]1878.2E24::04/12/2024-15:38:21.327 [xdp] XdpProgramCreate:1439 ---> IfIndex=9 Hook={XDP_HOOK_L2, XDP_HOOK_RX, XDP_HOOK_INSPECT} QueueId=0 Flags=4
[0]1878.2E24::04/12/2024-15:38:21.327 [xdp] XdpProgramCreate:1527 ProgramObject=0000000000000000 IfIndex=9 Hook={XDP_HOOK_L2, XDP_HOOK_RX, XDP_HOOK_INSPECT} QueueId=0 Flags=4 Status=0xc0000225(STATUS_NOT_FOUND)
[0]1878.2E24::04/12/2024-15:38:21.327 [xdp] XdpProgramCreate:1533 <--- 0xc0000225(STATUS_NOT_FOUND)
[0]1878.2E24::04/12/2024-15:38:21.327 [xdp] EbpfProgramOnClientAttach:1701 <--- 0xc0000225(STATUS_NOT_FOUND)
[0]1878.2E24::04/12/2024-15:38:21.327 [xdp] EbpfProgramOnClientAttach:1701 <--- 0xc0000225(STATUS_NOT_FOUND)
[0]1878.2E24::04/12/2024-15:38:21.327 [xdp] EbpfExtensionProviderAttachClient:151 ProviderContext=FFFFE18A4E126110 ProviderBindingContext=0000000000000000
[0]1878.2E24::04/12/2024-15:38:21.327 [xdp] EbpfExtensionProviderAttachClient:154 <--- 0xc00002b9(STATUS_NOINTERFACE)

Something doesn't match here.

@Alan-Jowett
Copy link
Member Author

Resolved. @mtfriesen pointed out there was a typo.

@Alan-Jowett
Copy link
Member Author

BPF program is returning 0 instead of XDP_PASS, which causes XDP to drop the packets.

Alan Jowett added 5 commits April 14, 2024 18:55
Signed-off-by: Alan Jowett <[email protected]>
Signed-off-by: Alan Jowett <[email protected]>
@Alan-Jowett Alan-Jowett merged commit 5c0b541 into microsoft:main Apr 15, 2024
7 checks passed
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.

1 participant