Skip to content

Commit a87fe8a

Browse files
committed
Fixed Failing Tests and scripts
1 parent 949b0bd commit a87fe8a

File tree

12 files changed

+2
-572
lines changed

12 files changed

+2
-572
lines changed

ebpf-for-windows.sln

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -169,11 +169,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "performance", "tests\perfor
169169
{245F0EC7-1EBC-4D68-8B1F-F758EA9196AE} = {245F0EC7-1EBC-4D68-8B1F-F758EA9196AE}
170170
EndProjectSection
171171
EndProject
172-
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xdp_tests", "tests\xdp\xdp_tests.vcxproj", "{07DC6181-84A2-4A14-A806-5E9AF6C929C2}"
173-
ProjectSection(ProjectDependencies) = postProject
174-
{231EE32B-EBA4-4FE5-A55B-DB18F539D403} = {231EE32B-EBA4-4FE5-A55B-DB18F539D403}
175-
EndProjectSection
176-
EndProject
177172
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bpftool", "tools\bpftool\bpftool.vcxproj", "{CA179B38-EBF5-4371-B830-73486E35250B}"
178173
ProjectSection(ProjectDependencies) = postProject
179174
{231EE32B-EBA4-4FE5-A55B-DB18F539D403} = {231EE32B-EBA4-4FE5-A55B-DB18F539D403}
@@ -386,7 +381,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "onebranch", "tools\onebranc
386381
ProjectSection(ProjectDependencies) = postProject
387382
{02A1913F-7FF5-4C20-B230-2240B4EDEC10} = {02A1913F-7FF5-4C20-B230-2240B4EDEC10}
388383
{030A7AC6-14DC-45CF-AF34-891057AB1402} = {030A7AC6-14DC-45CF-AF34-891057AB1402}
389-
{07DC6181-84A2-4A14-A806-5E9AF6C929C2} = {07DC6181-84A2-4A14-A806-5E9AF6C929C2}
390384
{12161211-5463-4AA9-9B6E-552552B475DC} = {12161211-5463-4AA9-9B6E-552552B475DC}
391385
{21C137EC-9AE3-4C8C-8E74-8BFCC999D856} = {21C137EC-9AE3-4C8C-8E74-8BFCC999D856}
392386
{231EE32B-EBA4-4FE5-A55B-DB18F539D403} = {231EE32B-EBA4-4FE5-A55B-DB18F539D403}
@@ -1645,46 +1639,6 @@ Global
16451639
{724EB55A-CCFC-4662-92E3-B664CDA365E7}.RelWithDebInfo|x64.Build.0 = Release|x64
16461640
{724EB55A-CCFC-4662-92E3-B664CDA365E7}.RelWithDebInfo|x86.ActiveCfg = Release|x64
16471641
{724EB55A-CCFC-4662-92E3-B664CDA365E7}.RelWithDebInfo|x86.Build.0 = Release|x64
1648-
{07DC6181-84A2-4A14-A806-5E9AF6C929C2}.Debug|ARM64.ActiveCfg = Debug|ARM64
1649-
{07DC6181-84A2-4A14-A806-5E9AF6C929C2}.Debug|ARM64.Build.0 = Debug|ARM64
1650-
{07DC6181-84A2-4A14-A806-5E9AF6C929C2}.Debug|x64.ActiveCfg = Debug|x64
1651-
{07DC6181-84A2-4A14-A806-5E9AF6C929C2}.Debug|x64.Build.0 = Debug|x64
1652-
{07DC6181-84A2-4A14-A806-5E9AF6C929C2}.Debug|x86.ActiveCfg = Debug|x64
1653-
{07DC6181-84A2-4A14-A806-5E9AF6C929C2}.Debug|x86.Build.0 = Debug|x64
1654-
{07DC6181-84A2-4A14-A806-5E9AF6C929C2}.FuzzerDebug|ARM64.ActiveCfg = FuzzerDebug|ARM64
1655-
{07DC6181-84A2-4A14-A806-5E9AF6C929C2}.FuzzerDebug|x64.ActiveCfg = FuzzerDebug|x64
1656-
{07DC6181-84A2-4A14-A806-5E9AF6C929C2}.FuzzerDebug|x86.ActiveCfg = FuzzerDebug|x64
1657-
{07DC6181-84A2-4A14-A806-5E9AF6C929C2}.FuzzerDebug|x86.Build.0 = FuzzerDebug|x64
1658-
{07DC6181-84A2-4A14-A806-5E9AF6C929C2}.MinSizeRel|ARM64.ActiveCfg = Debug|ARM64
1659-
{07DC6181-84A2-4A14-A806-5E9AF6C929C2}.MinSizeRel|ARM64.Build.0 = Debug|ARM64
1660-
{07DC6181-84A2-4A14-A806-5E9AF6C929C2}.MinSizeRel|x64.ActiveCfg = Debug|x64
1661-
{07DC6181-84A2-4A14-A806-5E9AF6C929C2}.MinSizeRel|x64.Build.0 = Debug|x64
1662-
{07DC6181-84A2-4A14-A806-5E9AF6C929C2}.MinSizeRel|x86.ActiveCfg = Release|x64
1663-
{07DC6181-84A2-4A14-A806-5E9AF6C929C2}.MinSizeRel|x86.Build.0 = Release|x64
1664-
{07DC6181-84A2-4A14-A806-5E9AF6C929C2}.NativeOnlyDebug|ARM64.ActiveCfg = NativeOnlyDebug|ARM64
1665-
{07DC6181-84A2-4A14-A806-5E9AF6C929C2}.NativeOnlyDebug|ARM64.Build.0 = NativeOnlyDebug|ARM64
1666-
{07DC6181-84A2-4A14-A806-5E9AF6C929C2}.NativeOnlyDebug|x64.ActiveCfg = NativeOnlyDebug|x64
1667-
{07DC6181-84A2-4A14-A806-5E9AF6C929C2}.NativeOnlyDebug|x64.Build.0 = NativeOnlyDebug|x64
1668-
{07DC6181-84A2-4A14-A806-5E9AF6C929C2}.NativeOnlyDebug|x86.ActiveCfg = NativeOnlyDebug|x64
1669-
{07DC6181-84A2-4A14-A806-5E9AF6C929C2}.NativeOnlyDebug|x86.Build.0 = NativeOnlyDebug|x64
1670-
{07DC6181-84A2-4A14-A806-5E9AF6C929C2}.NativeOnlyRelease|ARM64.ActiveCfg = NativeOnlyRelease|ARM64
1671-
{07DC6181-84A2-4A14-A806-5E9AF6C929C2}.NativeOnlyRelease|ARM64.Build.0 = NativeOnlyRelease|ARM64
1672-
{07DC6181-84A2-4A14-A806-5E9AF6C929C2}.NativeOnlyRelease|x64.ActiveCfg = NativeOnlyRelease|x64
1673-
{07DC6181-84A2-4A14-A806-5E9AF6C929C2}.NativeOnlyRelease|x64.Build.0 = NativeOnlyRelease|x64
1674-
{07DC6181-84A2-4A14-A806-5E9AF6C929C2}.NativeOnlyRelease|x86.ActiveCfg = NativeOnlyRelease|x64
1675-
{07DC6181-84A2-4A14-A806-5E9AF6C929C2}.NativeOnlyRelease|x86.Build.0 = NativeOnlyRelease|x64
1676-
{07DC6181-84A2-4A14-A806-5E9AF6C929C2}.Release|ARM64.ActiveCfg = Release|ARM64
1677-
{07DC6181-84A2-4A14-A806-5E9AF6C929C2}.Release|ARM64.Build.0 = Release|ARM64
1678-
{07DC6181-84A2-4A14-A806-5E9AF6C929C2}.Release|x64.ActiveCfg = Release|x64
1679-
{07DC6181-84A2-4A14-A806-5E9AF6C929C2}.Release|x64.Build.0 = Release|x64
1680-
{07DC6181-84A2-4A14-A806-5E9AF6C929C2}.Release|x86.ActiveCfg = Release|x64
1681-
{07DC6181-84A2-4A14-A806-5E9AF6C929C2}.Release|x86.Build.0 = Release|x64
1682-
{07DC6181-84A2-4A14-A806-5E9AF6C929C2}.RelWithDebInfo|ARM64.ActiveCfg = Release|ARM64
1683-
{07DC6181-84A2-4A14-A806-5E9AF6C929C2}.RelWithDebInfo|ARM64.Build.0 = Release|ARM64
1684-
{07DC6181-84A2-4A14-A806-5E9AF6C929C2}.RelWithDebInfo|x64.ActiveCfg = Release|x64
1685-
{07DC6181-84A2-4A14-A806-5E9AF6C929C2}.RelWithDebInfo|x64.Build.0 = Release|x64
1686-
{07DC6181-84A2-4A14-A806-5E9AF6C929C2}.RelWithDebInfo|x86.ActiveCfg = Release|x64
1687-
{07DC6181-84A2-4A14-A806-5E9AF6C929C2}.RelWithDebInfo|x86.Build.0 = Release|x64
16881642
{CA179B38-EBF5-4371-B830-73486E35250B}.Debug|ARM64.ActiveCfg = Debug|ARM64
16891643
{CA179B38-EBF5-4371-B830-73486E35250B}.Debug|ARM64.Build.0 = Debug|ARM64
16901644
{CA179B38-EBF5-4371-B830-73486E35250B}.Debug|x64.ActiveCfg = Debug|x64
@@ -3498,7 +3452,6 @@ Global
34983452
{A4037E5D-B00C-4AF1-9398-76B3ECE95F62} = {492C9B22-9237-4996-9E33-CA14D3533616}
34993453
{370E7D53-C97F-4077-A3D5-620C4FD87EED} = {69CDB6A1-434D-4BC9-9BFF-D12DF7EDBB6B}
35003454
{724EB55A-CCFC-4662-92E3-B664CDA365E7} = {492C9B22-9237-4996-9E33-CA14D3533616}
3501-
{07DC6181-84A2-4A14-A806-5E9AF6C929C2} = {492C9B22-9237-4996-9E33-CA14D3533616}
35023455
{CA179B38-EBF5-4371-B830-73486E35250B} = {B09749EC-3D14-414B-BA9B-CD20E218DC84}
35033456
{69B97E52-18DC-434E-A6E4-4C0F3E88C44A} = {B09749EC-3D14-414B-BA9B-CD20E218DC84}
35043457
{61DF9973-81B9-4006-9148-52F58259BBCF} = {492C9B22-9237-4996-9E33-CA14D3533616}

