Skip to content

Commit

Permalink
Merge branch 'main' into origin/remove-extra-catch2
Browse files Browse the repository at this point in the history
  • Loading branch information
agarwalishita authored Nov 3, 2024
2 parents 03db335 + c26e4a0 commit adfc552
Show file tree
Hide file tree
Showing 9 changed files with 217 additions and 109 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[submodule "external/ebpf-verifier"]
path = external/ebpf-verifier
url = https://github.com/dthaler/ebpf-verifier.git
url = https://github.com/vbpf/ebpf-verifier.git
[submodule "external/ubpf"]
path = external/ubpf
url = https://github.com/iovisor/ubpf.git
Expand Down
109 changes: 30 additions & 79 deletions ebpf-for-windows.sln
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ebpfverifier", "external\ebpf-verifier\build\ebpfverifier.vcxproj", "{7D5B4E68-C0FA-3F86-9405-F6400219B440}"
ProjectSection(ProjectDependencies) = postProject
{231EE32B-EBA4-4FE5-A55B-DB18F539D403} = {231EE32B-EBA4-4FE5-A55B-DB18F539D403}
{98D56B8A-D8EB-3D98-B8EE-C83696B4D58A} = {98D56B8A-D8EB-3D98-B8EE-C83696B4D58A}
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "libs", "libs", "{B02E60AE-1254-459C-8824-AC6CDB6AE52E}"
Expand Down Expand Up @@ -180,11 +179,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bpftool", "tools\bpftool\bp
{231EE32B-EBA4-4FE5-A55B-DB18F539D403} = {231EE32B-EBA4-4FE5-A55B-DB18F539D403}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "yaml-cpp", "external\ebpf-verifier\build\yaml-cpp.vcxproj", "{98D56B8A-D8EB-3D98-B8EE-C83696B4D58A}"
ProjectSection(ProjectDependencies) = postProject
{231EE32B-EBA4-4FE5-A55B-DB18F539D403} = {231EE32B-EBA4-4FE5-A55B-DB18F539D403}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bpf2c", "tools\bpf2c\bpf2c.vcxproj", "{69B97E52-18DC-434E-A6E4-4C0F3E88C44A}"
ProjectSection(ProjectDependencies) = postProject
{231EE32B-EBA4-4FE5-A55B-DB18F539D403} = {231EE32B-EBA4-4FE5-A55B-DB18F539D403}
Expand Down Expand Up @@ -330,7 +324,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "usersim", "external\usersim
{231EE32B-EBA4-4FE5-A55B-DB18F539D403} = {231EE32B-EBA4-4FE5-A55B-DB18F539D403}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbtf", "external\ebpf-verifier\build\external\libbtf\libbtf\libbtf.vcxproj", "{9FD0723C-6979-3D32-8D17-6CECA34B7026}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbtf", "external\ebpf-verifier\build\external\libbtf\libbtf\libbtf.vcxproj", "{249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5}"
ProjectSection(ProjectDependencies) = postProject
{231EE32B-EBA4-4FE5-A55B-DB18F539D403} = {231EE32B-EBA4-4FE5-A55B-DB18F539D403}
EndProjectSection
Expand Down Expand Up @@ -663,8 +657,6 @@ Global
{21236F4F-341C-454F-B55B-C653897AB3E8}.NativeOnlyDebug|ARM64.ActiveCfg = Debug|ARM64
{21236F4F-341C-454F-B55B-C653897AB3E8}.NativeOnlyDebug|ARM64.Build.0 = Debug|ARM64
{21236F4F-341C-454F-B55B-C653897AB3E8}.NativeOnlyDebug|x64.ActiveCfg = Debug|x64
{21236F4F-341C-454F-B55B-C653897AB3E8}.NativeOnlyDebug|x86.ActiveCfg = Debug|Win32
{21236F4F-341C-454F-B55B-C653897AB3E8}.NativeOnlyDebug|x86.Build.0 = Debug|Win32
{21236F4F-341C-454F-B55B-C653897AB3E8}.NativeOnlyRelease|ARM64.ActiveCfg = Debug|x64
{21236F4F-341C-454F-B55B-C653897AB3E8}.NativeOnlyRelease|x64.ActiveCfg = Release|x64
{21236F4F-341C-454F-B55B-C653897AB3E8}.Release|ARM64.ActiveCfg = Release|ARM64
Expand Down Expand Up @@ -1263,34 +1255,6 @@ Global
{CA179B38-EBF5-4371-B830-73486E35250B}.RelWithDebInfo|ARM64.Build.0 = Release|ARM64
{CA179B38-EBF5-4371-B830-73486E35250B}.RelWithDebInfo|x64.ActiveCfg = Release|x64
{CA179B38-EBF5-4371-B830-73486E35250B}.RelWithDebInfo|x64.Build.0 = Release|x64
{98D56B8A-D8EB-3D98-B8EE-C83696B4D58A}.Debug|ARM64.ActiveCfg = Debug|ARM64
{98D56B8A-D8EB-3D98-B8EE-C83696B4D58A}.Debug|ARM64.Build.0 = Debug|ARM64
{98D56B8A-D8EB-3D98-B8EE-C83696B4D58A}.Debug|x64.ActiveCfg = Debug|x64
{98D56B8A-D8EB-3D98-B8EE-C83696B4D58A}.Debug|x64.Build.0 = Debug|x64
{98D56B8A-D8EB-3D98-B8EE-C83696B4D58A}.FuzzerDebug|ARM64.ActiveCfg = Debug|ARM64
{98D56B8A-D8EB-3D98-B8EE-C83696B4D58A}.FuzzerDebug|ARM64.Build.0 = Debug|ARM64
{98D56B8A-D8EB-3D98-B8EE-C83696B4D58A}.FuzzerDebug|x64.ActiveCfg = Debug|x64
{98D56B8A-D8EB-3D98-B8EE-C83696B4D58A}.FuzzerDebug|x64.Build.0 = Debug|x64
{98D56B8A-D8EB-3D98-B8EE-C83696B4D58A}.MinSizeRel|ARM64.ActiveCfg = MinSizeRel|ARM64
{98D56B8A-D8EB-3D98-B8EE-C83696B4D58A}.MinSizeRel|ARM64.Build.0 = MinSizeRel|ARM64
{98D56B8A-D8EB-3D98-B8EE-C83696B4D58A}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64
{98D56B8A-D8EB-3D98-B8EE-C83696B4D58A}.MinSizeRel|x64.Build.0 = MinSizeRel|x64
{98D56B8A-D8EB-3D98-B8EE-C83696B4D58A}.NativeOnlyDebug|ARM64.ActiveCfg = Debug|ARM64
{98D56B8A-D8EB-3D98-B8EE-C83696B4D58A}.NativeOnlyDebug|ARM64.Build.0 = Debug|ARM64
{98D56B8A-D8EB-3D98-B8EE-C83696B4D58A}.NativeOnlyDebug|x64.ActiveCfg = Debug|x64
{98D56B8A-D8EB-3D98-B8EE-C83696B4D58A}.NativeOnlyDebug|x64.Build.0 = Debug|x64
{98D56B8A-D8EB-3D98-B8EE-C83696B4D58A}.NativeOnlyRelease|ARM64.ActiveCfg = Release|ARM64
{98D56B8A-D8EB-3D98-B8EE-C83696B4D58A}.NativeOnlyRelease|ARM64.Build.0 = Release|ARM64
{98D56B8A-D8EB-3D98-B8EE-C83696B4D58A}.NativeOnlyRelease|x64.ActiveCfg = Release|x64
{98D56B8A-D8EB-3D98-B8EE-C83696B4D58A}.NativeOnlyRelease|x64.Build.0 = Release|x64
{98D56B8A-D8EB-3D98-B8EE-C83696B4D58A}.Release|ARM64.ActiveCfg = Release|ARM64
{98D56B8A-D8EB-3D98-B8EE-C83696B4D58A}.Release|ARM64.Build.0 = Release|ARM64
{98D56B8A-D8EB-3D98-B8EE-C83696B4D58A}.Release|x64.ActiveCfg = Release|x64
{98D56B8A-D8EB-3D98-B8EE-C83696B4D58A}.Release|x64.Build.0 = Release|x64
{98D56B8A-D8EB-3D98-B8EE-C83696B4D58A}.RelWithDebInfo|ARM64.ActiveCfg = RelWithDebInfo|ARM64
{98D56B8A-D8EB-3D98-B8EE-C83696B4D58A}.RelWithDebInfo|ARM64.Build.0 = RelWithDebInfo|ARM64
{98D56B8A-D8EB-3D98-B8EE-C83696B4D58A}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
{98D56B8A-D8EB-3D98-B8EE-C83696B4D58A}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
{69B97E52-18DC-434E-A6E4-4C0F3E88C44A}.Debug|ARM64.ActiveCfg = Debug|ARM64
{69B97E52-18DC-434E-A6E4-4C0F3E88C44A}.Debug|ARM64.Build.0 = Debug|ARM64
{69B97E52-18DC-434E-A6E4-4C0F3E88C44A}.Debug|x64.ActiveCfg = Debug|x64
Expand Down Expand Up @@ -1466,13 +1430,9 @@ Global
{8DD6577A-CBBE-43FE-9FC3-E42CB013CC60}.NativeOnlyDebug|ARM64.ActiveCfg = Debug|ARM64
{8DD6577A-CBBE-43FE-9FC3-E42CB013CC60}.NativeOnlyDebug|ARM64.Build.0 = Debug|ARM64
{8DD6577A-CBBE-43FE-9FC3-E42CB013CC60}.NativeOnlyDebug|x64.ActiveCfg = Debug|x64
{8DD6577A-CBBE-43FE-9FC3-E42CB013CC60}.NativeOnlyDebug|x86.ActiveCfg = Debug|Win32
{8DD6577A-CBBE-43FE-9FC3-E42CB013CC60}.NativeOnlyDebug|x86.Build.0 = Debug|Win32
{8DD6577A-CBBE-43FE-9FC3-E42CB013CC60}.NativeOnlyRelease|ARM64.ActiveCfg = Release|x64
{8DD6577A-CBBE-43FE-9FC3-E42CB013CC60}.NativeOnlyRelease|ARM64.Build.0 = Release|x64
{8DD6577A-CBBE-43FE-9FC3-E42CB013CC60}.NativeOnlyRelease|x64.ActiveCfg = Release|x64
{8DD6577A-CBBE-43FE-9FC3-E42CB013CC60}.NativeOnlyRelease|x86.ActiveCfg = Debug|Win32
{8DD6577A-CBBE-43FE-9FC3-E42CB013CC60}.NativeOnlyRelease|x86.Build.0 = Debug|Win32
{8DD6577A-CBBE-43FE-9FC3-E42CB013CC60}.Release|ARM64.ActiveCfg = Release|x64
{8DD6577A-CBBE-43FE-9FC3-E42CB013CC60}.Release|ARM64.Build.0 = Release|x64
{8DD6577A-CBBE-43FE-9FC3-E42CB013CC60}.Release|x64.ActiveCfg = Release|x64
Expand Down Expand Up @@ -1708,13 +1668,9 @@ Global
{F106D38A-AC35-4B5A-AEEE-7235E4915A72}.NativeOnlyDebug|ARM64.ActiveCfg = Debug|ARM64
{F106D38A-AC35-4B5A-AEEE-7235E4915A72}.NativeOnlyDebug|ARM64.Build.0 = Debug|ARM64
{F106D38A-AC35-4B5A-AEEE-7235E4915A72}.NativeOnlyDebug|x64.ActiveCfg = Debug|x64
{F106D38A-AC35-4B5A-AEEE-7235E4915A72}.NativeOnlyDebug|x86.ActiveCfg = Debug|Win32
{F106D38A-AC35-4B5A-AEEE-7235E4915A72}.NativeOnlyDebug|x86.Build.0 = Debug|Win32
{F106D38A-AC35-4B5A-AEEE-7235E4915A72}.NativeOnlyRelease|ARM64.ActiveCfg = Release|x64
{F106D38A-AC35-4B5A-AEEE-7235E4915A72}.NativeOnlyRelease|ARM64.Build.0 = Release|x64
{F106D38A-AC35-4B5A-AEEE-7235E4915A72}.NativeOnlyRelease|x64.ActiveCfg = Release|x64
{F106D38A-AC35-4B5A-AEEE-7235E4915A72}.NativeOnlyRelease|x86.ActiveCfg = Debug|Win32
{F106D38A-AC35-4B5A-AEEE-7235E4915A72}.NativeOnlyRelease|x86.Build.0 = Debug|Win32
{F106D38A-AC35-4B5A-AEEE-7235E4915A72}.Release|ARM64.ActiveCfg = Release|x64
{F106D38A-AC35-4B5A-AEEE-7235E4915A72}.Release|ARM64.Build.0 = Release|x64
{F106D38A-AC35-4B5A-AEEE-7235E4915A72}.Release|x64.ActiveCfg = Release|x64
Expand Down Expand Up @@ -1764,13 +1720,9 @@ Global
{E619B985-44B3-4292-A585-5CD0C4315ED3}.NativeOnlyDebug|ARM64.ActiveCfg = Debug|ARM64
{E619B985-44B3-4292-A585-5CD0C4315ED3}.NativeOnlyDebug|ARM64.Build.0 = Debug|ARM64
{E619B985-44B3-4292-A585-5CD0C4315ED3}.NativeOnlyDebug|x64.ActiveCfg = Debug|x64
{E619B985-44B3-4292-A585-5CD0C4315ED3}.NativeOnlyDebug|x86.ActiveCfg = Debug|Win32
{E619B985-44B3-4292-A585-5CD0C4315ED3}.NativeOnlyDebug|x86.Build.0 = Debug|Win32
{E619B985-44B3-4292-A585-5CD0C4315ED3}.NativeOnlyRelease|ARM64.ActiveCfg = Release|x64
{E619B985-44B3-4292-A585-5CD0C4315ED3}.NativeOnlyRelease|ARM64.Build.0 = Release|x64
{E619B985-44B3-4292-A585-5CD0C4315ED3}.NativeOnlyRelease|x64.ActiveCfg = Release|x64
{E619B985-44B3-4292-A585-5CD0C4315ED3}.NativeOnlyRelease|x86.ActiveCfg = Debug|Win32
{E619B985-44B3-4292-A585-5CD0C4315ED3}.NativeOnlyRelease|x86.Build.0 = Debug|Win32
{E619B985-44B3-4292-A585-5CD0C4315ED3}.Release|ARM64.ActiveCfg = Release|x64
{E619B985-44B3-4292-A585-5CD0C4315ED3}.Release|ARM64.Build.0 = Release|x64
{E619B985-44B3-4292-A585-5CD0C4315ED3}.Release|x64.ActiveCfg = Release|x64
Expand Down Expand Up @@ -1971,34 +1923,34 @@ Global
{030A7AC6-14DC-45CF-AF34-891057AB1402}.RelWithDebInfo|ARM64.Build.0 = Release|ARM64
{030A7AC6-14DC-45CF-AF34-891057AB1402}.RelWithDebInfo|x64.ActiveCfg = Release|x64
{030A7AC6-14DC-45CF-AF34-891057AB1402}.RelWithDebInfo|x64.Build.0 = Release|x64
{9FD0723C-6979-3D32-8D17-6CECA34B7026}.Debug|ARM64.ActiveCfg = Debug|ARM64
{9FD0723C-6979-3D32-8D17-6CECA34B7026}.Debug|ARM64.Build.0 = Debug|ARM64
{9FD0723C-6979-3D32-8D17-6CECA34B7026}.Debug|x64.ActiveCfg = Debug|x64
{9FD0723C-6979-3D32-8D17-6CECA34B7026}.Debug|x64.Build.0 = Debug|x64
{9FD0723C-6979-3D32-8D17-6CECA34B7026}.FuzzerDebug|ARM64.ActiveCfg = FuzzerDebug|ARM64
{9FD0723C-6979-3D32-8D17-6CECA34B7026}.FuzzerDebug|ARM64.Build.0 = FuzzerDebug|ARM64
{9FD0723C-6979-3D32-8D17-6CECA34B7026}.FuzzerDebug|x64.ActiveCfg = FuzzerDebug|x64
{9FD0723C-6979-3D32-8D17-6CECA34B7026}.FuzzerDebug|x64.Build.0 = FuzzerDebug|x64
{9FD0723C-6979-3D32-8D17-6CECA34B7026}.MinSizeRel|ARM64.ActiveCfg = MinSizeRel|ARM64
{9FD0723C-6979-3D32-8D17-6CECA34B7026}.MinSizeRel|ARM64.Build.0 = MinSizeRel|ARM64
{9FD0723C-6979-3D32-8D17-6CECA34B7026}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64
{9FD0723C-6979-3D32-8D17-6CECA34B7026}.MinSizeRel|x64.Build.0 = MinSizeRel|x64
{9FD0723C-6979-3D32-8D17-6CECA34B7026}.NativeOnlyDebug|ARM64.ActiveCfg = Debug|ARM64
{9FD0723C-6979-3D32-8D17-6CECA34B7026}.NativeOnlyDebug|ARM64.Build.0 = Debug|ARM64
{9FD0723C-6979-3D32-8D17-6CECA34B7026}.NativeOnlyDebug|x64.ActiveCfg = Debug|x64
{9FD0723C-6979-3D32-8D17-6CECA34B7026}.NativeOnlyDebug|x64.Build.0 = Debug|x64
{9FD0723C-6979-3D32-8D17-6CECA34B7026}.NativeOnlyRelease|ARM64.ActiveCfg = Release|ARM64
{9FD0723C-6979-3D32-8D17-6CECA34B7026}.NativeOnlyRelease|ARM64.Build.0 = Release|ARM64
{9FD0723C-6979-3D32-8D17-6CECA34B7026}.NativeOnlyRelease|x64.ActiveCfg = Release|x64
{9FD0723C-6979-3D32-8D17-6CECA34B7026}.NativeOnlyRelease|x64.Build.0 = Release|x64
{9FD0723C-6979-3D32-8D17-6CECA34B7026}.Release|ARM64.ActiveCfg = Release|ARM64
{9FD0723C-6979-3D32-8D17-6CECA34B7026}.Release|ARM64.Build.0 = Release|ARM64
{9FD0723C-6979-3D32-8D17-6CECA34B7026}.Release|x64.ActiveCfg = Release|x64
{9FD0723C-6979-3D32-8D17-6CECA34B7026}.Release|x64.Build.0 = Release|x64
{9FD0723C-6979-3D32-8D17-6CECA34B7026}.RelWithDebInfo|ARM64.ActiveCfg = RelWithDebInfo|ARM64
{9FD0723C-6979-3D32-8D17-6CECA34B7026}.RelWithDebInfo|ARM64.Build.0 = RelWithDebInfo|ARM64
{9FD0723C-6979-3D32-8D17-6CECA34B7026}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
{9FD0723C-6979-3D32-8D17-6CECA34B7026}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
{249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5}.Debug|ARM64.ActiveCfg = Debug|ARM64
{249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5}.Debug|ARM64.Build.0 = Debug|ARM64
{249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5}.Debug|x64.ActiveCfg = Debug|x64
{249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5}.Debug|x64.Build.0 = Debug|x64
{249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5}.FuzzerDebug|ARM64.ActiveCfg = FuzzerDebug|ARM64
{249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5}.FuzzerDebug|ARM64.Build.0 = FuzzerDebug|ARM64
{249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5}.FuzzerDebug|x64.ActiveCfg = FuzzerDebug|x64
{249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5}.FuzzerDebug|x64.Build.0 = FuzzerDebug|x64
{249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5}.MinSizeRel|ARM64.ActiveCfg = MinSizeRel|ARM64
{249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5}.MinSizeRel|ARM64.Build.0 = MinSizeRel|ARM64
{249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64
{249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5}.MinSizeRel|x64.Build.0 = MinSizeRel|x64
{249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5}.NativeOnlyDebug|ARM64.ActiveCfg = Debug|ARM64
{249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5}.NativeOnlyDebug|ARM64.Build.0 = Debug|ARM64
{249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5}.NativeOnlyDebug|x64.ActiveCfg = Debug|x64
{249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5}.NativeOnlyDebug|x64.Build.0 = Debug|x64
{249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5}.NativeOnlyRelease|ARM64.ActiveCfg = Release|ARM64
{249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5}.NativeOnlyRelease|ARM64.Build.0 = Release|ARM64
{249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5}.NativeOnlyRelease|x64.ActiveCfg = Release|x64
{249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5}.NativeOnlyRelease|x64.Build.0 = Release|x64
{249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5}.Release|ARM64.ActiveCfg = Release|ARM64
{249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5}.Release|ARM64.Build.0 = Release|ARM64
{249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5}.Release|x64.ActiveCfg = Release|x64
{249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5}.Release|x64.Build.0 = Release|x64
{249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5}.RelWithDebInfo|ARM64.ActiveCfg = RelWithDebInfo|ARM64
{249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5}.RelWithDebInfo|ARM64.Build.0 = RelWithDebInfo|ARM64
{249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
{249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
{1937DB41-F3EB-4955-A636-6386DCB394F6}.Debug|ARM64.ActiveCfg = Debug|ARM64
{1937DB41-F3EB-4955-A636-6386DCB394F6}.Debug|ARM64.Build.0 = Debug|ARM64
{1937DB41-F3EB-4955-A636-6386DCB394F6}.Debug|x64.ActiveCfg = Debug|x64
Expand Down Expand Up @@ -2342,7 +2294,6 @@ Global
{724EB55A-CCFC-4662-92E3-B664CDA365E7} = {492C9B22-9237-4996-9E33-CA14D3533616}
{07DC6181-84A2-4A14-A806-5E9AF6C929C2} = {492C9B22-9237-4996-9E33-CA14D3533616}
{CA179B38-EBF5-4371-B830-73486E35250B} = {B09749EC-3D14-414B-BA9B-CD20E218DC84}
{98D56B8A-D8EB-3D98-B8EE-C83696B4D58A} = {69CDB6A1-434D-4BC9-9BFF-D12DF7EDBB6B}
{69B97E52-18DC-434E-A6E4-4C0F3E88C44A} = {B09749EC-3D14-414B-BA9B-CD20E218DC84}
{61DF9973-81B9-4006-9148-52F58259BBCF} = {492C9B22-9237-4996-9E33-CA14D3533616}
{8BD3552A-2CFB-4A59-AB15-2031B97ADA1E} = {492C9B22-9237-4996-9E33-CA14D3533616}
Expand Down Expand Up @@ -2370,7 +2321,7 @@ Global
{4F082524-9496-44FA-8CBA-4BC0BDC62568} = {492C9B22-9237-4996-9E33-CA14D3533616}
{AA933B9F-B5D8-4AA8-AC18-98FE1A161E8A} = {69CDB6A1-434D-4BC9-9BFF-D12DF7EDBB6B}
{030A7AC6-14DC-45CF-AF34-891057AB1402} = {69CDB6A1-434D-4BC9-9BFF-D12DF7EDBB6B}
{9FD0723C-6979-3D32-8D17-6CECA34B7026} = {69CDB6A1-434D-4BC9-9BFF-D12DF7EDBB6B}
{249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5} = {69CDB6A1-434D-4BC9-9BFF-D12DF7EDBB6B}
{1937DB41-F3EB-4955-A636-6386DCB394F6} = {69CDB6A1-434D-4BC9-9BFF-D12DF7EDBB6B}
{1FDAD2FD-EBD8-462A-B285-ED5174E55079} = {97D3096A-20FB-4ACB-A038-88E652FE61E3}
{9388DD45-7941-45D7-B4FF-BC00F550AF17} = {69CDB6A1-434D-4BC9-9BFF-D12DF7EDBB6B}
Expand Down
3 changes: 2 additions & 1 deletion include/linux/bpf.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ typedef struct
uint32_t key_size; ///< Size in bytes of keys.
uint32_t value_size; ///< Size in bytes of values.
uint32_t max_entries; ///< Maximum number of entries in the map.
uint32_t map_flags; ///< Flags (currently 0).
uint32_t map_flags; ///< Not supported, must be zero.
uint32_t inner_map_fd; ///< File descriptor of inner map.
} sys_bpf_map_create_attr_t;

typedef struct
Expand Down
7 changes: 6 additions & 1 deletion libs/api/bpf_syscall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,12 @@ bpf(int cmd, union bpf_attr* attr, unsigned int size)
}
case BPF_MAP_CREATE: {
ExtensibleStruct<sys_bpf_map_create_attr_t> map_create_attr((void*)attr, (size_t)size);
struct bpf_map_create_opts opts = {.map_flags = map_create_attr->map_flags};

struct bpf_map_create_opts opts = {
.inner_map_fd = map_create_attr->inner_map_fd,
.map_flags = map_create_attr->map_flags,
};

return bpf_map_create(
map_create_attr->map_type,
nullptr,
Expand Down
19 changes: 15 additions & 4 deletions libs/api/ebpf_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -601,17 +601,28 @@ _ebpf_map_lookup_element_batch_helper(
}
count_returned += entries_returned;

// Point previous_key to the last key in the batch.
previous_key = (uint8_t*)keys + (count_returned - 1) * key_size;
// Set the previous_key for the next batch.
if (find_and_delete || count_returned == 0) {
// If find_and_delete is set to true, the entries are already deleted.
// If no more entries are returned, there is no need to fetch more.
// Hence the previous_key is set to null.
previous_key = nullptr;
} else {
// Point previous_key to the last key in the batch.
previous_key = (uint8_t*)keys + (count_returned - 1) * key_size;
}

// Partial return signals last no more entries.
if (entries_returned != entries_to_fetch) {
break;
}
}

// Copy previous key into out_batch.
std::copy(previous_key, previous_key + key_size, (uint8_t*)out_batch);
memset((uint8_t*)out_batch, 0, key_size);
// Copy previous key into out_batch, if find_and_delete is false.
if (!find_and_delete && (previous_key != nullptr)) {
std::copy(previous_key, previous_key + key_size, (uint8_t*)out_batch);
}

*count = static_cast<uint32_t>(count_returned);

Expand Down
19 changes: 16 additions & 3 deletions libs/execution_context/ebpf_maps.c
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ _find_array_map_entry_with_reference(
return result;
}

ebpf_id_t *id = (ebpf_id_t*)(*data);
ebpf_id_t* id = (ebpf_id_t*)(*data);
if (id != NULL && *id == 0) {
// Turn zero ID into EBPF_OBJECT_NOT_FOUND.
*data = NULL;
Expand Down Expand Up @@ -2922,10 +2922,12 @@ ebpf_map_get_next_key_and_value_batch(

memcpy(key_and_value + output_length + key_size, next_value, value_size);

if (flags & EBPF_MAP_FIND_FLAG_DELETE) {
// If the caller requested deletion, delete the entry.
if ((flags & EBPF_MAP_FIND_FLAG_DELETE) && (previous_key != NULL)) {
// If the caller requested deletion, delete the previous entry.
result = ebpf_map_metadata_tables[map->ebpf_map_definition.type].delete_entry(map, previous_key);
if (result != EBPF_SUCCESS) {
EBPF_LOG_MESSAGE_UINT64(
EBPF_TRACELOG_LEVEL_ERROR, EBPF_TRACELOG_KEYWORD_MAP, "Failed to delete entry", result);
break;
}
}
Expand All @@ -2943,5 +2945,16 @@ ebpf_map_get_next_key_and_value_batch(

*key_and_value_length = output_length;

if ((flags & EBPF_MAP_FIND_FLAG_DELETE) && (previous_key != NULL) && (output_length != 0)) {
// If the caller requested deletion, delete the last entry.
ebpf_result_t delete_result =
ebpf_map_metadata_tables[map->ebpf_map_definition.type].delete_entry(map, previous_key);
if (delete_result != EBPF_SUCCESS) {
EBPF_LOG_MESSAGE_UINT64(
EBPF_TRACELOG_LEVEL_ERROR, EBPF_TRACELOG_KEYWORD_MAP, "Failed to delete last entry", delete_result);
result = delete_result;
}
}

return result;
}
Loading

0 comments on commit adfc552

Please sign in to comment.