microsoft / ebpf-for-windows-demo Goto Github PK
View Code? Open in Web Editor NEWThis repository contains the demo material built on top of ebpf-for-windows platform.
License: MIT License
This repository contains the demo material built on top of ebpf-for-windows platform.
License: MIT License
Currently due to cyclic dependencies, the test step in this repo (which verifies the program) is disabled.
This should be enabled back when next version of eBPF-for-Windows is released which has support for LIBBPF_PIN_BY_NAME.
Currently this repo adds ebpf-for-windows
repo as a submodule. This issue is to
Reference usage:
l3af-project/eBPF-Package-Repository#17
ebpf-for-windows-demo.sln
should also generate "test" .o files for both SNAT and DSR scenario, which can be used for testing / verification purpose.
We should add at least minimal CI/CD tests to prevent regressions
This project should switch to building with VS2022.
https://github.com/microsoft/ebpf-for-windows-demo/actions/runs/4106692282
Missing the restore packages step.
In multiple locations the same map is being used irrespective of ipv4 condition (both then/else blocks map to same map name).
It looks like LB6_SERVICES_MAP_V2 map should be used in the “else” path.
Line with the issue:
const char* map_name = ipv4 ? LB4_SERVICES_MAP_V2 : LB4_SERVICES_MAP_V2;
Request: Add a CICD test that can test the loading of the eBPF programs, to ensure this does not regress in the future.
Currently, the user has to manually ensure loading of eBPF programs works.
when i run .\conn_tracker.exe. I got error
Press Ctrl-C to shutdown
bpf_object__load for conn_track.sys failed: 0
what‘s mean 0
So updates to the ebpf-for-windows repo will result in a PR against the demo project that verifies the demo still builds.
The demo repo needs Catch2. Instead of adding Catch2 as submodule, use Catch2 from ebpf-for-windows submdule
reference page: https://github.com/microsoft/ebpf-for-windows-demo/blob/main/connection_tracker/README.md
Running: cd out && powershell -NonInteractive -ExecutionPolicy Unrestricted %EBPF_ROOT%\bin\Convert-BpfToNative.ps1 -ProgramName conn_track.o
Fails with: Project "C:\Users\User\repos\ebpf-for-windows-demo\connection_tracker\bpf\out\conn_track.vcxproj" on
node 1 (default targets).
C:\Users\User\repos\ebpf-for-windows-demo\connection_tracker\bpf\out\conn_track.vcxproj(1,2134): erro
r MSB4019: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBui
ld\Microsoft\VC\v170\Microsoft.Cpp.Default.props" was not found. Confirm that the expression in the I
mport declaration "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\V
C\v170\Microsoft.Cpp.Default.props" is correct, and that the file exists on disk.
Done Building Project "C:\Users\User\repos\ebpf-for-windows-demo\connection_tracker\bpf\out\conn_trac
k.vcxproj" (default targets) -- FAILED.
The path: C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\V
C\v170\Microsoft.Cpp.Default.props
does not exist.
Also, I searched for Microsoft.Cpp.Default.props
which also does not exist on the disk.
How to proceed?
It looks like after moving to nuget package, the XDP demo does not work on the final test setup. Compilation of Cilium XDP program fails due to
vbpf/ebpf-verifier#427 causes bpf_printk to be unusable. Until this is fixed the bpf_printk in https://github.com/microsoft/ebpf-for-windows-demo/blob/main/connection_tracker/bpf/conn_track.c#L43 needs to be disabled.
Currently this repo uses LLVM 10.0.0. This issue is to move to a newer version.
Since Cilium verification fails on v13, this is currently blocked on the following issue:
microsoft/ebpf-for-windows#962
ebpf-for-windows-demo projects should use eBPF-For-Windows nuget version 0.3.0.
After upgrading the nuget package from 0.2.0 to 0.3.0, the project no longer builds.
What is the error "Program type not found for section name sockops"?
The build error is shown below
5>CustomBuild:
Project "F:\Git_backup\ebpf-for-windows-demo\x64\Release\conn_track_km\conn_track.vcxproj" on node 1 (default target).
DriverBuildNotifications:
Building 'conn_track_km' with toolset 'WindowsKernelModeDriver10.0' and the 'Desktop' target platform.
Using KMDF 1.15.
PrepareForBuild:
Creating the "x64\Release\" directory.
Structured output is available. The format of compiler diagnostics reflects the error hierarchy. For more information, see https://aka.ms/cpp/structured-output.
Creating the directory "x64\Release\conn_track_km.tlog\".
InitializeBuildStatus:
Creating "x64\Release\conn_track_km.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
Connecting (touching) to "x64\Release\conn_track_km.tlog\unsuccessfulbuild".
PreBuildEvent:
F:\Git_backup\ebpf-for-windows-demo\packages\eBPF-for-Windows.0.11.0\build\native\bin\bpf2c --bpf conn_track
.o --sys conn_track_driver.c
:VCEnd
6>Link:
All 369 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
You have generated code.
5>CustomBuild:
Program type not found for section name sockops
5>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets
(156,5): error MSB3073: "F:\Git_backup\ebpf-for-windows-demo\packages\eBPF-for-Windows.0.11.0\build\native\bin\b
pf2c --bpf conn_track.o --sys conn_track_driver.c [F:\Git_backup\ebpf-for-windows-demo\x64\Release\conn_track_
km\conn_track.vcxproj] [F:\Git_backup\ebpf-for-windows-demo\connection_tracker\bpf\bpf.vcxproj]
5>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets
(156,5): error MSB3073: :VCEnd" command terminated (code: 1). [F:\Git_backup\ebpf-for-windows-demo\x64\Release\conn_track_
km\conn_track.vcxproj] [F:\Git_backup\ebpf-for-windows-demo\connection_tracker\bpf\bpf.vcxproj]
Built the project "F:\Git_backup\ebpf-for-windows-demo\x64\Release\conn_track_km\conn_track.vcxproj" (default target). - failure
Build failed.
"F:\Git_backup\ebpf-for-windows-demo\x64\Release\conn_track_km\conn_track.vcxproj" (default target)(1)->
(PreBuildEvent target) ->
5>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets
(156,5): error MSB3073: "F:\Git_backup\ebpf-for-windows-demo\packages\eBPF-for-Windows.0.11.0\build\native\bin\b
pf2c --bpf conn_track.o --sys conn_track_driver.c [F:\Git_backup\ebpf-for-windows-demo\x64\Release\conn_track_
km\conn_track.vcxproj] [F:\Git_backup\ebpf-for-windows-demo\connection_tracker\bpf\bpf.vcxproj]
5>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets
(156,5): error MSB3073: :VCEnd" command terminated (code: 1). [F:\Git_backup\ebpf-for-windows-demo\x64\Release\conn_track_
km\conn_track.vcxproj] [F:\Git_backup\ebpf-for-windows-demo\connection_tracker\bpf\bpf.vcxproj]
0 warnings
1 error
The build environment is as follows.
sdk & wdk information
Updating and downgrading to the latest version of the eBPF-for-Windows nuget package does not change the error.
bpf_xdp.c (a standalone Load balance) in cilium/bpf/
bpf_xdp.c was written 2 years back.
This issue is created to bring
after going through https://github.com/microsoft/ebpf-for-windows-demo/blob/main/connection_tracker/README.md#demo-steps on a windows 11 machine with eBFP-for-windows (v0.4.0) installed I get:
PS C:\Users\User\ebpf-for-windows-demo\x64\Release> .\conn_tracker.exe
Press Ctrl-C to shutdown
bpf_object__load for conn_track.sys failed: 9
https://github.com/microsoft/ebpf-for-windows-demo/actions/runs/4106279517/jobs/7084298668
The "Restore NuGet packages for ebpf-for-windows-demo" step gives
WARNING: Project file D:\a\ebpf-for-windows-demo\ebpf-for-windows-demo\external\Catch2\build\src\Catch2WithMain.vcxproj cannot be found.
WARNING: Project file D:\a\ebpf-for-windows-demo\ebpf-for-windows-demo\external\Catch2\build\src\Catch2.vcxproj cannot be found.
because the "Create catch2 project for ebpf-for-windows-demo" step comes after it.
The order should be swapped to get rid of the warnings.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.