Граф коммитов

20 Коммитов

Автор SHA1 Сообщение Дата
Gianni Trevisiol a0aa7c5aba
Update manual deploy process. (#3380)
* draft

* wip

* tested

* cli doc

* nit

---------

Co-authored-by: Dave Thaler <dthaler1968@gmail.com>
2024-03-28 07:50:02 +00:00
Dhiren Vispute ed0435b130
Add support for in-memory etl traces (#2946)
Co-authored-by: Dhiren Vispute <Dhiren.Vispute@microsoft.com>
2023-10-26 19:01:46 +00:00
Sharmi 5cc488fb08
Increase MAX_TAIL_CALL_CNT to 33 tail calls (#2826)
* Initial Commit

* Added tail call max exceed native test case

* Initial commit

* Initial commit

* Added bpf2c_tests/expected changed files

* Fixed the return value in bind_tailcall_max_native_test

* Addressed PR comments

* Update tests/unit/libbpf_test.cpp

Co-authored-by: Dave Thaler <dthaler@microsoft.com>

* Update tests/unit/libbpf_test.cpp

Co-authored-by: Dave Thaler <dthaler@microsoft.com>

* tests/unit/libbpf_test.cpp

* Moved MAX_TAIL_CALL_CNT to ebpf_structs.h as suggested

* Removed MAX_TAIL_CALL_CNT in api_test and stress_tests_km file

* Add the generated expected file for tail_call_max_exceed

* Removed MAX_TAIL_CALL_CNT from bpf_helpers.h

---------

Co-authored-by: Dave Thaler <dthaler@microsoft.com>
2023-09-11 16:55:56 +00:00
Dave Thaler c947ca63b9
Make runtime binaries not depend on usersim (#2783)
* build ebpfcore under usersim

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Work around analysis warnings

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Fix installer project

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Temporarily use ubpf branch with memory fix

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* WIP

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* WIP

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Create project for files shared between ebpfapi and the ebpf runtime

Move existing files from libs/platform either to:
* libs/shared, if meant to be common between user-mode and ebpf runtime
* libs/runtime, if meant to be used by the ebpf runtime only (whether in
  user or kernel mode)

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Move ebpf_tracelog.c to shared

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Create shared_user and shared_kernel projects

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* WIP

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* WIP

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Remove usersim from ebpfsvc

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Update to cxplat branch of usersim

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Use cxplat_utf8_string

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Cleanup

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Fix build errors

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Fix ebpf_allocate_with_tag

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Fixes

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Bug fixes

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Fix use of ebpf_reallocate to not pass a null pointer

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Fix printf tests

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Fix memory leaks

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Temporary change to help debug double-free in test

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Update to latest usersim

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Fix analysis warnings

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Update to latest usersim

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Update usersim to latest

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Change native module to use latest usersim

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Update nuget package

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Only call cxplat_cleanup if cxplat_initialize succeeds

Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>

* Revert setup_build.vcxproj change

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Update usersim to latest

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

---------

Signed-off-by: Dave Thaler <dthaler@microsoft.com>
Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>
Co-authored-by: Alan Jowett <alan.jowett@microsoft.com>
2023-09-05 17:57:21 +00:00
Dave Thaler 4e6bed34e8
Build ebpfcore as a DLL for testing (#2744)
* Update to use latest usersim

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* build ebpfcore under usersim

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Update usersim to latest

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Fix compilation

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Work around analysis warnings

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Fix installer project

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Fix memory issues in libbpf implementation

Found my latest usersim code

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Update usersim to latest

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Fix mismatched calloc/free function in ubpf_user.c

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Fix mismatched alloc/free in verifier_fuzzer

The verifier_fuzzer used ebpf_allocate() but then called free()

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Temporarily use ubpf branch with memory fix

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Fix memory issues in ebpfsvc

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* PR feedback from Anurag

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

---------

Signed-off-by: Dave Thaler <dthaler@microsoft.com>
2023-08-17 22:55:15 +00:00
Dave Thaler 47590e4bb3
Fix deploy-ebpf script (#2757)
Fix usage text
Fix duplicate -t options

Signed-off-by: Dave Thaler <dthaler@microsoft.com>
2023-08-17 17:29:20 +00:00
Igor Klemenski 77191a8632
Use multiple self-hosted runner instances. (#2722)
* first try runners

* optimize json schema

* remove refs to vm_list.json

* comment out most of pipeline for final testing in prod

* try fixing appverifier double close on handle

* add native-only vcxproj configs for tcp_udp_listener.exe

* add missing vcxproj parts

* fix active config for tcp_udp_listener in ebpf .sln

* uncomment CI after successful run on all runners

* do staged migration

* fix up labels

---------

Co-authored-by: Igor Klemenski <igklemen@microsoft.com>
2023-08-02 22:04:42 +00:00
Dave Thaler a29064a1fe
Convert usersim to a DLL (#2683)
* Use usersim as DLL

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Convert usersim to a DLL

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Make cmake build clear program info state like VS build does

PR #1192 updated the vcxproj file but not the corresponding CMakeLists.txt file
for export_program_info

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Pick up latest usersim fix

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Fix deadlock in epoch_test_stale_items test

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Don't throw exceptions in unit tests

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Fix single instance hook initialization in test cases

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Fix deadlock in performance test

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Add usersim.dll to installer files

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

---------

Signed-off-by: Dave Thaler <dthaler@microsoft.com>
2023-07-27 18:36:05 +00:00
Dave Thaler 8fecc2e376
Make bpf2c maps parser match verifier's maps parser (#2543)
* Add map_in_map_legacy.c

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Make bpf2c maps parser match verifier's maps parser

The verifier will parse "maps/*" sections, and is able to deal with
maps sections with various record sizes.  This PR updates bpf2c to
use the same algorithm.  In the future it would be good to refactor
the verifier so the same code can be used.

Fixes #900

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Make tests pass

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* PR feedback

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Rename map_in_map_* samples

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Fix BTF ID resolution

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* PR feedback

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Cleanup

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Bug fixes

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Add doc fix

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Update verifier

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Updates for libbtf

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Use libbtf

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Fix sanitize build by using updated libbtf

Temporarily point to fork until https://github.com/vbpf/ebpf-verifier/pull/515
is merged, so we can verify the fix in CI/CD.

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Update ebpf-verifier

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* PR feedback

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

---------

Signed-off-by: Dave Thaler <dthaler@microsoft.com>
2023-06-28 18:32:13 +00:00
Gianni Trevisiol 020cdad9b8
Add VC++ Debug redist deployment to `deploy-ebpf.ps1`. (#2613)
* Add VC++ Debug redist deployment.

* wip

* Update doc.

* indent

* adjust $null checks in all PS scripts

* fix
2023-06-24 01:47:59 +00:00
Dave Thaler 87b6520c34
Remove JIT and interpreter code from NativeOnly builds (#2475)
* Remove JIT and interpreter code from NativeOnly builds

Fixes #2030
Fixes #2488

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Try conditional project references

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Various test fixes

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Native-only fixes to deploy-ebpf.ps1

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Native-only support for setup-ebpf.ps1

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Native-only support for api_test.exe

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* Add connect_redirect_tests to deploy-ebpf.ps1

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

* PR feedback from Anurag

Signed-off-by: Dave Thaler <dthaler@microsoft.com>

---------

Signed-off-by: Dave Thaler <dthaler@microsoft.com>
2023-06-07 15:49:03 +00:00
Sharmi 8adab0de10
stress test for tail calls (#2518)
* Add stress test for tail calls

* Added the code generated bindmonitor_mt_tailcall files

* Added the test case description to readme.md

* Update tests/stress/km/stress_tests_km.cpp

Co-authored-by: Dave Thaler <dthaler@microsoft.com>

* Update tests/stress/km/stress_tests_km.cpp

Co-authored-by: Dave Thaler <dthaler@microsoft.com>

* Addressed PR comments and Fixed merge conflicts with latest

* Fixed function name

* Regenerated the expected files, after the macro MAX TAIL CNT change done yesterday

* Update tests/stress/readme.md

Co-authored-by: Dave Thaler <dthaler@microsoft.com>

* Removed clean_up tail call

* Add bind in loop

* updated the readme

* Addressed PR comments

* Changed LOG_VERBOSE to LOG_ERROR

* Updated readme and addressed PR comment

---------

Co-authored-by: Dave Thaler <dthaler@microsoft.com>
2023-06-07 05:21:47 +00:00
Dhiren Vispute c0e0804456
Ensure non-zero helper function count before using it in allocation computations. (#2393) 2023-05-02 00:50:34 +00:00
Dhiren Vispute 83567d6270
Add Multi-threaded stress tests (kernel mode). (#2240) 2023-04-25 21:00:44 +00:00
Sharmi 7ca6c13da1
Initial commit (#2286) 2023-04-07 00:12:44 +00:00
Sharmi 282134fc34
Added cgroup_sock_addr2 related files to deploy-ebpf and Product.wxs script (#2193)
* Added cgroup_sock_addr2 related files to deploy script

* Added bpf2c_tests in wixproj file
2023-03-15 23:48:01 +00:00
Gianni Trevisiol 5f4a933f43
Complement artifacts in msi testing feature & PS deploy script's input. (#2088)
* Add testing artifacts, doc tweaks

* doc mods

* Add missing artifacts in deployment script.

* wip

* doc update

* Update docs/InstallEbpf.md

Co-authored-by: Dave Thaler <dthaler@microsoft.com>

---------

Co-authored-by: Alan Jowett <alanjo@microsoft.com>
Co-authored-by: Dave Thaler <dthaler@microsoft.com>
2023-02-22 01:34:44 +00:00
Michael Friesen c556b4dfae
Add support for deploying eBPF to arbitrary filesystem locations (#1995)
* add support for deploying ebpf to arbitrary filesystem locations

* fix typo

* add documentation

* fix coding style
2023-02-01 15:13:25 -08:00
Alan Jowett f593ba0a62
Fix script to use provide VM name (#1482)
Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>

Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>
Co-authored-by: Alan Jowett <alan.jowett@microsoft.com>
Co-authored-by: Dave Thaler <dthaler@microsoft.com>
2022-10-24 14:35:41 -07:00
Alan Jowett 6380f7961b
Update version number as part of build (#1373)
Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>

Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>
Co-authored-by: Alan Jowett <alan.jowett@microsoft.com>
Co-authored-by: saxena-anurag <43585259+saxena-anurag@users.noreply.github.com>
Co-authored-by: Dave Thaler <dthaler@microsoft.com>
2022-09-28 10:07:57 -07:00