* Update test scripts
* Make KM runner execute bpftool tests
* Make the run_tests.bat script also execute bpftool tests
* Make deploy-ebpf.ps1 -t copy all files needed for testing
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Fix test
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Fix merge error
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
Co-authored-by: saxena-anurag <43585259+saxena-anurag@users.noreply.github.com>
* Add initial bpftool tests and another libbpf test
And fix various bugs hit by the tests.
This PR only adds a couple of initial tests.
A future PR will add many more tests.
bpftool_tests.exe is meant to be run on a machine with the drivers
installed. A future PR will add it to the KM test runner in CI/CD.
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Fix release build
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Fix test
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Fix test
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Send stderr to bpf2c_tests log
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Update expected bpf2c output for map.o
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Fix bpf2c map output
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
Co-authored-by: Alan Jowett <alanjo@microsoft.com>
Co-authored-by: saxena-anurag <43585259+saxena-anurag@users.noreply.github.com>
* Fix reply id/length on failure in KM
And make UM and KM more closely follow the same logic to catch this sort
of bug in the future. Before this, UM would succeed and KM would fail,
and there were only UM tests for this case.
Fixes#946
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Fix device_helper.hpp
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Fix reply length
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Cleanup
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* PR feedback
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
Co-authored-by: Alan Jowett <alanjo@microsoft.com>
* Gather code coverage from within self-hosted runner
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
* PR feedback
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
* remove dependabot from the fork.
* Revert "remove dependabot from the fork."
This reverts commit c542c6cd44.
* Program info and hook NPI providers for sock_addr.
* Program info and hook NPI providers for sock_addr.
* PR Feedback.
* PR Feedback 2.
* wfp callout for sock_addr hook.
* PR Feedback.
* fix build break.
* Initial version of bpf_printk support
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Convert printk.c sample to use bind hook instead of xdp hook
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Add wprp file to deployment script
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Unify UM and KM platforms as much as possible for printk support
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Fix annotation
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Work around compiler warning
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Fix comment
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Fix keyword
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Fix test when -s is used
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* fix crash.
* use NMR APIs.
* program info provider; bind program info
rename attach provider as hook provider
function renaming
* refactor hook providers.
* async client detach.
* cicd automation and documentation.
* PR Feedback.
* switch to server 2019.
Co-authored-by: Dave Thaler <dthaler@microsoft.com>
Co-authored-by: Alan Jowett <alanjo@microsoft.com>
* Fix non-determinism in build due to multiple projects generating header
* Only regenerate git_commit_id.h on change
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
* Update Getting Started to recommend current release version of Clang/LLVM
Clang-format behaves differently depending on the version of Clang installed.
Update getting started guide to recommend Clang / LLVM 10.0.0.
Update the development guide to indicate that Clang 10 or higher is required for consistent formatting.
Reformat all code using Clang 10.0.0
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
* Test Extension Part 2
* rename test extension to sample extension and update Getting-started doc.
Co-authored-by: Dave Thaler <dthaler@microsoft.com>
* Create an install script rather than having to manually do lots
of steps
* Make Debug build use vcruntime as static libs to avoid adding
another prerequisite on a machine before installing eBPF. This
isn't required for Release builds as vcruntime release DLLs
are part of Windows, unlike vcruntime debug DLLs
Fixes#248
Signed-off-by: Dave Thaler <dthaler@ntdev.microsoft.com>
* First draft of code to serialize EBPF program info
* Add code to encode program information from extension
Signed-off-by: Alan Jowett <alanjo@microsoft.com>