netebpfext/net_ebpf_ext.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -305,12 +305,6 @@ net_ebpf_extension_get_hook_id_from_wfp_layer_id(uint16_t wfp_layer_id)
305305
net_ebpf_extension_hook_id_t hook_id = (net_ebpf_extension_hook_id_t)0;
306306

307307
switch (wfp_layer_id) {
308-
case FWPS_LAYER_OUTBOUND_MAC_FRAME_NATIVE:
309-
hook_id = EBPF_HOOK_OUTBOUND_L2;
310-
break;
311-
case FWPS_LAYER_INBOUND_MAC_FRAME_NATIVE:
312-
hook_id = EBPF_HOOK_INBOUND_L2;
313-
break;
314308
case FWPS_LAYER_ALE_RESOURCE_ASSIGNMENT_V4:
315309
hook_id = EBPF_HOOK_ALE_RESOURCE_ALLOC_V4;
316310
break;

netebpfext/net_ebpf_ext.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -236,17 +236,15 @@ typedef struct _net_ebpf_extension_flow_context_parameters
236236

237237
typedef enum _net_ebpf_extension_hook_id
238238
{
239-
EBPF_HOOK_OUTBOUND_L2 = 0,
240-
EBPF_HOOK_INBOUND_L2,
241239
EBPF_HOOK_ALE_RESOURCE_ALLOC_V4,
242240
EBPF_HOOK_ALE_RESOURCE_ALLOC_V6,
243241
EBPF_HOOK_ALE_RESOURCE_RELEASE_V4,
244-
EBPF_HOOK_ALE_RESOURCE_RELEASE_V6, // 5
242+
EBPF_HOOK_ALE_RESOURCE_RELEASE_V6,
245243
EBPF_HOOK_ALE_AUTH_CONNECT_V4,
246244
EBPF_HOOK_ALE_AUTH_CONNECT_V6,
247245
EBPF_HOOK_ALE_CONNECT_REDIRECT_V4,
248246
EBPF_HOOK_ALE_CONNECT_REDIRECT_V6,
249-
EBPF_HOOK_ALE_AUTH_RECV_ACCEPT_V4, // 10
247+
EBPF_HOOK_ALE_AUTH_RECV_ACCEPT_V4,
250248
EBPF_HOOK_ALE_AUTH_RECV_ACCEPT_V6,
251249
EBPF_HOOK_ALE_FLOW_ESTABLISHED_V4,
252250
EBPF_HOOK_ALE_FLOW_ESTABLISHED_V6

scripts/run_driver_tests.psm1

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -372,32 +372,6 @@ function Invoke-CICDTests
372372
Pop-Location
373373
}
374374

375-
function Invoke-XDPTest
376-
{
377-
param([parameter(Mandatory = $true)][string] $RemoteIPV4Address,
378-
[parameter(Mandatory = $true)][string] $RemoteIPV6Address,
379-
[parameter(Mandatory = $true)][string] $XDPTestName,
380-
[parameter(Mandatory = $true)][string] $WorkingDirectory,
381-
[parameter(Mandatory = $true)][string] $TraceFileName)
382-
383-
Push-Location $WorkingDirectory
384-
385-
Write-Log "Executing $XDPTestName with remote address: $RemoteIPV4Address"
386-
$TestCommand = ".\xdp_tests.exe"
387-
$TestArguments = "$XDPTestName --remote-ip $RemoteIPV4Address"
388-
Invoke-Test -TestName $TestCommand -TestArgs $TestArguments -VerboseLogs $false -TestHangTimeout $TestHangTimeout -TraceFileName "$($TraceFileName)_V4"
389-
390-
Write-Log "Executing $XDPTestName with remote address: $RemoteIPV6Address"
391-
$TestCommand = ".\xdp_tests.exe"
392-
$TestArguments = "$XDPTestName --remote-ip $RemoteIPV6Address"
393-
Invoke-Test -TestName $TestCommand -TestArgs $TestArguments -VerboseLogs $false -TestHangTimeout $TestHangTimeout -TraceFileName "$($TraceFileName)_V6"
394-
395-
Write-Log "$XDPTestName Test Passed" -ForegroundColor Green
396-
Write-Log "`n`n"
397-
398-
Pop-Location
399-
}
400-
401375
function Invoke-ConnectRedirectTest
402376
{
403377
param([parameter(Mandatory = $true)][string] $LocalIPv4Address,

scripts/vm_run_tests.psm1

Lines changed: 0 additions & 123 deletions
Original file line numberDiff line numberDiff line change
@@ -191,30 +191,6 @@ function Remove-StandardUser {
191191
Invoke-OnHostOrVM -ScriptBlock $scriptBlock -ArgumentList $argList
192192
}
193193

194-
function Invoke-XDPTestHelper {
195-
param (
196-
[Parameter(Mandatory = $True)] [string] $XDPTestName,
197-
[Parameter(Mandatory = $True)] [string] $RemoteIPV4Address,
198-
[Parameter(Mandatory = $True)] [string] $RemoteIPV6Address,
199-
[Parameter(Mandatory = $True)] [string] $LogFileName,
200-
[Parameter(Mandatory = $True)] [string] $TraceFileName
201-
)
202-
$scriptBlock = {
203-
param($XDPTestName, $RemoteIPV4Address, $RemoteIPV6Address, $TestHangTimeout, $UserModeDumpFolder, $WorkingDirectory, $LogFileName, $TracefileName)
204-
Import-Module $WorkingDirectory\common.psm1 -ArgumentList ($LogFileName) -Force -WarningAction SilentlyContinue
205-
Import-Module $WorkingDirectory\run_driver_tests.psm1 -ArgumentList ($WorkingDirectory, $LogFileName, $TestHangTimeout, $UserModeDumpFolder) -Force -WarningAction SilentlyContinue
206-
Write-Log "Invoking $XDPTestName"
207-
Invoke-XDPTest `
208-
-RemoteIPV4Address $RemoteIPV4Address `
209-
-RemoteIPV6Address $RemoteIPV6Address `
210-
-XDPTestName $XDPTestName `
211-
-WorkingDirectory $WorkingDirectory `
212-
-TraceFileName $TraceFileName
213-
}
214-
$argList = @($XDPTestName, $RemoteIPV4Address, $RemoteIPV6Address, $script:TestHangTimeout, $script:UserModeDumpFolder, $script:WorkingDirectory, $LogFileName, $TraceFileName)
215-
Invoke-OnHostOrVM -ScriptBlock $scriptBlock -ArgumentList $argList
216-
}
217-
218194
function Add-FirewallRule {
219195
param (
220196
[Parameter(Mandatory = $True)] [string] $ProgramName,
@@ -231,105 +207,6 @@ function Add-FirewallRule {
231207
Invoke-OnHostOrVM -ScriptBlock $scriptBlock -ArgumentList $argList
232208
}
233209

234-
function Invoke-XDPTest1 {
235-
param(
236-
[Parameter(Mandatory = $True)] [string] $VM1Interface1V4Address,
237-
[Parameter(Mandatory = $True)] [string] $VM1Interface1V6Address,
238-
[Parameter(Mandatory = $True)] [string] $VM1Interface2V4Address,
239-
[Parameter(Mandatory = $True)] [string] $VM1Interface2V6Address,
240-
[Parameter(Mandatory = $True)] [string] $LogFileName
241-
)
242-
Write-Log "Running XDP Test1 ..."
243-
$ProgId = Add-eBPFProgram -Program "reflect_packet.sys" -LogFileName $LogFileName
244-
Invoke-XDPTestHelper -XDPTestName "xdp_reflect_test" -RemoteIPV4Address $VM1Interface1V4Address -RemoteIPV6Address $VM1Interface1V6Address -LogFileName $LogFileName -TraceFileName "XDPTest1_1"
245-
Invoke-XDPTestHelper -XDPTestName "xdp_reflect_test" -RemoteIPV4Address $VM1Interface2V4Address -RemoteIPV6Address $VM1Interface2V6Address -LogFileName $LogFileName -TraceFileName "XDPTest1_2"
246-
Remove-eBPFProgram $ProgId $LogFileName
247-
Write-Log "XDP Test1 succeeded." -ForegroundColor Green
248-
}
249-
250-
function Invoke-XDPTest2 {
251-
param(
252-
[Parameter(Mandatory = $True)] [string] $VM1Interface1Alias,
253-
[Parameter(Mandatory = $True)] [string] $VM1Interface2Alias,
254-
[Parameter(Mandatory = $True)] [string] $VM1Interface1V4Address,
255-
[Parameter(Mandatory = $True)] [string] $VM1Interface1V6Address,
256-
[Parameter(Mandatory = $True)] [string] $VM1Interface2V4Address,
257-
[Parameter(Mandatory = $True)] [string] $VM1Interface2V6Address,
258-
[Parameter(Mandatory = $True)] [string] $LogFileName
259-
)
260-
Write-Log "Running XDP Test2 ..."
261-
$ProgId = Add-eBPFProgram -Program "reflect_packet.sys" -Interface $VM1Interface1Alias -LogFileName $LogFileName
262-
Write-Log "Invoking Set-eBPFProgram for $ProgId interface $VM1Interface2Alias"
263-
Set-eBPFProgram -ProgId $ProgId -Interface $VM1Interface2Alias -LogFileName $LogFileName
264-
Write-Log "Invoking Invoke-XDPTestHelper for $VM1Interface1V4Address and $VM1Interface1V6Address"
265-
Invoke-XDPTestHelper -XDPTestName "xdp_reflect_test" -RemoteIPV4Address $VM1Interface1V4Address -RemoteIPV6Address $VM1Interface1V6Address -LogFileName $LogFileName -TraceFileName "XDPTest2_1"
266-
Write-Log "Invoking Invoke-XDPTestHelper for $VM1Interface2V4Address and $VM1Interface2V6Address"
267-
Invoke-XDPTestHelper -XDPTestName "xdp_reflect_test" -RemoteIPV4Address $VM1Interface2V4Address -RemoteIPV6Address $VM1Interface2V6Address -LogFileName $LogFileName -TraceFileName "XDPTest2_2"
268-
Remove-eBPFProgram $ProgId $LogFileName
269-
Write-Log "XDP Test2 succeeded." -ForegroundColor Green
270-
}
271-
272-
function Invoke-XDPTest3 {
273-
param(
274-
[Parameter(Mandatory = $True)] [string] $VM1Interface1Alias,
275-
[Parameter(Mandatory = $True)] [string] $VM1Interface2Alias,
276-
[Parameter(Mandatory = $True)] [string] $VM1Interface1V4Address,
277-
[Parameter(Mandatory = $True)] [string] $VM1Interface1V6Address,
278-
[Parameter(Mandatory = $True)] [string] $VM1Interface2V4Address,
279-
[Parameter(Mandatory = $True)] [string] $VM1Interface2V6Address,
280-
[Parameter(Mandatory = $True)] [string] $LogFileName
281-
)
282-
Write-Log "Running XDP Test3 ..."
283-
$ProgId1 = Add-eBPFProgram -Program "reflect_packet.sys" -Interface $VM1Interface1Alias -LogFileName $LogFileName
284-
$ProgId2 = Add-eBPFProgram -Program "encap_reflect_packet.sys" -Interface $VM1Interface2Alias -LogFileName $LogFileName
285-
Invoke-XDPTestHelper -XDPTestName "xdp_reflect_test" -RemoteIPV4Address $VM1Interface1V4Address -RemoteIPV6Address $VM1Interface1V6Address -LogFileName $LogFileName -TraceFileName "XDPTest3_1"
286-
Invoke-XDPTestHelper -XDPTestName "xdp_encap_reflect_test" -RemoteIPV4Address $VM1Interface2V4Address -RemoteIPV6Address $VM1Interface2V6Address -LogFileName $LogFileName -TraceFileName "XDPTest3_2"
287-
Remove-eBPFProgram $ProgId1 $LogFileName
288-
Remove-eBPFProgram $ProgId2 $LogFileName
289-
Write-Log "XDP Test3 succeeded." -ForegroundColor Green
290-
}
291-
292-
function Invoke-XDPTest4 {
293-
param(
294-
[Parameter(Mandatory = $True)] [string] $VM1Interface1V4Address,
295-
[Parameter(Mandatory = $True)] [string] $VM1Interface1V6Address,
296-
[Parameter(Mandatory = $True)] [string] $VM1Interface1Alias,
297-
[Parameter(Mandatory = $True)] [string] $VM2Interface1Alias,
298-
[Parameter(Mandatory = $True)] [string] $LogFileName
299-
)
300-
Write-Log "Running XDP Test4 ..."
301-
$ProgId1 = Add-eBPFProgram -Program "encap_reflect_packet.sys" -Interface $VM1Interface1Alias -LogFileName $LogFileName
302-
$ProgId2 = Add-eBPFProgram -Program "decap_permit_packet.sys" -Interface $VM2Interface1Alias -LogFileName $LogFileName
303-
Invoke-XDPTestHelper -XDPTestName "xdp_reflect_test" -RemoteIPV4Address $VM1Interface1V4Address -RemoteIPV6Address $VM1Interface1V6Address -LogFileName $LogFileName -TraceFileName "XDPTest4"
304-
Remove-eBPFProgram $ProgId1 $LogFileName
305-
Remove-eBPFProgram $ProgId2 $LogFileName
306-
Write-Log "XDP Test4 succeeded." -ForegroundColor Green
307-
}
308-
309-
function Invoke-XDPTests {
310-
param(
311-
[Parameter(Mandatory = $True)] $Interfaces,
312-
[Parameter(Mandatory = $True)] [string] $LogFileName
313-
)
314-
Write-Log "Starting XDP tests"
315-
Write-Log "`n`n"
316-
$VM1Interface1 = $Interfaces[0]
317-
$VM1Interface1Alias = $VM1Interface1.Alias
318-
$VM1Interface1V4Address = $VM1Interface1.V4Address
319-
$VM1Interface1V6Address = $VM1Interface1.V6Address
320-
$VM2Interface1 = $Interfaces[1]
321-
$VM2Interface1Alias = $VM2Interface1.Alias
322-
$VM1Interface2 = $Interfaces[2]
323-
$VM1Interface2Alias = $VM1Interface2.Alias
324-
$VM1Interface2V4Address = $VM1Interface2.V4Address
325-
$VM1Interface2V6Address = $VM1Interface2.V6Address
326-
Add-FirewallRule -RuleName "XDP_Test" -ProgramName "xdp_tests.exe" -LogFileName $LogFileName
327-
Invoke-XDPTest1 -VM1Interface1V4Address $VM1Interface1V4Address -VM1Interface1V6Address $VM1Interface1V6Address -VM1Interface2V4Address $VM1Interface2V4Address -VM1Interface2V6Address $VM1Interface2V6Address -LogFileName $LogFileName
328-
Invoke-XDPTest2 -VM1Interface1Alias $VM1Interface1Alias -VM1Interface2Alias $VM1Interface2Alias -VM1Interface1V4Address $VM1Interface1V4Address -VM1Interface1V6Address $VM1Interface1V6Address -VM1Interface2V4Address $VM1Interface2V4Address -VM1Interface2V6Address $VM1Interface2V6Address -LogFileName $LogFileName
329-
Invoke-XDPTest3 -VM1Interface1Alias $VM1Interface1Alias -VM1Interface2Alias $VM1Interface2Alias -VM1Interface1V4Address $VM1Interface1V4Address -VM1Interface1V6Address $VM1Interface1V6Address -VM1Interface2V4Address $VM1Interface2V4Address -VM1Interface2V6Address $VM1Interface2V6Address -LogFileName $LogFileName
330-
Invoke-XDPTest4 -VM1Interface1V4Address $VM1Interface1V4Address -VM1Interface1V6Address $VM1Interface1V6Address -VM1Interface1Alias $VM1Interface1Alias -VM2Interface1Alias $VM2Interface1Alias -LogFileName $LogFileName
331-
}
332-
333210
function Invoke-ConnectRedirectTestHelper
334211
{
335212
param(

tests/end_to_end/end_to_end.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ namespace ebpf {
2929
#include "test_helper.hpp"
3030
#include "usersim/ke.h"
3131
#include "watchdog.h"
32-
#include "xdp_tests_common.h"
3332

3433
#include <WinSock2.h>
3534
#include <in6addr.h>

tests/netebpfext_unit/netebpf_ext_helper.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,6 @@ typedef class _netebpf_ext_helper
4747
ebpf_program_data_t*
4848
get_program_info_provider_data(_In_ const GUID& program_info_provider);
4949

50-
FWP_ACTION_TYPE
51-
classify_test_packet(_In_ const GUID* layer_guid, NET_IFINDEX if_index)
52-
{
53-
return usersim_fwp_classify_packet(layer_guid, if_index);
54-
}
55-
5650
FWP_ACTION_TYPE
5751
test_bind_ipv4(_In_ fwp_classify_parameters_t* parameters) { return usersim_fwp_bind_ipv4(parameters); }
5852

tests/netebpfext_unit/netebpfext_unit.cpp

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,6 @@ typedef enum _sock_addr_test_action
3333
SOCK_ADDR_TEST_ACTION_ROUND_ROBIN
3434
} sock_addr_test_action_t;
3535

36-
typedef enum _xdp_test_action
37-
{
38-
XDP_TEST_ACTION_PASS, ///< Allow the packet to pass.
39-
XDP_TEST_ACTION_DROP, ///< Drop the packet.
40-
XDP_TEST_ACTION_TX, ///< Bounce the received packet back out the same NIC it arrived on.
41-
XDP_TEST_ACTION_FAILURE ///< Failed to invoke the eBPF program.
42-
} xdp_test_action_t;
43-
4436
TEST_CASE("query program info", "[netebpfext]")
4537
{
4638
netebpf_ext_helper_t helper;
@@ -71,53 +63,6 @@ TEST_CASE("query program info", "[netebpfext]")
7163
REQUIRE(expected_program_names == program_names);
7264
}
7365

74-
#pragma region xdp
75-
76-
typedef struct _test_xdp_client_context
77-
{
78-
netebpfext_helper_base_client_context_t base;
79-
void* provider_binding_context;
80-
xdp_test_action_t xdp_action;
81-
} test_xdp_client_context_t;
82-
83-
typedef struct _test_xdp_client_context_header
84-
{
85-
EBPF_CONTEXT_HEADER;
86-
test_xdp_client_context_t context;
87-
} test_xdp_client_context_header_t;
88-
89-
// This callback occurs when netebpfext gets a packet and submits it to our dummy
90-
// eBPF program to handle.
91-
_Must_inspect_result_ ebpf_result_t
92-
netebpfext_unit_invoke_xdp_program(
93-
_In_ const void* client_binding_context, _In_ const void* context, _Out_ uint32_t* result)
94-
{
95-
ebpf_result_t return_result = EBPF_SUCCESS;
96-
auto client_context = (test_xdp_client_context_t*)client_binding_context;
97-
UNREFERENCED_PARAMETER(context);
98-
99-
switch (client_context->xdp_action) {
100-
case XDP_TEST_ACTION_PASS:
101-
*result = XDP_PASS;
102-
break;
103-
case XDP_TEST_ACTION_DROP:
104-
*result = XDP_DROP;
105-
break;
106-
case XDP_TEST_ACTION_TX:
107-
*result = XDP_TX;
108-
break;
109-
case XDP_TEST_ACTION_FAILURE:
110-
return_result = EBPF_FAILED;
111-
break;
112-
default:
113-
*result = XDP_DROP;
114-
break;
115-
}
116-
117-
return return_result;
118-
}
119-
120-
#pragma endregion xdp
12166
#pragma region bind
12267

12368
typedef struct test_bind_client_context_t

tests/xdp/resource.h

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)