diff --git a/.github/workflows/release-scheduler.yml b/.github/workflows/release-scheduler.yml new file mode 100644 index 0000000000..d9e526dad8 --- /dev/null +++ b/.github/workflows/release-scheduler.yml @@ -0,0 +1,43 @@ +# Copyright (c) Microsoft Corporation +# SPDX-License-Identifier: MIT + +# This workflow is triggered on the first day of every month, and creates an issue for releasing eBPF for Windows. + +name: Release scheduler +on: + schedule: + - cron: 0 0 1 * * + +jobs: + create_release_issue: + name: Create release task + runs-on: ubuntu-latest + permissions: + issues: write + steps: + - name: Create release task + uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 + env: + TITLE: Scheduled eBPF release is due + LABELS: release + BODY: | + This is an automated reminder that a new release for eBPF is scheduled to be created: + + 1. Follow instructions in [ReleaseProcess.md](https://github.com/microsoft/ebpf-for-windows/blob/main/docs/ReleaseProcess.md). + 1. Sync the internal `mscodehub` and follow the internal release instructions in `\.internal\docs\ReleaseEbpfRedistProcess.md`. + with: + script: | + const owner = process.env.GITHUB_REPOSITORY.split('/')[0] + const repo = process.env.GITHUB_REPOSITORY.split('/')[1] + const body = process.env.BODY; + const title = process.env.TITLE; + const labels = process.env.LABELS; + const label_array = labels ? labels.split(',') : []; + console.log(`Creating issue ${title}`); + await github.rest.issues.create({ + owner: owner, + repo: repo, + title: title, + body: body, + labels: label_array, + }); diff --git a/.github/workflows/reusable-test.yml b/.github/workflows/reusable-test.yml index 219840c719..69255c6653 100644 --- a/.github/workflows/reusable-test.yml +++ b/.github/workflows/reusable-test.yml @@ -385,7 +385,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Harden Runner - uses: step-security/harden-runner@55d479fb1c5bcad5a4f9099a5d9f37c8857b2845 # v2.4.1 + uses: step-security/harden-runner@cba0d00b1fc9a034e1e642ea0f1103c282990604 # v2.5.0 with: disable-sudo: true egress-policy: block diff --git a/.github/workflows/scorecards-analysis.yml b/.github/workflows/scorecards-analysis.yml index fdd727fdc9..802e03cbb9 100644 --- a/.github/workflows/scorecards-analysis.yml +++ b/.github/workflows/scorecards-analysis.yml @@ -33,7 +33,7 @@ jobs: steps: - name: Harden Runner - uses: step-security/harden-runner@55d479fb1c5bcad5a4f9099a5d9f37c8857b2845 # v2.4.1 + uses: step-security/harden-runner@cba0d00b1fc9a034e1e642ea0f1103c282990604 # v2.5.0 with: disable-sudo: true egress-policy: block diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml index 3b5bcc52ac..1d358a3336 100644 --- a/.github/workflows/update-docs.yml +++ b/.github/workflows/update-docs.yml @@ -30,7 +30,7 @@ jobs: steps: - name: Harden Runner - uses: step-security/harden-runner@55d479fb1c5bcad5a4f9099a5d9f37c8857b2845 + uses: step-security/harden-runner@cba0d00b1fc9a034e1e642ea0f1103c282990604 with: egress-policy: block allowed-endpoints: > diff --git a/docs/SelfHostedRunnerSetup.md b/docs/SelfHostedRunnerSetup.md index 36a93c924b..e074ef026d 100644 --- a/docs/SelfHostedRunnerSetup.md +++ b/docs/SelfHostedRunnerSetup.md @@ -1,8 +1,7 @@ # Setup instructions for self-hosted runners -The CI/CD tests for `eBPF for Windows` requires installing kernel drivers, that are not supported in Github-hosted runners. -That is why self-host runners are needed to run those tests. The `driver` job in the `CI/CD` Github workflow (`cicd.yml`) runs on self-host runners that use Hyper-V VMs to deploy the eBPF components and run the CI/CD tests on. Using Hyper-V VMs enable the Github workflow to start from a clean state every time the test runs by restoring the VMs to a "baseline" snapshot. -This document discusses the steps to set up such a self-hosted actions-runner that can run the workflow for CI/CD tests on a fork of the eBPF for Windows repo. +Some CI/CD tests for `eBPF for Windows` require installing kernel drivers, but the Github-hosted runners cannot be used to collect kernel-mode dumps should a crash occur. Self-hosted runners allow us to use nested VMs and collect KM dumps. We use them to run the `driver` job in the `CI/CD` Github workflow (`cicd.yml`). On each test run, we restore the VM to a saved checkpoint for a clean run. +Since these runners only run jobs for PRs in the official `eBPF for Windows` repo, you can follow the steps below to set one up for your fork. 1) Install Windows Server 2019 - build 17763. 1) [Windows Server 2019 Azure VM](https://portal.azure.com/#create/Microsoft.WindowsServer2019Datacenter-ARM) @@ -17,21 +16,18 @@ This document discusses the steps to set up such a self-hosted actions-runner th `NetworkService` by default. However, the `Kernel_Test_VM` workflow performs operations on a test VM that requires administrator privilege. So, the credentials of an account with administrator privilege must be supplied in `windowslogonaccount` and `windowslogonpassword` parameters. -6) Follow the [VM Installation Instructions](vm-setup.md) to set up **two test VMs** and perform one-time setup steps. Then create a snapshot named **baseline** for each of the VMs. -7) Connect the two test VMs. - 1) Create a new VMSwitch instance: `New-VMSwitch -Name -SwitchType Private` - 2) Add two VM NICs on the first VM and one VM NIC on the other VM. Connect the NICs to the private VMSwitch: `Add-VMNetworkAdapter -VMName -SwitchName ` -8) Edit test configuration JSON files. - 1) Edit `test_execution.json` file. Add the name of the one of the VMs in `BasicTest` section. Add the names of both the VMs in `MultiVMTest` section along with the "Interfaces" section that must contain information about the network interfaces created in step 7.2 Above. This section must contain the interface alias, and IPv4 and IPv6 addresses. The CICD test automation would apply these IP addresses on the NICs of the test VM. - 2) Edit `vm_list.json` with the names of the two test VMs. -9) Store the VM administrator and standard user credentials: +6) Follow the [VM Installation Instructions](vm-setup.md) to set up **one test VM** and perform one-time setup steps. Then create a snapshot named **baseline** for the VMs. +7) Edit test configuration JSON files. + 1) Edit `test_execution.json` file. Update the name of the VM in `BasicTest` section. Update the name of the VM in `MultiVMTest` section. + 2) Edit `vm_list.json` with the name of the test VM. +8) Store the VM administrator and standard user credentials on the runner machine: 1) `Install-Module CredentialManager -force` 2) `New-StoredCredential -Target `**`TEST_VM`**` -Username -Password -Persist LocalMachine` 3) `New-StoredCredential -Target `**`TEST_VM_STANDARD`**` -Username -Password -Persist LocalMachine` -10) Modify the environment of the VM as needed. Create new checkpoints using **Hyper-V**. Rename the new checkpoint as `baseline`, and remove the old baseline. -11) Set up Windows Error Reporting [Local Dump Collection](https://docs.microsoft.com/en-us/windows/win32/wer/collecting-user-mode-dumps) on the VMs with the following commands. +9) Modify the environment of the VM as needed. Create a new checkpoint using **Hyper-V**. Rename the new checkpoint to `baseline`, and remove the old baseline. +10) Set up Windows Error Reporting [Local Dump Collection](https://docs.microsoft.com/en-us/windows/win32/wer/collecting-user-mode-dumps) on the VM with the following commands. ```New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" -ErrorAction SilentlyContinue``` ```New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" -Name "DumpType" -Value 2 -PropertyType DWord -ErrorAction SilentlyContinue``` ```New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" -Name "DumpFolder" -Value "c:\dumps" -PropertyType ExpandString -ErrorAction SilentlyContinue -Force``` -12) Reboot the runner. +11) Reboot the runner. diff --git a/ebpf-for-windows.sln b/ebpf-for-windows.sln index 326ab64754..0f2a5bcf48 100644 --- a/ebpf-for-windows.sln +++ b/ebpf-for-windows.sln @@ -221,7 +221,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ebpf_store_helper_um", "lib EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "usersim", "external\usersim\src\usersim.vcxproj", "{030A7AC6-14DC-45CF-AF34-891057AB1402}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbtf", "external\ebpf-verifier\build\external\libbtf\libbtf\libbtf.vcxproj", "{BC45D39C-F956-3951-BD46-44EAE20EC7C9}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbtf", "external\ebpf-verifier\build\external\libbtf\libbtf\libbtf.vcxproj", "{249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "usersim_dll_skeleton", "external\usersim\usersim_dll_skeleton\usersim_dll_skeleton.vcxproj", "{1937DB41-F3EB-4955-A636-6386DCB394F6}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -2836,6 +2838,90 @@ Global {BC45D39C-F956-3951-BD46-44EAE20EC7C9}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 {BC45D39C-F956-3951-BD46-44EAE20EC7C9}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x64 {BC45D39C-F956-3951-BD46-44EAE20EC7C9}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x64 + {249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5}.Debug|ARM64.ActiveCfg = Debug|x64 + {249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5}.Debug|ARM64.Build.0 = Debug|x64 + {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}.Debug|x86.ActiveCfg = Debug|x64 + {249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5}.Debug|x86.Build.0 = Debug|x64 + {249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5}.FuzzerDebug|ARM64.ActiveCfg = Debug|x64 + {249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5}.FuzzerDebug|ARM64.Build.0 = Debug|x64 + {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}.FuzzerDebug|x86.ActiveCfg = Debug|x64 + {249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5}.FuzzerDebug|x86.Build.0 = Debug|x64 + {249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5}.MinSizeRel|ARM64.ActiveCfg = MinSizeRel|x64 + {249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5}.MinSizeRel|ARM64.Build.0 = MinSizeRel|x64 + {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}.MinSizeRel|x86.ActiveCfg = MinSizeRel|x64 + {249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5}.MinSizeRel|x86.Build.0 = MinSizeRel|x64 + {249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5}.NativeOnlyDebug|ARM64.ActiveCfg = Debug|x64 + {249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5}.NativeOnlyDebug|ARM64.Build.0 = Debug|x64 + {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}.NativeOnlyDebug|x86.ActiveCfg = Debug|x64 + {249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5}.NativeOnlyDebug|x86.Build.0 = Debug|x64 + {249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5}.NativeOnlyRelease|ARM64.ActiveCfg = Release|x64 + {249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5}.NativeOnlyRelease|ARM64.Build.0 = Release|x64 + {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}.NativeOnlyRelease|x86.ActiveCfg = Release|x64 + {249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5}.NativeOnlyRelease|x86.Build.0 = Release|x64 + {249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5}.Release|ARM64.ActiveCfg = Release|x64 + {249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5}.Release|ARM64.Build.0 = Release|x64 + {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}.Release|x86.ActiveCfg = Release|x64 + {249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5}.Release|x86.Build.0 = Release|x64 + {249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5}.RelWithDebInfo|ARM64.ActiveCfg = RelWithDebInfo|x64 + {249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5}.RelWithDebInfo|ARM64.Build.0 = RelWithDebInfo|x64 + {249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 + {249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 + {249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x64 + {249E3FBC-0098-3E3E-80AE-C8F8EF6AB0E5}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x64 + {1937DB41-F3EB-4955-A636-6386DCB394F6}.Debug|ARM64.ActiveCfg = Debug|x64 + {1937DB41-F3EB-4955-A636-6386DCB394F6}.Debug|ARM64.Build.0 = Debug|x64 + {1937DB41-F3EB-4955-A636-6386DCB394F6}.Debug|x64.ActiveCfg = Debug|x64 + {1937DB41-F3EB-4955-A636-6386DCB394F6}.Debug|x64.Build.0 = Debug|x64 + {1937DB41-F3EB-4955-A636-6386DCB394F6}.Debug|x86.ActiveCfg = Debug|Win32 + {1937DB41-F3EB-4955-A636-6386DCB394F6}.Debug|x86.Build.0 = Debug|Win32 + {1937DB41-F3EB-4955-A636-6386DCB394F6}.FuzzerDebug|ARM64.ActiveCfg = Debug|x64 + {1937DB41-F3EB-4955-A636-6386DCB394F6}.FuzzerDebug|ARM64.Build.0 = Debug|x64 + {1937DB41-F3EB-4955-A636-6386DCB394F6}.FuzzerDebug|x64.ActiveCfg = Debug|x64 + {1937DB41-F3EB-4955-A636-6386DCB394F6}.FuzzerDebug|x64.Build.0 = Debug|x64 + {1937DB41-F3EB-4955-A636-6386DCB394F6}.FuzzerDebug|x86.ActiveCfg = Debug|Win32 + {1937DB41-F3EB-4955-A636-6386DCB394F6}.FuzzerDebug|x86.Build.0 = Debug|Win32 + {1937DB41-F3EB-4955-A636-6386DCB394F6}.MinSizeRel|ARM64.ActiveCfg = Debug|x64 + {1937DB41-F3EB-4955-A636-6386DCB394F6}.MinSizeRel|ARM64.Build.0 = Debug|x64 + {1937DB41-F3EB-4955-A636-6386DCB394F6}.MinSizeRel|x64.ActiveCfg = Debug|x64 + {1937DB41-F3EB-4955-A636-6386DCB394F6}.MinSizeRel|x64.Build.0 = Debug|x64 + {1937DB41-F3EB-4955-A636-6386DCB394F6}.MinSizeRel|x86.ActiveCfg = Debug|Win32 + {1937DB41-F3EB-4955-A636-6386DCB394F6}.MinSizeRel|x86.Build.0 = Debug|Win32 + {1937DB41-F3EB-4955-A636-6386DCB394F6}.NativeOnlyDebug|ARM64.ActiveCfg = Debug|x64 + {1937DB41-F3EB-4955-A636-6386DCB394F6}.NativeOnlyDebug|ARM64.Build.0 = Debug|x64 + {1937DB41-F3EB-4955-A636-6386DCB394F6}.NativeOnlyDebug|x64.ActiveCfg = Debug|x64 + {1937DB41-F3EB-4955-A636-6386DCB394F6}.NativeOnlyDebug|x64.Build.0 = Debug|x64 + {1937DB41-F3EB-4955-A636-6386DCB394F6}.NativeOnlyDebug|x86.ActiveCfg = Debug|Win32 + {1937DB41-F3EB-4955-A636-6386DCB394F6}.NativeOnlyDebug|x86.Build.0 = Debug|Win32 + {1937DB41-F3EB-4955-A636-6386DCB394F6}.NativeOnlyRelease|ARM64.ActiveCfg = Release|x64 + {1937DB41-F3EB-4955-A636-6386DCB394F6}.NativeOnlyRelease|ARM64.Build.0 = Release|x64 + {1937DB41-F3EB-4955-A636-6386DCB394F6}.NativeOnlyRelease|x64.ActiveCfg = Release|x64 + {1937DB41-F3EB-4955-A636-6386DCB394F6}.NativeOnlyRelease|x64.Build.0 = Release|x64 + {1937DB41-F3EB-4955-A636-6386DCB394F6}.NativeOnlyRelease|x86.ActiveCfg = Release|Win32 + {1937DB41-F3EB-4955-A636-6386DCB394F6}.NativeOnlyRelease|x86.Build.0 = Release|Win32 + {1937DB41-F3EB-4955-A636-6386DCB394F6}.Release|ARM64.ActiveCfg = Release|x64 + {1937DB41-F3EB-4955-A636-6386DCB394F6}.Release|ARM64.Build.0 = Release|x64 + {1937DB41-F3EB-4955-A636-6386DCB394F6}.Release|x64.ActiveCfg = Release|x64 + {1937DB41-F3EB-4955-A636-6386DCB394F6}.Release|x64.Build.0 = Release|x64 + {1937DB41-F3EB-4955-A636-6386DCB394F6}.Release|x86.ActiveCfg = Release|Win32 + {1937DB41-F3EB-4955-A636-6386DCB394F6}.Release|x86.Build.0 = Release|Win32 + {1937DB41-F3EB-4955-A636-6386DCB394F6}.RelWithDebInfo|ARM64.ActiveCfg = Release|x64 + {1937DB41-F3EB-4955-A636-6386DCB394F6}.RelWithDebInfo|ARM64.Build.0 = Release|x64 + {1937DB41-F3EB-4955-A636-6386DCB394F6}.RelWithDebInfo|x64.ActiveCfg = Release|x64 + {1937DB41-F3EB-4955-A636-6386DCB394F6}.RelWithDebInfo|x64.Build.0 = Release|x64 + {1937DB41-F3EB-4955-A636-6386DCB394F6}.RelWithDebInfo|x86.ActiveCfg = Release|Win32 + {1937DB41-F3EB-4955-A636-6386DCB394F6}.RelWithDebInfo|x86.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -2905,6 +2991,8 @@ Global {AA933B9F-B5D8-4AA8-AC18-98FE1A161E8A} = {69CDB6A1-434D-4BC9-9BFF-D12DF7EDBB6B} {030A7AC6-14DC-45CF-AF34-891057AB1402} = {69CDB6A1-434D-4BC9-9BFF-D12DF7EDBB6B} {BC45D39C-F956-3951-BD46-44EAE20EC7C9} = {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} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {3D5F862D-74C6-4357-9F95-0B152E33B7B8} diff --git a/external/ubpf b/external/ubpf index f322f8c472..9bcda2f4e5 160000 --- a/external/ubpf +++ b/external/ubpf @@ -1 +1 @@ -Subproject commit f322f8c47231ca5daf7eae574e7a6cd347eaa7d4 +Subproject commit 9bcda2f4e5ad8ad63be4f8c333a5a61ace1d2aae diff --git a/external/usersim b/external/usersim index bce541cb79..6d6f6e2310 160000 --- a/external/usersim +++ b/external/usersim @@ -1 +1 @@ -Subproject commit bce541cb79ddefce3231a780fe277983de86fc5e +Subproject commit 6d6f6e23105358844e140ebf5c9fdaffb197e9cf diff --git a/libs/execution_context/ebpf_maps.c b/libs/execution_context/ebpf_maps.c index 5832bce2ef..22a0afc444 100644 --- a/libs/execution_context/ebpf_maps.c +++ b/libs/execution_context/ebpf_maps.c @@ -1795,7 +1795,9 @@ static _Requires_lock_held_(ring_buffer_map->lock) void _ebpf_ring_buffer_map_si ebpf_ring_buffer_query( (ebpf_ring_buffer_t*)map->data, &async_query_result->consumer, &async_query_result->producer); ebpf_list_remove_entry(&context->entry); - ebpf_async_complete(context->async_context, sizeof(*async_query_result), EBPF_SUCCESS); + ebpf_operation_ring_buffer_map_async_query_reply_t* reply = + EBPF_FROM_FIELD(ebpf_operation_ring_buffer_map_async_query_reply_t, async_query_result, async_query_result); + ebpf_async_complete(context->async_context, sizeof(*reply), EBPF_SUCCESS); ebpf_free(context); context = NULL; } diff --git a/netebpfext/net_ebpf_ext_hook_provider.c b/netebpfext/net_ebpf_ext_hook_provider.c index 9189762250..dad8a82edf 100644 --- a/netebpfext/net_ebpf_ext_hook_provider.c +++ b/netebpfext/net_ebpf_ext_hook_provider.c @@ -322,6 +322,10 @@ _net_ebpf_extension_hook_provider_attach_client( NET_EBPF_EXT_LOG_ENTRY(); if ((provider_binding_context == NULL) || (provider_dispatch == NULL) || (local_provider_context == NULL)) { + NET_EBPF_EXT_LOG_MESSAGE( + NET_EBPF_EXT_TRACELOG_LEVEL_ERROR, + NET_EBPF_EXT_TRACELOG_KEYWORD_EXTENSION, + "Unexpected NULL argument(s). Attach attempt rejected."); status = STATUS_INVALID_PARAMETER; goto Exit; } @@ -331,10 +335,9 @@ _net_ebpf_extension_hook_provider_attach_client( hook_client = (net_ebpf_extension_hook_client_t*)ExAllocatePoolUninitialized( NonPagedPoolNx, sizeof(net_ebpf_extension_hook_client_t), NET_EBPF_EXTENSION_POOL_TAG); - if (hook_client == NULL) { - status = STATUS_NO_MEMORY; - goto Exit; - } + NET_EBPF_EXT_BAIL_ON_ALLOC_FAILURE_STATUS( + NET_EBPF_EXT_TRACELOG_KEYWORD_EXTENSION, hook_client, "hook_client", status); + memset(hook_client, 0, sizeof(net_ebpf_extension_hook_client_t)); hook_client->detach_work_item = NULL; @@ -345,6 +348,10 @@ _net_ebpf_extension_hook_provider_attach_client( client_dispatch_table = (ebpf_extension_program_dispatch_table_t*)client_dispatch; if (client_dispatch_table == NULL) { status = STATUS_INVALID_PARAMETER; + NET_EBPF_EXT_LOG_MESSAGE( + NET_EBPF_EXT_TRACELOG_LEVEL_ERROR, + NET_EBPF_EXT_TRACELOG_KEYWORD_EXTENSION, + "client_dispatch_table is NULL. Attach attempt rejected."); goto Exit; } hook_client->invoke_program = client_dispatch_table->ebpf_program_invoke_function; @@ -352,6 +359,11 @@ _net_ebpf_extension_hook_provider_attach_client( status = _ebpf_ext_attach_init_rundown(hook_client); if (!NT_SUCCESS(status)) { + NET_EBPF_EXT_LOG_MESSAGE_NTSTATUS( + NET_EBPF_EXT_TRACELOG_LEVEL_ERROR, + NET_EBPF_EXT_TRACELOG_KEYWORD_EXTENSION, + "_ebpf_ext_attach_init_rundown failed. Attach attempt rejected.", + status); goto Exit; } @@ -364,6 +376,11 @@ _net_ebpf_extension_hook_provider_attach_client( InsertTailList(&local_provider_context->attached_clients_list, &hook_client->link); RELEASE_PUSH_LOCK_EXCLUSIVE(&local_provider_context->lock); } else { + NET_EBPF_EXT_LOG_MESSAGE_UINT32( + NET_EBPF_EXT_TRACELOG_LEVEL_ERROR, + NET_EBPF_EXT_TRACELOG_KEYWORD_EXTENSION, + "attach_callback returned failure. Attach attempt rejected.", + result); status = STATUS_ACCESS_DENIED; } @@ -399,6 +416,10 @@ _net_ebpf_extension_hook_provider_detach_client(_In_ const void* provider_bindin net_ebpf_extension_hook_provider_t* local_provider_context = local_client_context->provider_context; if (local_client_context == NULL) { + NET_EBPF_EXT_LOG_MESSAGE( + NET_EBPF_EXT_TRACELOG_LEVEL_ERROR, + NET_EBPF_EXT_TRACELOG_KEYWORD_EXTENSION, + "local_client_context is NULL. Detach attempt rejected."); status = STATUS_INVALID_PARAMETER; goto Exit; } @@ -437,8 +458,12 @@ net_ebpf_extension_hook_provider_unregister( if (provider_context->nmr_provider_handle != NULL) { NTSTATUS status = NmrDeregisterProvider(provider_context->nmr_provider_handle); if (status == STATUS_PENDING) { + // Wait for clients to detach. NmrWaitForProviderDeregisterComplete(provider_context->nmr_provider_handle); + } else { + NET_EBPF_EXT_LOG_NTSTATUS_API_FAILURE( + NET_EBPF_EXT_TRACELOG_KEYWORD_EXTENSION, "NmrDeregisterProvider", status); } } ExFreePool(provider_context); @@ -461,10 +486,9 @@ net_ebpf_extension_hook_provider_register( NET_EBPF_EXT_LOG_ENTRY(); local_provider_context = (net_ebpf_extension_hook_provider_t*)ExAllocatePoolUninitialized( NonPagedPoolNx, sizeof(net_ebpf_extension_hook_provider_t), NET_EBPF_EXTENSION_POOL_TAG); - if (local_provider_context == NULL) { - status = STATUS_NO_MEMORY; - goto Exit; - } + NET_EBPF_EXT_BAIL_ON_ALLOC_FAILURE_STATUS( + NET_EBPF_EXT_TRACELOG_KEYWORD_EXTENSION, local_provider_context, "local_provider_context", status); + memset(local_provider_context, 0, sizeof(net_ebpf_extension_hook_provider_t)); ExInitializePushLock(&local_provider_context->lock); InitializeListHead(&local_provider_context->attached_clients_list); @@ -487,6 +511,10 @@ net_ebpf_extension_hook_provider_register( status = NmrRegisterProvider(characteristics, local_provider_context, &local_provider_context->nmr_provider_handle); if (!NT_SUCCESS(status)) { + + // The docs don't mention the (out) handle status on failure, so explicitly mark it as invalid. + local_provider_context->nmr_provider_handle = NULL; + NET_EBPF_EXT_LOG_NTSTATUS_API_FAILURE(NET_EBPF_EXT_TRACELOG_KEYWORD_EXTENSION, "NmrRegisterProvider", status); goto Exit; } diff --git a/netebpfext/net_ebpf_ext_prog_info_provider.c b/netebpfext/net_ebpf_ext_prog_info_provider.c index a61b6530f4..bf73c17c85 100644 --- a/netebpfext/net_ebpf_ext_prog_info_provider.c +++ b/netebpfext/net_ebpf_ext_prog_info_provider.c @@ -60,6 +60,10 @@ _net_ebpf_extension_program_info_provider_attach_client( UNREFERENCED_PARAMETER(client_binding_context); if ((provider_binding_context == NULL) || (provider_dispatch == NULL)) { + NET_EBPF_EXT_LOG_MESSAGE( + NET_EBPF_EXT_TRACELOG_LEVEL_ERROR, + NET_EBPF_EXT_TRACELOG_KEYWORD_EXTENSION, + "Unexpected NULL argument(s). Attach attempt rejected."); status = STATUS_INVALID_PARAMETER; goto Exit; } @@ -69,10 +73,9 @@ _net_ebpf_extension_program_info_provider_attach_client( program_info_client = (net_ebpf_extension_program_info_client_t*)ExAllocatePoolUninitialized( NonPagedPoolNx, sizeof(net_ebpf_extension_program_info_client_t), NET_EBPF_EXTENSION_POOL_TAG); - if (program_info_client == NULL) { - status = STATUS_NO_MEMORY; - goto Exit; - } + NET_EBPF_EXT_BAIL_ON_ALLOC_FAILURE_STATUS( + NET_EBPF_EXT_TRACELOG_KEYWORD_EXTENSION, program_info_client, "program_info_client", status); + memset(program_info_client, 0, sizeof(net_ebpf_extension_program_info_client_t)); program_info_client->nmr_binding_handle = nmr_binding_handle; @@ -123,7 +126,12 @@ net_ebpf_extension_program_info_provider_unregister( if (provider_context->nmr_provider_handle != NULL) { NTSTATUS status = NmrDeregisterProvider(provider_context->nmr_provider_handle); if (status == STATUS_PENDING) { + + // Wait for clients to detach. NmrWaitForProviderDeregisterComplete(provider_context->nmr_provider_handle); + } else { + NET_EBPF_EXT_LOG_NTSTATUS_API_FAILURE( + NET_EBPF_EXT_TRACELOG_KEYWORD_EXTENSION, "NmrDeregisterProvider", status); } } ExFreePool(provider_context); @@ -143,10 +151,9 @@ net_ebpf_extension_program_info_provider_register( local_provider_context = (net_ebpf_extension_program_info_provider_t*)ExAllocatePoolUninitialized( NonPagedPoolNx, sizeof(net_ebpf_extension_program_info_provider_t), NET_EBPF_EXTENSION_POOL_TAG); - if (local_provider_context == NULL) { - status = STATUS_NO_MEMORY; - goto Exit; - } + NET_EBPF_EXT_BAIL_ON_ALLOC_FAILURE_STATUS( + NET_EBPF_EXT_TRACELOG_KEYWORD_EXTENSION, local_provider_context, "local_provider_context", status); + memset(local_provider_context, 0, sizeof(net_ebpf_extension_program_info_provider_t)); characteristics = &local_provider_context->characteristics; @@ -163,6 +170,10 @@ net_ebpf_extension_program_info_provider_register( status = NmrRegisterProvider(characteristics, local_provider_context, &local_provider_context->nmr_provider_handle); if (!NT_SUCCESS(status)) { + + // The docs don't mention the (out) handle status on failure, so explicitly mark it as invalid. + local_provider_context->nmr_provider_handle = NULL; + NET_EBPF_EXT_LOG_NTSTATUS_API_FAILURE(NET_EBPF_EXT_TRACELOG_KEYWORD_EXTENSION, "NmrRegisterProvider", status); goto Exit; } diff --git a/netebpfext/net_ebpf_ext_tracelog.h b/netebpfext/net_ebpf_ext_tracelog.h index 961fe849ec..3ef95c2cd5 100644 --- a/netebpfext/net_ebpf_ext_tracelog.h +++ b/netebpfext/net_ebpf_ext_tracelog.h @@ -379,12 +379,12 @@ net_ebpf_ext_log_message_uint64_uint64_uint64( } \ } while (false); -#define NET_EBPF_EXT_BAIL_ON_ALLOC_FAILURE_STATUS(keyword, ptr, ptr_name, result) \ +#define NET_EBPF_EXT_BAIL_ON_ALLOC_FAILURE_STATUS(keyword, ptr, ptr_name, status) \ do { \ if ((ptr) == NULL) { \ NET_EBPF_EXT_LOG_MESSAGE( \ NET_EBPF_EXT_TRACELOG_LEVEL_ERROR, ##keyword##, "Failed to allocate " #ptr_name " in " __FUNCTION__); \ - (result) = STATUS_INSUFFICIENT_RESOURCES; \ + (status) = STATUS_INSUFFICIENT_RESOURCES; \ goto Exit; \ } \ } while (false); diff --git a/netebpfext/user/netebpfext_user.vcxproj b/netebpfext/user/netebpfext_user.vcxproj index 43635f92ef..deba0a9f19 100644 --- a/netebpfext/user/netebpfext_user.vcxproj +++ b/netebpfext/user/netebpfext_user.vcxproj @@ -76,7 +76,7 @@ _DEBUG;_CONSOLE;USER_MODE;%(PreprocessorDefinitions) true - $(SolutionDir)include;$(SolutionDir)libs\platform;$(SolutionDir)libs\platform\user;$(SolutionDir)external\usersim\inc;$(OutputPath);$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)include\user;$(SolutionDir)netebpfext;$(SolutionDir)netebpfext\user;$(SolutionDir)libs\thunk;$(SolutionDir)tests\libs\util;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;%(AdditionalIncludeDirectories) + $(SolutionDir)include;$(SolutionDir)libs\platform;$(SolutionDir)libs\platform\user;$(SolutionDir)external\usersim\inc;$(SolutionDir)external\usersim\src;$(OutputPath);$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)include\user;$(SolutionDir)netebpfext;$(SolutionDir)netebpfext\user;$(SolutionDir)libs\thunk;$(SolutionDir)tests\libs\util;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;%(AdditionalIncludeDirectories) /Zc:strictStrings- %(AdditionalOptions) CompileAsCpp 4505 @@ -94,7 +94,7 @@ _DEBUG;_CONSOLE;USER_MODE;%(PreprocessorDefinitions) true - $(SolutionDir)include;$(SolutionDir)libs\platform;$(SolutionDir)libs\platform\user;$(SolutionDir)external\usersim\inc;$(OutputPath);$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)include\user;$(SolutionDir)netebpfext;$(SolutionDir)netebpfext\user;$(SolutionDir)libs\thunk;$(SolutionDir)tests\libs\util;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;%(AdditionalIncludeDirectories) + $(SolutionDir)include;$(SolutionDir)libs\platform;$(SolutionDir)libs\platform\user;$(SolutionDir)external\usersim\inc;$(SolutionDir)external\usersim\src;$(OutputPath);$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)include\user;$(SolutionDir)netebpfext;$(SolutionDir)netebpfext\user;$(SolutionDir)libs\thunk;$(SolutionDir)tests\libs\util;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;%(AdditionalIncludeDirectories) /Zc:strictStrings- %(AdditionalOptions) CompileAsCpp 4505 @@ -113,7 +113,7 @@ true NDEBUG;_CONSOLE;USER_MODE;%(PreprocessorDefinitions) - $(SolutionDir)include;$(SolutionDir)libs\platform;$(SolutionDir)libs\platform\user;$(SolutionDir)external\usersim\inc;$(OutputPath);$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)include\user;$(SolutionDir)netebpfext;$(SolutionDir)netebpfext\user;$(SolutionDir)libs\thunk;$(SolutionDir)tests\libs\util;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;%(AdditionalIncludeDirectories) + $(SolutionDir)include;$(SolutionDir)libs\platform;$(SolutionDir)libs\platform\user;$(SolutionDir)external\usersim\inc;$(SolutionDir)external\usersim\src;$(OutputPath);$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)include\user;$(SolutionDir)netebpfext;$(SolutionDir)netebpfext\user;$(SolutionDir)libs\thunk;$(SolutionDir)tests\libs\util;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;%(AdditionalIncludeDirectories) CompileAsCpp /Zc:strictStrings- %(AdditionalOptions) 4505 diff --git a/scripts/config_test_vm.psm1 b/scripts/config_test_vm.psm1 index a1fb38ded8..2b7645d214 100644 --- a/scripts/config_test_vm.psm1 +++ b/scripts/config_test_vm.psm1 @@ -313,27 +313,17 @@ function Initialize-NetworkInterfacesOnVMs $TestCredential = New-Credential -Username $Admin -AdminPassword $AdminPassword Invoke-Command -VMName $VMName -Credential $TestCredential -ScriptBlock { - param([Parameter(Mandatory=$True)] $InterfaceList, - [Parameter(Mandatory=$True)] [string] $WorkingDirectory, - [Parameter(Mandatory=$True)] [string] $LogFileName) - $WorkingDirectory = "$env:SystemDrive\$WorkingDirectory" - Import-Module $WorkingDirectory\common.psm1 -ArgumentList ($LogFileName) -Force -WarningAction SilentlyContinue + param([Parameter(Mandatory=$True)] [string] $WorkingDirectory) - foreach ($Interface in $InterfaceList) { - $InterfaceAlias = $Interface.Alias - $V4Address = $Interface.V4Address - Write-Log "Adding $V4Address on $InterfaceAlias" - Remove-NetIPAddress -ifAlias "$InterfaceAlias" -IPAddress $V4Address -PolicyStore "All" -Confirm:$false -ErrorAction Ignore | Out-Null - New-NetIPAddress -ifAlias "$InterfaceAlias" -IPAddress $V4Address -PrefixLength 24 -ErrorAction Stop | Out-Null - Write-Log "Address configured." - - $V6Address = $Interface.V6Address - Write-Log "Adding $V6Address on $InterfaceAlias" - Remove-NetIPAddress -ifAlias "$InterfaceAlias" -IPAddress $V6Address* -PolicyStore "All" -Confirm:$false -ErrorAction Ignore | Out-Null - New-NetIPAddress -ifAlias "$InterfaceAlias" -IPAddress $V6Address -PrefixLength 64 -ErrorAction Stop | Out-Null - Write-Log "Address configured." - } - } -ArgumentList ($Interfaces, "eBPF", $LogFileName) -ErrorAction Stop + Push-Location "$env:SystemDrive\$WorkingDirectory" + + Write-Host "Installing DuoNic driver" + .\duonic.ps1 -Install -NumNicPairs 2 + # Disable Duonic's fake checksum offload and force TCP/IP to calculate it. + Set-NetAdapterAdvancedProperty duo? -DisplayName Checksum -RegistryValue 0 + + Pop-Location + } -ArgumentList ("eBPF") -ErrorAction Stop } } @@ -362,3 +352,15 @@ function Get-RegressionTestArtifacts Remove-Item -Path $DownloadPath -Force -Recurse } } + +# Copied from https://github.com/microsoft/msquic/blob/main/scripts/prepare-machine.ps1 +function Get-Duonic { + # Download and extract https://github.com/microsoft/corenet-ci. + $DownloadPath = "$pwd\corenet-ci" + mkdir $DownloadPath + Write-Host "Downloading CoreNet-CI" + Invoke-WebRequest -Uri "https://github.com/microsoft/corenet-ci/archive/refs/heads/main.zip" -OutFile "$DownloadPath\corenet-ci.zip" + Expand-Archive -Path "$DownloadPath\corenet-ci.zip" -DestinationPath $DownloadPath -Force + Move-Item -Path "$DownloadPath\corenet-ci-main\vm-setup\duonic\*" -Destination $pwd -Force + Remove-Item -Path $DownloadPath -Force -Recurse +} diff --git a/scripts/setup_ebpf_cicd_tests.ps1 b/scripts/setup_ebpf_cicd_tests.ps1 index 6d2f1584b6..b143e04360 100644 --- a/scripts/setup_ebpf_cicd_tests.ps1 +++ b/scripts/setup_ebpf_cicd_tests.ps1 @@ -37,6 +37,8 @@ Initialize-AllVMs -VMList $VMList -ErrorAction Stop # Download the release artifacts for regression tests. Get-RegressionTestArtifacts +Get-Duonic + # Export build artifacts to the test VMs. Export-BuildArtifactsToVMs -VMList $VMList -ErrorAction Stop diff --git a/scripts/test_execution.json b/scripts/test_execution.json index 3b89b8c1a7..8590945652 100644 --- a/scripts/test_execution.json +++ b/scripts/test_execution.json @@ -13,33 +13,32 @@ "Interfaces": [ { - "Alias": "Ethernet", - "V4Address": "20.0.0.1", - "V6Address": "2001:db8::1" + "Alias": "duo1", + "V4Address": "192.168.1.11", + "V6Address": "fc00::1:11" }, { - "Alias": "Ethernet 2", - "V4Address": "20.0.0.2", - "V6Address": "2001:db8::2" - } - ] - }, - { - "Name": "vm2", - "Interfaces": - [ + "Alias": "duo2", + "V4Address": "192.168.1.12", + "V6Address": "fc00::1:12" + }, + { + "Alias": "duo3", + "V4Address": "192.168.2.11", + "V6Address": "fc00::2:11" + }, { - "Alias": "Ethernet", - "V4Address": "20.0.0.3", - "V6Address": "2001:db8::3" + "Alias": "duo4", + "V4Address": "192.168.2.12", + "V6Address": "fc00::2:12" } ] } ], "ConnectRedirectTest": { - "V4VipAddress": "20.0.0.100", - "V6VipAddress": "2001:db8::100", + "V4VipAddress": "192.168.1.100", + "V6VipAddress": "fc00::1:100", "DestinationPort": 4444, "ProxyPort": 4443 } diff --git a/scripts/vm_list.json b/scripts/vm_list.json index 1cd878a703..bdb14f207d 100644 --- a/scripts/vm_list.json +++ b/scripts/vm_list.json @@ -5,9 +5,6 @@ [ { "Name": "vm1" - }, - { - "Name": "vm2" } ] } \ No newline at end of file diff --git a/scripts/vm_run_tests.psm1 b/scripts/vm_run_tests.psm1 index 2a6f2a4d53..c76185755d 100644 --- a/scripts/vm_run_tests.psm1 +++ b/scripts/vm_run_tests.psm1 @@ -243,7 +243,6 @@ function Add-FirewallRuleOnVM { function Invoke-XDPTest1 { param([Parameter(Mandatory=$True)] [string] $VM1, - [Parameter(Mandatory=$True)] [string] $VM2, [Parameter(Mandatory=$True)] [string] $VM1Interface1V4Address, [Parameter(Mandatory=$True)] [string] $VM1Interface1V6Address, [Parameter(Mandatory=$True)] [string] $VM1Interface2V4Address, @@ -256,8 +255,8 @@ function Invoke-XDPTest1 $ProgId = Add-eBPFProgramOnVM -VM $VM1 -Program "reflect_packet.sys" -LogFileName $LogFileName # Run XDP reflect test from VM2 targeting both interfaces of VM1. - Invoke-XDPTestOnVM $VM2 "xdp_reflect_test" $VM1Interface1V4Address $VM1Interface1V6Address $LogFileName - Invoke-XDPTestOnVM $VM2 "xdp_reflect_test" $VM1Interface2V4Address $VM1Interface2V6Address $LogFileName + Invoke-XDPTestOnVM $VM1 "xdp_reflect_test" $VM1Interface1V4Address $VM1Interface1V6Address $LogFileName + Invoke-XDPTestOnVM $VM1 "xdp_reflect_test" $VM1Interface2V4Address $VM1Interface2V6Address $LogFileName # Unload program from VM1. Remove-eBPFProgramFromVM $VM1 $ProgId $LogFileName @@ -268,7 +267,6 @@ function Invoke-XDPTest1 function Invoke-XDPTest2 { param([Parameter(Mandatory=$True)] [string] $VM1, - [Parameter(Mandatory=$True)] [string] $VM2, [Parameter(Mandatory=$True)] [string] $VM1Interface1Alias, [Parameter(Mandatory=$True)] [string] $VM1Interface2Alias, [Parameter(Mandatory=$True)] [string] $VM1Interface1V4Address, @@ -286,8 +284,8 @@ function Invoke-XDPTest2 Set-eBPFProgramOnVM -VM $VM1 -ProgId $ProgId -Interface $VM1Interface2Alias -LogFileName $LogFileName # Run XDP reflect test from VM2 targeting both interfaces of VM1. - Invoke-XDPTestOnVM $VM2 "xdp_reflect_test" $VM1Interface1V4Address $VM1Interface1V6Address $LogFileName - Invoke-XDPTestOnVM $VM2 "xdp_reflect_test" $VM1Interface2V4Address $VM1Interface2V6Address $LogFileName + Invoke-XDPTestOnVM $VM1 "xdp_reflect_test" $VM1Interface1V4Address $VM1Interface1V6Address $LogFileName + Invoke-XDPTestOnVM $VM1 "xdp_reflect_test" $VM1Interface2V4Address $VM1Interface2V6Address $LogFileName # Unload program from VM1. Remove-eBPFProgramFromVM $VM1 $ProgId $LogFileName @@ -298,7 +296,6 @@ function Invoke-XDPTest2 function Invoke-XDPTest3 { param([Parameter(Mandatory=$True)] [string] $VM1, - [Parameter(Mandatory=$True)] [string] $VM2, [Parameter(Mandatory=$True)] [string] $VM1Interface1Alias, [Parameter(Mandatory=$True)] [string] $VM1Interface2Alias, [Parameter(Mandatory=$True)] [string] $VM1Interface1V4Address, @@ -316,10 +313,10 @@ function Invoke-XDPTest3 $ProgId2 = Add-eBPFProgramOnVM -VM $VM1 -Program "encap_reflect_packet.sys" -Interface $VM1Interface2Alias -LogFileName $LogFileName # Run XDP reflect test from VM2 targeting first interface of VM1. - Invoke-XDPTestOnVM $VM2 "xdp_reflect_test" $VM1Interface1V4Address $VM1Interface1V6Address $LogFileName + Invoke-XDPTestOnVM $VM1 "xdp_reflect_test" $VM1Interface1V4Address $VM1Interface1V6Address $LogFileName # Run XDP encap reflect test from VM2 targeting second interface of VM1. - Invoke-XDPTestOnVM $VM2 "xdp_encap_reflect_test" $VM1Interface2V4Address $VM1Interface2V6Address $LogFileName + Invoke-XDPTestOnVM $VM1 "xdp_encap_reflect_test" $VM1Interface2V4Address $VM1Interface2V6Address $LogFileName # Unload programs from VM1. Remove-eBPFProgramFromVM $VM1 $ProgId1 $LogFileName @@ -331,26 +328,27 @@ function Invoke-XDPTest3 function Invoke-XDPTest4 { param([Parameter(Mandatory=$True)] [string] $VM1, - [Parameter(Mandatory=$True)] [string] $VM2, [Parameter(Mandatory=$True)] [string] $VM1Interface1V4Address, [Parameter(Mandatory=$True)] [string] $VM1Interface1V6Address, + [Parameter(Mandatory=$True)] [string] $VM1Interface1Alias, + [Parameter(Mandatory=$True)] [string] $VM2Interface1Alias, [Parameter(Mandatory=$True)] [string] $LogFileName) Write-Log "Running XDP Test4 ..." # Load encap_reflect_packet on VM1. - $ProgId1 = Add-eBPFProgramOnVM -VM $VM1 -Program "encap_reflect_packet.sys" -LogFileName $LogFileName + $ProgId1 = Add-eBPFProgramOnVM -VM $VM1 -Program "encap_reflect_packet.sys" -Interface $VM1Interface1Alias -LogFileName $LogFileName # Load decap_permit_packet on VM2. - $ProgId2 = Add-eBPFProgramOnVM -VM $VM2 -Program "decap_permit_packet.sys" -LogFileName $LogFileName + $ProgId2 = Add-eBPFProgramOnVM -VM $VM1 -Program "decap_permit_packet.sys" -Interface $VM2Interface1Alias -LogFileName $LogFileName # Run XDP reflect test from VM2 targeting first interface of VM1. - Invoke-XDPTestOnVM $VM2 "xdp_reflect_test" $VM1Interface1V4Address $VM1Interface1V6Address $LogFileName + Invoke-XDPTestOnVM $VM1 "xdp_reflect_test" $VM1Interface1V4Address $VM1Interface1V6Address $LogFileName # Unload program from VM1. Remove-eBPFProgramFromVM $VM1 $ProgId1 $LogFileName - # Unload program from VM2. - Remove-eBPFProgramFromVM $VM2 $ProgId2 $LogFileName + # Unload program from VM1. + Remove-eBPFProgramFromVM $VM1 $ProgId2 $LogFileName Write-Log "XDP Test4 succeeded." -ForegroundColor Green } @@ -359,23 +357,29 @@ function Invoke-XDPTestsOnVM { param([parameter(Mandatory=$true)] $MultiVMTestConfig) + # NIC pairs are duo1-duo2 and duo3-duo4. + # VM1 is interfaces duo1 and duo3. + # VM2 is interfaces duo2 and duo4. + $VM1 = $MultiVMTestConfig[0] $VM1Interface1 = $VM1.Interfaces[0] $VM1Interface1Alias = $VM1Interface1.Alias $VM1Interface1V4Address = $VM1Interface1.V4Address $VM1Interface1V6Address = $VM1Interface1.V6Address - $VM1Interface2 = $VM1.Interfaces[1] + + $VM2Interface1 = $VM1.Interfaces[1] + $VM2Interface1Alias = $VM2Interface1.Alias + + $VM1Interface2 = $VM1.Interfaces[2] $VM1Interface2Alias = $VM1Interface2.Alias $VM1Interface2V4Address = $VM1Interface2.V4Address - $VM1Interface2V6Address = $VM1Interface2.V6Address - - $VM2 = $MultiVMTestConfig[1] + $VM1Interface3V6Address = $VM1Interface2.V6Address - Add-FirewallRuleOnVM -VM $VM2.Name -RuleName "XDP_Test" -ProgramName "xdp_tests.exe" -LogFileName $LogFileName - Invoke-XDPTest1 $VM1.Name $VM2.Name $VM1Interface1V4Address $VM1Interface1V6Address $VM1Interface2V4Address $VM1Interface2V6Address $LogFileName - Invoke-XDPTest2 $VM1.Name $VM2.Name $VM1Interface1Alias $VM1Interface2Alias $VM1Interface1V4Address $VM1Interface1V6Address $VM1Interface2V4Address $VM1Interface2V6Address $LogFileName - Invoke-XDPTest3 $VM1.Name $VM2.Name $VM1Interface1Alias $VM1Interface2Alias $VM1Interface1V4Address $VM1Interface1V6Address $VM1Interface2V4Address $VM1Interface2V6Address $LogFileName - Invoke-XDPTest4 $VM1.Name $VM2.Name $VM1Interface1V4Address $VM1Interface1V6Address $LogFileName + Add-FirewallRuleOnVM -VM $VM1.Name -RuleName "XDP_Test" -ProgramName "xdp_tests.exe" -LogFileName $LogFileName + Invoke-XDPTest1 $VM1.Name $VM1Interface1V4Address $VM1Interface1V6Address $VM1Interface2V4Address $VM1Interface3V6Address $LogFileName + Invoke-XDPTest2 $VM1.Name $VM1Interface1Alias $VM1Interface2Alias $VM1Interface1V4Address $VM1Interface1V6Address $VM1Interface2V4Address $VM1Interface3V6Address $LogFileName + Invoke-XDPTest3 $VM1.Name $VM1Interface1Alias $VM1Interface2Alias $VM1Interface1V4Address $VM1Interface1V6Address $VM1Interface2V4Address $VM1Interface3V6Address $LogFileName + Invoke-XDPTest4 $VM1.Name $VM1Interface1V4Address $VM1Interface1V6Address $VM1Interface1Alias $VM2Interface1Alias $LogFileName } function Invoke-ConnectRedirectTestsOnVM @@ -389,8 +393,7 @@ function Invoke-ConnectRedirectTestsOnVM $VM1V4Address = $VM1Interface.V4Address $VM1V6Address = $VM1Interface.V6Address - $VM2 = $MultiVMTestConfig[1] - $VM2Interface = $VM2.Interfaces[0] + $VM2Interface = $VM1.Interfaces[1] $VM2V4Address = $VM2Interface.V4Address $VM2V6Address = $VM2Interface.V6Address @@ -406,10 +409,9 @@ function Invoke-ConnectRedirectTestsOnVM $UdpProxyParameters = "--protocol udp --local-port $ProxyPort" $ParamaterArray = @($TcpServerParameters, $TcpProxyParameters, $UdpServerParameters, $UdpProxyParameters) - $VMArray = @($VM1.Name, $VM2.Name) + $VMArray = @($VM1.Name) Add-FirewallRuleOnVM -VM $VM1.Name -RuleName "Redirect_Test" -ProgramName $ProgramName -LogFileName $LogFileName - Add-FirewallRuleOnVM -VM $VM2.Name -RuleName "Redirect_Test" -ProgramName $ProgramName -LogFileName $LogFileName # Start TCP and UDP listeners on both the VMs. foreach ($vm in $VMArray) @@ -477,7 +479,6 @@ function Invoke-ConnectRedirectTestsOnVM } -ArgumentList ($VM1.Name, $VM1V4Address, $VM1V6Address, $VM2V4Address, $VM2V6Address, $VipV4Address, $VipV6Address, $DestinationPort, $ProxyPort, $StandardUser, $UnsecurePassword, $UserType, "eBPF", $LogFileName) -ErrorAction Stop Stop-ProcessOnVM -VM $VM1.Name -ProgramName $ProgramName - Stop-ProcessOnVM -VM $VM2.Name -ProgramName $ProgramName # Remove standard user on VM1. Remove-StandardUserOnVM -VM $VM1.Name -UserName $StandardUser diff --git a/tests/api_test/api_test.cpp b/tests/api_test/api_test.cpp index e369897d22..4d73138008 100644 --- a/tests/api_test/api_test.cpp +++ b/tests/api_test/api_test.cpp @@ -437,7 +437,11 @@ ring_buffer_api_test(ebpf_execution_type_t execution_type) std::vector> app_ids; char* p = reinterpret_cast(&app_id[0]); std::vector temp(p, p + (app_id.size() + 1) * sizeof(wchar_t)); - app_ids.push_back(temp); + + // ring_buffer_api_test_helper expects a list of app IDs of size RING_BUFFER_TEST_EVENT_COUNT. + for (auto i = 0; i < RING_BUFFER_TEST_EVENT_COUNT; i++) { + app_ids.push_back(temp); + } ring_buffer_api_test_helper(process_map_fd, app_ids, [](int i) { const uint16_t _test_port = 12345 + static_cast(i); diff --git a/tests/bpf2c_tests/expected/encap_reflect_packet_dll.c b/tests/bpf2c_tests/expected/encap_reflect_packet_dll.c index fff4a129ee..62d4edfb28 100644 --- a/tests/bpf2c_tests/expected/encap_reflect_packet_dll.c +++ b/tests/bpf2c_tests/expected/encap_reflect_packet_dll.c @@ -57,120 +57,124 @@ static GUID encap_reflect_packet_attach_type_guid = { #pragma code_seg(push, "xdp/en~1") static uint64_t encap_reflect_packet(void* context) -#line 149 "sample/encap_reflect_packet.c" +#line 167 "sample/encap_reflect_packet.c" { -#line 149 "sample/encap_reflect_packet.c" +#line 167 "sample/encap_reflect_packet.c" // Prologue -#line 149 "sample/encap_reflect_packet.c" +#line 167 "sample/encap_reflect_packet.c" uint64_t stack[(UBPF_STACK_SIZE + 7) / 8]; -#line 149 "sample/encap_reflect_packet.c" +#line 167 "sample/encap_reflect_packet.c" register uint64_t r0 = 0; -#line 149 "sample/encap_reflect_packet.c" +#line 167 "sample/encap_reflect_packet.c" register uint64_t r1 = 0; -#line 149 "sample/encap_reflect_packet.c" +#line 167 "sample/encap_reflect_packet.c" register uint64_t r2 = 0; -#line 149 "sample/encap_reflect_packet.c" +#line 167 "sample/encap_reflect_packet.c" register uint64_t r3 = 0; -#line 149 "sample/encap_reflect_packet.c" +#line 167 "sample/encap_reflect_packet.c" register uint64_t r4 = 0; -#line 149 "sample/encap_reflect_packet.c" +#line 167 "sample/encap_reflect_packet.c" register uint64_t r5 = 0; -#line 149 "sample/encap_reflect_packet.c" +#line 167 "sample/encap_reflect_packet.c" register uint64_t r6 = 0; -#line 149 "sample/encap_reflect_packet.c" +#line 167 "sample/encap_reflect_packet.c" + register uint64_t r7 = 0; +#line 167 "sample/encap_reflect_packet.c" + register uint64_t r8 = 0; +#line 167 "sample/encap_reflect_packet.c" register uint64_t r10 = 0; -#line 149 "sample/encap_reflect_packet.c" +#line 167 "sample/encap_reflect_packet.c" r1 = (uintptr_t)context; -#line 149 "sample/encap_reflect_packet.c" +#line 167 "sample/encap_reflect_packet.c" r10 = (uintptr_t)((uint8_t*)stack + sizeof(stack)); // EBPF_OP_MOV64_REG pc=0 dst=r6 src=r1 offset=0 imm=0 -#line 149 "sample/encap_reflect_packet.c" +#line 167 "sample/encap_reflect_packet.c" r6 = r1; // EBPF_OP_MOV64_IMM pc=1 dst=r0 src=r0 offset=0 imm=1 -#line 149 "sample/encap_reflect_packet.c" +#line 167 "sample/encap_reflect_packet.c" r0 = IMMEDIATE(1); // EBPF_OP_LDXDW pc=2 dst=r1 src=r6 offset=8 imm=0 -#line 155 "sample/encap_reflect_packet.c" +#line 173 "sample/encap_reflect_packet.c" r1 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(8)); // EBPF_OP_LDXDW pc=3 dst=r2 src=r6 offset=0 imm=0 -#line 154 "sample/encap_reflect_packet.c" +#line 172 "sample/encap_reflect_packet.c" r2 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(0)); // EBPF_OP_MOV64_REG pc=4 dst=r3 src=r2 offset=0 imm=0 -#line 155 "sample/encap_reflect_packet.c" +#line 173 "sample/encap_reflect_packet.c" r3 = r2; // EBPF_OP_ADD64_IMM pc=5 dst=r3 src=r0 offset=0 imm=14 -#line 155 "sample/encap_reflect_packet.c" +#line 173 "sample/encap_reflect_packet.c" r3 += IMMEDIATE(14); - // EBPF_OP_JGT_REG pc=6 dst=r3 src=r1 offset=290 imm=0 -#line 155 "sample/encap_reflect_packet.c" + // EBPF_OP_JGT_REG pc=6 dst=r3 src=r1 offset=315 imm=0 +#line 173 "sample/encap_reflect_packet.c" if (r3 > r1) -#line 155 "sample/encap_reflect_packet.c" - goto label_3; +#line 173 "sample/encap_reflect_packet.c" + goto label_5; // EBPF_OP_LDXH pc=7 dst=r4 src=r2 offset=12 imm=0 -#line 160 "sample/encap_reflect_packet.c" +#line 178 "sample/encap_reflect_packet.c" r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(12)); - // EBPF_OP_JEQ_IMM pc=8 dst=r4 src=r0 offset=105 imm=56710 -#line 160 "sample/encap_reflect_packet.c" + // EBPF_OP_JEQ_IMM pc=8 dst=r4 src=r0 offset=120 imm=56710 +#line 178 "sample/encap_reflect_packet.c" if (r4 == IMMEDIATE(56710)) -#line 160 "sample/encap_reflect_packet.c" - goto label_1; - // EBPF_OP_JNE_IMM pc=9 dst=r4 src=r0 offset=287 imm=8 -#line 160 "sample/encap_reflect_packet.c" +#line 178 "sample/encap_reflect_packet.c" + goto label_2; + // EBPF_OP_JNE_IMM pc=9 dst=r4 src=r0 offset=312 imm=8 +#line 178 "sample/encap_reflect_packet.c" if (r4 != IMMEDIATE(8)) -#line 160 "sample/encap_reflect_packet.c" - goto label_3; +#line 178 "sample/encap_reflect_packet.c" + goto label_5; // EBPF_OP_MOV64_REG pc=10 dst=r4 src=r2 offset=0 imm=0 -#line 161 "sample/encap_reflect_packet.c" +#line 179 "sample/encap_reflect_packet.c" r4 = r2; // EBPF_OP_ADD64_IMM pc=11 dst=r4 src=r0 offset=0 imm=34 -#line 161 "sample/encap_reflect_packet.c" +#line 179 "sample/encap_reflect_packet.c" r4 += IMMEDIATE(34); - // EBPF_OP_JGT_REG pc=12 dst=r4 src=r1 offset=284 imm=0 -#line 161 "sample/encap_reflect_packet.c" + // EBPF_OP_JGT_REG pc=12 dst=r4 src=r1 offset=309 imm=0 +#line 179 "sample/encap_reflect_packet.c" if (r4 > r1) -#line 161 "sample/encap_reflect_packet.c" - goto label_3; +#line 179 "sample/encap_reflect_packet.c" + goto label_5; // EBPF_OP_LDXB pc=13 dst=r4 src=r2 offset=23 imm=0 -#line 167 "sample/encap_reflect_packet.c" +#line 185 "sample/encap_reflect_packet.c" r4 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(23)); - // EBPF_OP_JNE_IMM pc=14 dst=r4 src=r0 offset=282 imm=17 -#line 167 "sample/encap_reflect_packet.c" + // EBPF_OP_JNE_IMM pc=14 dst=r4 src=r0 offset=307 imm=17 +#line 185 "sample/encap_reflect_packet.c" if (r4 != IMMEDIATE(17)) -#line 167 "sample/encap_reflect_packet.c" - goto label_3; +#line 185 "sample/encap_reflect_packet.c" + goto label_5; // EBPF_OP_LDXB pc=15 dst=r2 src=r2 offset=14 imm=0 -#line 167 "sample/encap_reflect_packet.c" +#line 185 "sample/encap_reflect_packet.c" r2 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(14)); // EBPF_OP_LSH64_IMM pc=16 dst=r2 src=r0 offset=0 imm=2 -#line 167 "sample/encap_reflect_packet.c" +#line 185 "sample/encap_reflect_packet.c" r2 <<= (IMMEDIATE(2) & 63); // EBPF_OP_AND64_IMM pc=17 dst=r2 src=r0 offset=0 imm=60 -#line 167 "sample/encap_reflect_packet.c" +#line 185 "sample/encap_reflect_packet.c" r2 &= IMMEDIATE(60); // EBPF_OP_ADD64_REG pc=18 dst=r3 src=r2 offset=0 imm=0 -#line 167 "sample/encap_reflect_packet.c" +#line 185 "sample/encap_reflect_packet.c" r3 += r2; // EBPF_OP_MOV64_REG pc=19 dst=r2 src=r3 offset=0 imm=0 -#line 167 "sample/encap_reflect_packet.c" +#line 185 "sample/encap_reflect_packet.c" r2 = r3; // EBPF_OP_ADD64_IMM pc=20 dst=r2 src=r0 offset=0 imm=8 -#line 167 "sample/encap_reflect_packet.c" +#line 185 "sample/encap_reflect_packet.c" r2 += IMMEDIATE(8); - // EBPF_OP_JGT_REG pc=21 dst=r2 src=r1 offset=275 imm=0 -#line 167 "sample/encap_reflect_packet.c" + // EBPF_OP_JGT_REG pc=21 dst=r2 src=r1 offset=300 imm=0 +#line 185 "sample/encap_reflect_packet.c" if (r2 > r1) -#line 167 "sample/encap_reflect_packet.c" - goto label_3; +#line 185 "sample/encap_reflect_packet.c" + goto label_5; // EBPF_OP_LDXH pc=22 dst=r1 src=r3 offset=2 imm=0 -#line 173 "sample/encap_reflect_packet.c" +#line 191 "sample/encap_reflect_packet.c" r1 = *(uint16_t*)(uintptr_t)(r3 + OFFSET(2)); - // EBPF_OP_JNE_IMM pc=23 dst=r1 src=r0 offset=273 imm=7459 -#line 173 "sample/encap_reflect_packet.c" + // EBPF_OP_JNE_IMM pc=23 dst=r1 src=r0 offset=298 imm=7459 +#line 191 "sample/encap_reflect_packet.c" if (r1 != IMMEDIATE(7459)) -#line 173 "sample/encap_reflect_packet.c" - goto label_3; +#line 191 "sample/encap_reflect_packet.c" + goto label_5; // EBPF_OP_MOV64_REG pc=24 dst=r1 src=r6 offset=0 imm=0 #line 22 "sample/encap_reflect_packet.c" r1 = r6; @@ -201,850 +205,935 @@ encap_reflect_packet(void* context) // EBPF_OP_MOV64_IMM pc=32 dst=r2 src=r0 offset=0 imm=0 #line 22 "sample/encap_reflect_packet.c" r2 = IMMEDIATE(0); - // EBPF_OP_JSGT_REG pc=33 dst=r2 src=r1 offset=263 imm=0 + // EBPF_OP_JSGT_REG pc=33 dst=r2 src=r1 offset=288 imm=0 #line 22 "sample/encap_reflect_packet.c" if ((int64_t)r2 > (int64_t)r1) #line 22 "sample/encap_reflect_packet.c" - goto label_3; + goto label_5; // EBPF_OP_LDXDW pc=34 dst=r4 src=r6 offset=8 imm=0 #line 28 "sample/encap_reflect_packet.c" r4 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(8)); - // EBPF_OP_LDXDW pc=35 dst=r6 src=r6 offset=0 imm=0 + // EBPF_OP_LDXDW pc=35 dst=r7 src=r6 offset=0 imm=0 #line 27 "sample/encap_reflect_packet.c" - r6 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(0)); - // EBPF_OP_MOV64_REG pc=36 dst=r3 src=r6 offset=0 imm=0 + r7 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(0)); + // EBPF_OP_MOV64_REG pc=36 dst=r3 src=r7 offset=0 imm=0 #line 28 "sample/encap_reflect_packet.c" - r3 = r6; + r3 = r7; // EBPF_OP_ADD64_IMM pc=37 dst=r3 src=r0 offset=0 imm=14 #line 28 "sample/encap_reflect_packet.c" r3 += IMMEDIATE(14); - // EBPF_OP_JGT_REG pc=38 dst=r3 src=r4 offset=258 imm=0 + // EBPF_OP_JGT_REG pc=38 dst=r3 src=r4 offset=283 imm=0 #line 28 "sample/encap_reflect_packet.c" if (r3 > r4) #line 28 "sample/encap_reflect_packet.c" - goto label_3; - // EBPF_OP_MOV64_REG pc=39 dst=r2 src=r6 offset=0 imm=0 + goto label_5; + // EBPF_OP_MOV64_REG pc=39 dst=r2 src=r7 offset=0 imm=0 #line 35 "sample/encap_reflect_packet.c" - r2 = r6; + r2 = r7; // EBPF_OP_ADD64_IMM pc=40 dst=r2 src=r0 offset=0 imm=20 #line 35 "sample/encap_reflect_packet.c" r2 += IMMEDIATE(20); - // EBPF_OP_JGT_REG pc=41 dst=r2 src=r4 offset=255 imm=0 + // EBPF_OP_JGT_REG pc=41 dst=r2 src=r4 offset=280 imm=0 #line 35 "sample/encap_reflect_packet.c" if (r2 > r4) #line 35 "sample/encap_reflect_packet.c" - goto label_3; - // EBPF_OP_MOV64_REG pc=42 dst=r1 src=r6 offset=0 imm=0 + goto label_5; + // EBPF_OP_MOV64_REG pc=42 dst=r1 src=r7 offset=0 imm=0 #line 43 "sample/encap_reflect_packet.c" - r1 = r6; + r1 = r7; // EBPF_OP_ADD64_IMM pc=43 dst=r1 src=r0 offset=0 imm=34 #line 43 "sample/encap_reflect_packet.c" r1 += IMMEDIATE(34); - // EBPF_OP_JGT_REG pc=44 dst=r1 src=r4 offset=252 imm=0 + // EBPF_OP_JGT_REG pc=44 dst=r1 src=r4 offset=277 imm=0 #line 43 "sample/encap_reflect_packet.c" if (r1 > r4) #line 43 "sample/encap_reflect_packet.c" - goto label_3; - // EBPF_OP_MOV64_REG pc=45 dst=r5 src=r6 offset=0 imm=0 + goto label_5; + // EBPF_OP_MOV64_REG pc=45 dst=r5 src=r7 offset=0 imm=0 #line 43 "sample/encap_reflect_packet.c" - r5 = r6; + r5 = r7; // EBPF_OP_ADD64_IMM pc=46 dst=r5 src=r0 offset=0 imm=54 #line 43 "sample/encap_reflect_packet.c" r5 += IMMEDIATE(54); - // EBPF_OP_JGT_REG pc=47 dst=r5 src=r4 offset=249 imm=0 + // EBPF_OP_JGT_REG pc=47 dst=r5 src=r4 offset=274 imm=0 #line 43 "sample/encap_reflect_packet.c" if (r5 > r4) #line 43 "sample/encap_reflect_packet.c" - goto label_3; + goto label_5; // EBPF_OP_LDXH pc=48 dst=r4 src=r2 offset=4 imm=0 #line 56 "sample/encap_reflect_packet.c" r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(4)); - // EBPF_OP_STXH pc=49 dst=r6 src=r4 offset=4 imm=0 + // EBPF_OP_STXH pc=49 dst=r7 src=r4 offset=4 imm=0 #line 56 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(4)) = (uint16_t)r4; + *(uint16_t*)(uintptr_t)(r7 + OFFSET(4)) = (uint16_t)r4; // EBPF_OP_LDXH pc=50 dst=r4 src=r2 offset=0 imm=0 #line 56 "sample/encap_reflect_packet.c" r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(0)); - // EBPF_OP_STXH pc=51 dst=r6 src=r4 offset=0 imm=0 + // EBPF_OP_STXH pc=51 dst=r7 src=r4 offset=0 imm=0 #line 56 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(0)) = (uint16_t)r4; + *(uint16_t*)(uintptr_t)(r7 + OFFSET(0)) = (uint16_t)r4; // EBPF_OP_LDXH pc=52 dst=r4 src=r2 offset=2 imm=0 #line 56 "sample/encap_reflect_packet.c" r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(2)); - // EBPF_OP_STXH pc=53 dst=r6 src=r4 offset=2 imm=0 + // EBPF_OP_STXH pc=53 dst=r7 src=r4 offset=2 imm=0 #line 56 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(2)) = (uint16_t)r4; + *(uint16_t*)(uintptr_t)(r7 + OFFSET(2)) = (uint16_t)r4; // EBPF_OP_LDXH pc=54 dst=r4 src=r2 offset=12 imm=0 #line 56 "sample/encap_reflect_packet.c" r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(12)); - // EBPF_OP_STXH pc=55 dst=r6 src=r4 offset=12 imm=0 + // EBPF_OP_STXH pc=55 dst=r7 src=r4 offset=12 imm=0 #line 56 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(12)) = (uint16_t)r4; + *(uint16_t*)(uintptr_t)(r7 + OFFSET(12)) = (uint16_t)r4; // EBPF_OP_LDXH pc=56 dst=r4 src=r2 offset=10 imm=0 #line 56 "sample/encap_reflect_packet.c" r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(10)); - // EBPF_OP_STXH pc=57 dst=r6 src=r4 offset=10 imm=0 + // EBPF_OP_STXH pc=57 dst=r7 src=r4 offset=10 imm=0 #line 56 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(10)) = (uint16_t)r4; + *(uint16_t*)(uintptr_t)(r7 + OFFSET(10)) = (uint16_t)r4; // EBPF_OP_LDXH pc=58 dst=r5 src=r2 offset=8 imm=0 #line 56 "sample/encap_reflect_packet.c" r5 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(8)); - // EBPF_OP_LDXH pc=59 dst=r0 src=r2 offset=6 imm=0 + // EBPF_OP_LDXH pc=59 dst=r8 src=r2 offset=6 imm=0 #line 56 "sample/encap_reflect_packet.c" - r0 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(6)); - // EBPF_OP_STXH pc=60 dst=r6 src=r4 offset=4 imm=0 + r8 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(6)); + // EBPF_OP_STXH pc=60 dst=r7 src=r4 offset=4 imm=0 #line 16 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(4)) = (uint16_t)r4; - // EBPF_OP_STXH pc=61 dst=r6 src=r0 offset=6 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(4)) = (uint16_t)r4; + // EBPF_OP_STXH pc=61 dst=r7 src=r8 offset=6 imm=0 #line 56 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(6)) = (uint16_t)r0; - // EBPF_OP_STXH pc=62 dst=r6 src=r0 offset=0 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(6)) = (uint16_t)r8; + // EBPF_OP_STXH pc=62 dst=r7 src=r8 offset=0 imm=0 #line 16 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(0)) = (uint16_t)r0; - // EBPF_OP_STXH pc=63 dst=r6 src=r5 offset=8 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(0)) = (uint16_t)r8; + // EBPF_OP_STXH pc=63 dst=r7 src=r5 offset=8 imm=0 #line 56 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(8)) = (uint16_t)r5; - // EBPF_OP_STXH pc=64 dst=r6 src=r5 offset=2 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(8)) = (uint16_t)r5; + // EBPF_OP_STXH pc=64 dst=r7 src=r5 offset=2 imm=0 #line 16 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(2)) = (uint16_t)r5; + *(uint16_t*)(uintptr_t)(r7 + OFFSET(2)) = (uint16_t)r5; // EBPF_OP_LDXH pc=65 dst=r4 src=r2 offset=4 imm=0 #line 17 "sample/./xdp_common.h" r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(4)); - // EBPF_OP_STXH pc=66 dst=r6 src=r4 offset=10 imm=0 + // EBPF_OP_STXH pc=66 dst=r7 src=r4 offset=10 imm=0 #line 17 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(10)) = (uint16_t)r4; - // EBPF_OP_LDXH pc=67 dst=r4 src=r2 offset=2 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(10)) = (uint16_t)r4; + // EBPF_OP_LDXH pc=67 dst=r4 src=r2 offset=0 imm=0 #line 17 "sample/./xdp_common.h" - r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(2)); - // EBPF_OP_LDXH pc=68 dst=r2 src=r2 offset=0 imm=0 + r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(0)); + // EBPF_OP_STXH pc=68 dst=r7 src=r4 offset=6 imm=0 +#line 17 "sample/./xdp_common.h" + *(uint16_t*)(uintptr_t)(r7 + OFFSET(6)) = (uint16_t)r4; + // EBPF_OP_LDXH pc=69 dst=r2 src=r2 offset=2 imm=0 +#line 17 "sample/./xdp_common.h" + r2 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(2)); + // EBPF_OP_STXH pc=70 dst=r7 src=r2 offset=8 imm=0 #line 17 "sample/./xdp_common.h" - r2 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(0)); - // EBPF_OP_LDXW pc=69 dst=r5 src=r6 offset=50 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(8)) = (uint16_t)r2; + // EBPF_OP_LDXW pc=71 dst=r2 src=r7 offset=50 imm=0 #line 23 "sample/./xdp_common.h" - r5 = *(uint32_t*)(uintptr_t)(r6 + OFFSET(50)); - // EBPF_OP_LDXW pc=70 dst=r0 src=r6 offset=46 imm=0 + r2 = *(uint32_t*)(uintptr_t)(r7 + OFFSET(50)); + // EBPF_OP_LDXW pc=72 dst=r4 src=r7 offset=46 imm=0 #line 24 "sample/./xdp_common.h" - r0 = *(uint32_t*)(uintptr_t)(r6 + OFFSET(46)); - // EBPF_OP_STXW pc=71 dst=r6 src=r0 offset=50 imm=0 + r4 = *(uint32_t*)(uintptr_t)(r7 + OFFSET(46)); + // EBPF_OP_STXW pc=73 dst=r7 src=r4 offset=50 imm=0 #line 24 "sample/./xdp_common.h" - *(uint32_t*)(uintptr_t)(r6 + OFFSET(50)) = (uint32_t)r0; - // EBPF_OP_STXW pc=72 dst=r6 src=r5 offset=46 imm=0 + *(uint32_t*)(uintptr_t)(r7 + OFFSET(50)) = (uint32_t)r4; + // EBPF_OP_STXW pc=74 dst=r7 src=r2 offset=46 imm=0 #line 25 "sample/./xdp_common.h" - *(uint32_t*)(uintptr_t)(r6 + OFFSET(46)) = (uint32_t)r5; - // EBPF_OP_STXH pc=73 dst=r6 src=r2 offset=6 imm=0 -#line 17 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(6)) = (uint16_t)r2; - // EBPF_OP_STXH pc=74 dst=r6 src=r4 offset=8 imm=0 -#line 17 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(8)) = (uint16_t)r4; - // EBPF_OP_LDXW pc=75 dst=r2 src=r1 offset=16 imm=0 -#line 64 "sample/encap_reflect_packet.c" - r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(16)); - // EBPF_OP_STXW pc=76 dst=r3 src=r2 offset=16 imm=0 -#line 64 "sample/encap_reflect_packet.c" - *(uint32_t*)(uintptr_t)(r3 + OFFSET(16)) = (uint32_t)r2; - // EBPF_OP_LDXW pc=77 dst=r2 src=r1 offset=0 imm=0 + *(uint32_t*)(uintptr_t)(r7 + OFFSET(46)) = (uint32_t)r2; + // EBPF_OP_LDXB pc=75 dst=r4 src=r7 offset=34 imm=0 +#line 63 "sample/encap_reflect_packet.c" + r4 = *(uint8_t*)(uintptr_t)(r7 + OFFSET(34)); + // EBPF_OP_LSH64_IMM pc=76 dst=r4 src=r0 offset=0 imm=2 +#line 63 "sample/encap_reflect_packet.c" + r4 <<= (IMMEDIATE(2) & 63); + // EBPF_OP_AND64_IMM pc=77 dst=r4 src=r0 offset=0 imm=60 +#line 63 "sample/encap_reflect_packet.c" + r4 &= IMMEDIATE(60); + // EBPF_OP_MOV64_REG pc=78 dst=r2 src=r1 offset=0 imm=0 +#line 63 "sample/encap_reflect_packet.c" + r2 = r1; + // EBPF_OP_ADD64_REG pc=79 dst=r2 src=r4 offset=0 imm=0 +#line 63 "sample/encap_reflect_packet.c" + r2 += r4; + // EBPF_OP_MOV64_REG pc=80 dst=r4 src=r2 offset=0 imm=0 #line 64 "sample/encap_reflect_packet.c" - r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(0)); - // EBPF_OP_STXW pc=78 dst=r3 src=r2 offset=0 imm=0 + r4 = r2; + // EBPF_OP_ADD64_IMM pc=81 dst=r4 src=r0 offset=0 imm=8 #line 64 "sample/encap_reflect_packet.c" - *(uint32_t*)(uintptr_t)(r3 + OFFSET(0)) = (uint32_t)r2; - // EBPF_OP_LDXW pc=79 dst=r2 src=r1 offset=4 imm=0 + r4 += IMMEDIATE(8); + // EBPF_OP_LDXDW pc=82 dst=r5 src=r6 offset=8 imm=0 #line 64 "sample/encap_reflect_packet.c" - r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(4)); - // EBPF_OP_STXW pc=80 dst=r3 src=r2 offset=4 imm=0 + r5 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(8)); + // EBPF_OP_JGT_REG pc=83 dst=r4 src=r5 offset=238 imm=0 #line 64 "sample/encap_reflect_packet.c" - *(uint32_t*)(uintptr_t)(r3 + OFFSET(4)) = (uint32_t)r2; - // EBPF_OP_LDXW pc=81 dst=r2 src=r1 offset=8 imm=0 + if (r4 > r5) #line 64 "sample/encap_reflect_packet.c" + goto label_5; + // EBPF_OP_LDXH pc=84 dst=r4 src=r2 offset=2 imm=0 +#line 68 "sample/encap_reflect_packet.c" + r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(2)); + // EBPF_OP_JNE_IMM pc=85 dst=r4 src=r0 offset=4 imm=7459 +#line 68 "sample/encap_reflect_packet.c" + if (r4 != IMMEDIATE(7459)) +#line 68 "sample/encap_reflect_packet.c" + goto label_1; + // EBPF_OP_LDXH pc=86 dst=r4 src=r2 offset=0 imm=0 +#line 40 "sample/./xdp_common.h" + r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(0)); + // EBPF_OP_STXH pc=87 dst=r2 src=r4 offset=2 imm=0 +#line 42 "sample/./xdp_common.h" + *(uint16_t*)(uintptr_t)(r2 + OFFSET(2)) = (uint16_t)r4; + // EBPF_OP_MOV64_IMM pc=88 dst=r4 src=r0 offset=0 imm=7459 +#line 42 "sample/./xdp_common.h" + r4 = IMMEDIATE(7459); + // EBPF_OP_STXH pc=89 dst=r2 src=r4 offset=0 imm=0 +#line 41 "sample/./xdp_common.h" + *(uint16_t*)(uintptr_t)(r2 + OFFSET(0)) = (uint16_t)r4; +label_1: + // EBPF_OP_LDXW pc=90 dst=r2 src=r1 offset=16 imm=0 +#line 73 "sample/encap_reflect_packet.c" + r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(16)); + // EBPF_OP_STXW pc=91 dst=r3 src=r2 offset=16 imm=0 +#line 73 "sample/encap_reflect_packet.c" + *(uint32_t*)(uintptr_t)(r3 + OFFSET(16)) = (uint32_t)r2; + // EBPF_OP_LDXW pc=92 dst=r2 src=r1 offset=12 imm=0 +#line 73 "sample/encap_reflect_packet.c" + r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(12)); + // EBPF_OP_STXW pc=93 dst=r3 src=r2 offset=12 imm=0 +#line 73 "sample/encap_reflect_packet.c" + *(uint32_t*)(uintptr_t)(r3 + OFFSET(12)) = (uint32_t)r2; + // EBPF_OP_LDXW pc=94 dst=r2 src=r1 offset=8 imm=0 +#line 73 "sample/encap_reflect_packet.c" r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(8)); - // EBPF_OP_STXW pc=82 dst=r3 src=r2 offset=8 imm=0 -#line 64 "sample/encap_reflect_packet.c" + // EBPF_OP_STXW pc=95 dst=r3 src=r2 offset=8 imm=0 +#line 73 "sample/encap_reflect_packet.c" *(uint32_t*)(uintptr_t)(r3 + OFFSET(8)) = (uint32_t)r2; - // EBPF_OP_LDXW pc=83 dst=r1 src=r1 offset=12 imm=0 -#line 64 "sample/encap_reflect_packet.c" - r1 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(12)); - // EBPF_OP_STXW pc=84 dst=r3 src=r1 offset=12 imm=0 -#line 64 "sample/encap_reflect_packet.c" - *(uint32_t*)(uintptr_t)(r3 + OFFSET(12)) = (uint32_t)r1; - // EBPF_OP_MOV64_IMM pc=85 dst=r1 src=r0 offset=0 imm=4 -#line 64 "sample/encap_reflect_packet.c" + // EBPF_OP_LDXW pc=96 dst=r2 src=r1 offset=4 imm=0 +#line 73 "sample/encap_reflect_packet.c" + r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(4)); + // EBPF_OP_STXW pc=97 dst=r3 src=r2 offset=4 imm=0 +#line 73 "sample/encap_reflect_packet.c" + *(uint32_t*)(uintptr_t)(r3 + OFFSET(4)) = (uint32_t)r2; + // EBPF_OP_LDXW pc=98 dst=r1 src=r1 offset=0 imm=0 +#line 73 "sample/encap_reflect_packet.c" + r1 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(0)); + // EBPF_OP_STXW pc=99 dst=r3 src=r1 offset=0 imm=0 +#line 73 "sample/encap_reflect_packet.c" + *(uint32_t*)(uintptr_t)(r3 + OFFSET(0)) = (uint32_t)r1; + // EBPF_OP_MOV64_IMM pc=100 dst=r1 src=r0 offset=0 imm=4 +#line 73 "sample/encap_reflect_packet.c" r1 = IMMEDIATE(4); - // EBPF_OP_STXB pc=86 dst=r6 src=r1 offset=23 imm=0 -#line 67 "sample/encap_reflect_packet.c" - *(uint8_t*)(uintptr_t)(r6 + OFFSET(23)) = (uint8_t)r1; - // EBPF_OP_LDXB pc=87 dst=r1 src=r6 offset=14 imm=0 -#line 68 "sample/encap_reflect_packet.c" - r1 = *(uint8_t*)(uintptr_t)(r6 + OFFSET(14)); - // EBPF_OP_AND64_IMM pc=88 dst=r1 src=r0 offset=0 imm=240 -#line 68 "sample/encap_reflect_packet.c" + // EBPF_OP_STXB pc=101 dst=r7 src=r1 offset=23 imm=0 +#line 76 "sample/encap_reflect_packet.c" + *(uint8_t*)(uintptr_t)(r7 + OFFSET(23)) = (uint8_t)r1; + // EBPF_OP_LDXB pc=102 dst=r1 src=r7 offset=14 imm=0 +#line 77 "sample/encap_reflect_packet.c" + r1 = *(uint8_t*)(uintptr_t)(r7 + OFFSET(14)); + // EBPF_OP_AND64_IMM pc=103 dst=r1 src=r0 offset=0 imm=240 +#line 77 "sample/encap_reflect_packet.c" r1 &= IMMEDIATE(240); - // EBPF_OP_OR64_IMM pc=89 dst=r1 src=r0 offset=0 imm=5 -#line 68 "sample/encap_reflect_packet.c" + // EBPF_OP_OR64_IMM pc=104 dst=r1 src=r0 offset=0 imm=5 +#line 77 "sample/encap_reflect_packet.c" r1 |= IMMEDIATE(5); - // EBPF_OP_STXB pc=90 dst=r6 src=r1 offset=14 imm=0 -#line 68 "sample/encap_reflect_packet.c" - *(uint8_t*)(uintptr_t)(r6 + OFFSET(14)) = (uint8_t)r1; - // EBPF_OP_LDXH pc=91 dst=r1 src=r6 offset=36 imm=0 -#line 69 "sample/encap_reflect_packet.c" - r1 = *(uint16_t*)(uintptr_t)(r6 + OFFSET(36)); - // EBPF_OP_BE pc=92 dst=r1 src=r0 offset=0 imm=16 -#line 69 "sample/encap_reflect_packet.c" + // EBPF_OP_STXB pc=105 dst=r7 src=r1 offset=14 imm=0 +#line 77 "sample/encap_reflect_packet.c" + *(uint8_t*)(uintptr_t)(r7 + OFFSET(14)) = (uint8_t)r1; + // EBPF_OP_LDXH pc=106 dst=r1 src=r7 offset=36 imm=0 +#line 78 "sample/encap_reflect_packet.c" + r1 = *(uint16_t*)(uintptr_t)(r7 + OFFSET(36)); + // EBPF_OP_BE pc=107 dst=r1 src=r0 offset=0 imm=16 +#line 78 "sample/encap_reflect_packet.c" r1 = htobe16((uint16_t)r1); -#line 69 "sample/encap_reflect_packet.c" +#line 78 "sample/encap_reflect_packet.c" r1 &= UINT32_MAX; - // EBPF_OP_ADD64_IMM pc=93 dst=r1 src=r0 offset=0 imm=20 -#line 69 "sample/encap_reflect_packet.c" + // EBPF_OP_ADD64_IMM pc=108 dst=r1 src=r0 offset=0 imm=20 +#line 78 "sample/encap_reflect_packet.c" r1 += IMMEDIATE(20); - // EBPF_OP_BE pc=94 dst=r1 src=r0 offset=0 imm=16 -#line 69 "sample/encap_reflect_packet.c" + // EBPF_OP_BE pc=109 dst=r1 src=r0 offset=0 imm=16 +#line 78 "sample/encap_reflect_packet.c" r1 = htobe16((uint16_t)r1); -#line 69 "sample/encap_reflect_packet.c" +#line 78 "sample/encap_reflect_packet.c" r1 &= UINT32_MAX; - // EBPF_OP_STXH pc=95 dst=r6 src=r1 offset=16 imm=0 -#line 69 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(16)) = (uint16_t)r1; - // EBPF_OP_MOV64_IMM pc=96 dst=r1 src=r0 offset=0 imm=0 -#line 69 "sample/encap_reflect_packet.c" + // EBPF_OP_STXH pc=110 dst=r7 src=r1 offset=16 imm=0 +#line 78 "sample/encap_reflect_packet.c" + *(uint16_t*)(uintptr_t)(r7 + OFFSET(16)) = (uint16_t)r1; + // EBPF_OP_MOV64_IMM pc=111 dst=r1 src=r0 offset=0 imm=0 +#line 78 "sample/encap_reflect_packet.c" r1 = IMMEDIATE(0); - // EBPF_OP_STXH pc=97 dst=r6 src=r1 offset=24 imm=0 -#line 71 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(24)) = (uint16_t)r1; - // EBPF_OP_MOV64_IMM pc=98 dst=r1 src=r0 offset=0 imm=0 -#line 73 "sample/encap_reflect_packet.c" + // EBPF_OP_STXH pc=112 dst=r7 src=r1 offset=24 imm=0 +#line 80 "sample/encap_reflect_packet.c" + *(uint16_t*)(uintptr_t)(r7 + OFFSET(24)) = (uint16_t)r1; + // EBPF_OP_MOV64_IMM pc=113 dst=r1 src=r0 offset=0 imm=0 +#line 82 "sample/encap_reflect_packet.c" r1 = IMMEDIATE(0); - // EBPF_OP_MOV64_IMM pc=99 dst=r2 src=r0 offset=0 imm=0 -#line 73 "sample/encap_reflect_packet.c" + // EBPF_OP_MOV64_IMM pc=114 dst=r2 src=r0 offset=0 imm=0 +#line 82 "sample/encap_reflect_packet.c" r2 = IMMEDIATE(0); - // EBPF_OP_MOV64_IMM pc=100 dst=r4 src=r0 offset=0 imm=20 -#line 73 "sample/encap_reflect_packet.c" + // EBPF_OP_MOV64_IMM pc=115 dst=r4 src=r0 offset=0 imm=20 +#line 82 "sample/encap_reflect_packet.c" r4 = IMMEDIATE(20); - // EBPF_OP_MOV64_IMM pc=101 dst=r5 src=r0 offset=0 imm=0 -#line 73 "sample/encap_reflect_packet.c" + // EBPF_OP_MOV64_IMM pc=116 dst=r5 src=r0 offset=0 imm=0 +#line 82 "sample/encap_reflect_packet.c" r5 = IMMEDIATE(0); - // EBPF_OP_CALL pc=102 dst=r0 src=r0 offset=0 imm=10 -#line 73 "sample/encap_reflect_packet.c" + // EBPF_OP_CALL pc=117 dst=r0 src=r0 offset=0 imm=10 +#line 82 "sample/encap_reflect_packet.c" r0 = encap_reflect_packet_helpers[1].address -#line 73 "sample/encap_reflect_packet.c" +#line 82 "sample/encap_reflect_packet.c" (r1, r2, r3, r4, r5); -#line 73 "sample/encap_reflect_packet.c" +#line 82 "sample/encap_reflect_packet.c" if ((encap_reflect_packet_helpers[1].tail_call) && (r0 == 0)) -#line 73 "sample/encap_reflect_packet.c" +#line 82 "sample/encap_reflect_packet.c" return 0; - // EBPF_OP_MOV64_REG pc=103 dst=r1 src=r0 offset=0 imm=0 -#line 41 "sample/./xdp_common.h" + // EBPF_OP_MOV64_REG pc=118 dst=r1 src=r0 offset=0 imm=0 +#line 49 "sample/./xdp_common.h" r1 = r0; - // EBPF_OP_AND64_IMM pc=104 dst=r1 src=r0 offset=0 imm=65535 -#line 41 "sample/./xdp_common.h" + // EBPF_OP_AND64_IMM pc=119 dst=r1 src=r0 offset=0 imm=65535 +#line 49 "sample/./xdp_common.h" r1 &= IMMEDIATE(65535); - // EBPF_OP_LSH64_IMM pc=105 dst=r0 src=r0 offset=0 imm=32 -#line 73 "sample/encap_reflect_packet.c" + // EBPF_OP_LSH64_IMM pc=120 dst=r0 src=r0 offset=0 imm=32 +#line 82 "sample/encap_reflect_packet.c" r0 <<= (IMMEDIATE(32) & 63); - // EBPF_OP_ARSH64_IMM pc=106 dst=r0 src=r0 offset=0 imm=48 -#line 41 "sample/./xdp_common.h" + // EBPF_OP_ARSH64_IMM pc=121 dst=r0 src=r0 offset=0 imm=48 +#line 49 "sample/./xdp_common.h" r0 = (int64_t)r0 >> (uint32_t)(IMMEDIATE(48) & 63); - // EBPF_OP_ADD64_REG pc=107 dst=r0 src=r1 offset=0 imm=0 -#line 41 "sample/./xdp_common.h" + // EBPF_OP_ADD64_REG pc=122 dst=r0 src=r1 offset=0 imm=0 +#line 49 "sample/./xdp_common.h" r0 += r1; - // EBPF_OP_MOV64_REG pc=108 dst=r1 src=r0 offset=0 imm=0 -#line 42 "sample/./xdp_common.h" + // EBPF_OP_MOV64_REG pc=123 dst=r1 src=r0 offset=0 imm=0 +#line 50 "sample/./xdp_common.h" r1 = r0; - // EBPF_OP_RSH64_IMM pc=109 dst=r1 src=r0 offset=0 imm=16 -#line 42 "sample/./xdp_common.h" + // EBPF_OP_RSH64_IMM pc=124 dst=r1 src=r0 offset=0 imm=16 +#line 50 "sample/./xdp_common.h" r1 >>= (IMMEDIATE(16) & 63); - // EBPF_OP_ADD64_REG pc=110 dst=r1 src=r0 offset=0 imm=0 -#line 42 "sample/./xdp_common.h" + // EBPF_OP_ADD64_REG pc=125 dst=r1 src=r0 offset=0 imm=0 +#line 50 "sample/./xdp_common.h" r1 += r0; - // EBPF_OP_XOR64_IMM pc=111 dst=r1 src=r0 offset=0 imm=-1 -#line 73 "sample/encap_reflect_packet.c" + // EBPF_OP_XOR64_IMM pc=126 dst=r1 src=r0 offset=0 imm=-1 +#line 82 "sample/encap_reflect_packet.c" r1 ^= IMMEDIATE(-1); - // EBPF_OP_STXH pc=112 dst=r6 src=r1 offset=24 imm=0 -#line 72 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(24)) = (uint16_t)r1; - // EBPF_OP_JA pc=113 dst=r0 src=r0 offset=182 imm=0 -#line 72 "sample/encap_reflect_packet.c" - goto label_2; -label_1: - // EBPF_OP_MOV64_REG pc=114 dst=r3 src=r2 offset=0 imm=0 -#line 178 "sample/encap_reflect_packet.c" + // EBPF_OP_STXH pc=127 dst=r7 src=r1 offset=24 imm=0 +#line 81 "sample/encap_reflect_packet.c" + *(uint16_t*)(uintptr_t)(r7 + OFFSET(24)) = (uint16_t)r1; + // EBPF_OP_JA pc=128 dst=r0 src=r0 offset=192 imm=0 +#line 81 "sample/encap_reflect_packet.c" + goto label_4; +label_2: + // EBPF_OP_MOV64_REG pc=129 dst=r3 src=r2 offset=0 imm=0 +#line 196 "sample/encap_reflect_packet.c" r3 = r2; - // EBPF_OP_ADD64_IMM pc=115 dst=r3 src=r0 offset=0 imm=54 -#line 178 "sample/encap_reflect_packet.c" + // EBPF_OP_ADD64_IMM pc=130 dst=r3 src=r0 offset=0 imm=54 +#line 196 "sample/encap_reflect_packet.c" r3 += IMMEDIATE(54); - // EBPF_OP_JGT_REG pc=116 dst=r3 src=r1 offset=180 imm=0 -#line 178 "sample/encap_reflect_packet.c" + // EBPF_OP_JGT_REG pc=131 dst=r3 src=r1 offset=190 imm=0 +#line 196 "sample/encap_reflect_packet.c" if (r3 > r1) -#line 178 "sample/encap_reflect_packet.c" - goto label_3; - // EBPF_OP_MOV64_REG pc=117 dst=r3 src=r2 offset=0 imm=0 -#line 178 "sample/encap_reflect_packet.c" +#line 196 "sample/encap_reflect_packet.c" + goto label_5; + // EBPF_OP_MOV64_REG pc=132 dst=r3 src=r2 offset=0 imm=0 +#line 196 "sample/encap_reflect_packet.c" r3 = r2; - // EBPF_OP_ADD64_IMM pc=118 dst=r3 src=r0 offset=0 imm=62 -#line 178 "sample/encap_reflect_packet.c" + // EBPF_OP_ADD64_IMM pc=133 dst=r3 src=r0 offset=0 imm=62 +#line 196 "sample/encap_reflect_packet.c" r3 += IMMEDIATE(62); - // EBPF_OP_JGT_REG pc=119 dst=r3 src=r1 offset=177 imm=0 -#line 184 "sample/encap_reflect_packet.c" + // EBPF_OP_JGT_REG pc=134 dst=r3 src=r1 offset=187 imm=0 +#line 202 "sample/encap_reflect_packet.c" if (r3 > r1) -#line 184 "sample/encap_reflect_packet.c" - goto label_3; - // EBPF_OP_LDXB pc=120 dst=r1 src=r2 offset=20 imm=0 -#line 184 "sample/encap_reflect_packet.c" +#line 202 "sample/encap_reflect_packet.c" + goto label_5; + // EBPF_OP_LDXB pc=135 dst=r1 src=r2 offset=20 imm=0 +#line 202 "sample/encap_reflect_packet.c" r1 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(20)); - // EBPF_OP_JNE_IMM pc=121 dst=r1 src=r0 offset=175 imm=17 -#line 184 "sample/encap_reflect_packet.c" + // EBPF_OP_JNE_IMM pc=136 dst=r1 src=r0 offset=185 imm=17 +#line 202 "sample/encap_reflect_packet.c" if (r1 != IMMEDIATE(17)) -#line 184 "sample/encap_reflect_packet.c" - goto label_3; - // EBPF_OP_LDXH pc=122 dst=r1 src=r2 offset=56 imm=0 -#line 190 "sample/encap_reflect_packet.c" +#line 202 "sample/encap_reflect_packet.c" + goto label_5; + // EBPF_OP_LDXH pc=137 dst=r1 src=r2 offset=56 imm=0 +#line 208 "sample/encap_reflect_packet.c" r1 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(56)); - // EBPF_OP_JNE_IMM pc=123 dst=r1 src=r0 offset=173 imm=7459 -#line 190 "sample/encap_reflect_packet.c" + // EBPF_OP_JNE_IMM pc=138 dst=r1 src=r0 offset=183 imm=7459 +#line 208 "sample/encap_reflect_packet.c" if (r1 != IMMEDIATE(7459)) -#line 190 "sample/encap_reflect_packet.c" - goto label_3; - // EBPF_OP_MOV64_REG pc=124 dst=r1 src=r6 offset=0 imm=0 -#line 87 "sample/encap_reflect_packet.c" +#line 208 "sample/encap_reflect_packet.c" + goto label_5; + // EBPF_OP_MOV64_REG pc=139 dst=r1 src=r6 offset=0 imm=0 +#line 96 "sample/encap_reflect_packet.c" r1 = r6; - // EBPF_OP_LDDW pc=125 dst=r2 src=r0 offset=0 imm=-40 -#line 87 "sample/encap_reflect_packet.c" + // EBPF_OP_LDDW pc=140 dst=r2 src=r0 offset=0 imm=-40 +#line 96 "sample/encap_reflect_packet.c" r2 = (uint64_t)4294967256; - // EBPF_OP_CALL pc=127 dst=r0 src=r0 offset=0 imm=65536 -#line 87 "sample/encap_reflect_packet.c" + // EBPF_OP_CALL pc=142 dst=r0 src=r0 offset=0 imm=65536 +#line 96 "sample/encap_reflect_packet.c" r0 = encap_reflect_packet_helpers[0].address -#line 87 "sample/encap_reflect_packet.c" +#line 96 "sample/encap_reflect_packet.c" (r1, r2, r3, r4, r5); -#line 87 "sample/encap_reflect_packet.c" +#line 96 "sample/encap_reflect_packet.c" if ((encap_reflect_packet_helpers[0].tail_call) && (r0 == 0)) -#line 87 "sample/encap_reflect_packet.c" +#line 96 "sample/encap_reflect_packet.c" return 0; - // EBPF_OP_MOV64_REG pc=128 dst=r1 src=r0 offset=0 imm=0 -#line 87 "sample/encap_reflect_packet.c" + // EBPF_OP_MOV64_REG pc=143 dst=r1 src=r0 offset=0 imm=0 +#line 96 "sample/encap_reflect_packet.c" r1 = r0; - // EBPF_OP_MOV64_IMM pc=129 dst=r0 src=r0 offset=0 imm=2 -#line 87 "sample/encap_reflect_packet.c" + // EBPF_OP_MOV64_IMM pc=144 dst=r0 src=r0 offset=0 imm=2 +#line 96 "sample/encap_reflect_packet.c" r0 = IMMEDIATE(2); - // EBPF_OP_LSH64_IMM pc=130 dst=r1 src=r0 offset=0 imm=32 -#line 87 "sample/encap_reflect_packet.c" + // EBPF_OP_LSH64_IMM pc=145 dst=r1 src=r0 offset=0 imm=32 +#line 96 "sample/encap_reflect_packet.c" r1 <<= (IMMEDIATE(32) & 63); - // EBPF_OP_ARSH64_IMM pc=131 dst=r1 src=r0 offset=0 imm=32 -#line 87 "sample/encap_reflect_packet.c" + // EBPF_OP_ARSH64_IMM pc=146 dst=r1 src=r0 offset=0 imm=32 +#line 96 "sample/encap_reflect_packet.c" r1 = (int64_t)r1 >> (uint32_t)(IMMEDIATE(32) & 63); - // EBPF_OP_MOV64_IMM pc=132 dst=r2 src=r0 offset=0 imm=0 -#line 87 "sample/encap_reflect_packet.c" + // EBPF_OP_MOV64_IMM pc=147 dst=r2 src=r0 offset=0 imm=0 +#line 96 "sample/encap_reflect_packet.c" r2 = IMMEDIATE(0); - // EBPF_OP_JSGT_REG pc=133 dst=r2 src=r1 offset=163 imm=0 -#line 87 "sample/encap_reflect_packet.c" + // EBPF_OP_JSGT_REG pc=148 dst=r2 src=r1 offset=173 imm=0 +#line 96 "sample/encap_reflect_packet.c" if ((int64_t)r2 > (int64_t)r1) -#line 87 "sample/encap_reflect_packet.c" - goto label_3; - // EBPF_OP_LDXDW pc=134 dst=r5 src=r6 offset=8 imm=0 -#line 93 "sample/encap_reflect_packet.c" +#line 96 "sample/encap_reflect_packet.c" + goto label_5; + // EBPF_OP_LDXDW pc=149 dst=r5 src=r6 offset=8 imm=0 +#line 102 "sample/encap_reflect_packet.c" r5 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(8)); - // EBPF_OP_LDXDW pc=135 dst=r1 src=r6 offset=0 imm=0 -#line 92 "sample/encap_reflect_packet.c" + // EBPF_OP_LDXDW pc=150 dst=r1 src=r6 offset=0 imm=0 +#line 101 "sample/encap_reflect_packet.c" r1 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(0)); - // EBPF_OP_MOV64_REG pc=136 dst=r2 src=r1 offset=0 imm=0 -#line 93 "sample/encap_reflect_packet.c" + // EBPF_OP_MOV64_REG pc=151 dst=r2 src=r1 offset=0 imm=0 +#line 102 "sample/encap_reflect_packet.c" r2 = r1; - // EBPF_OP_ADD64_IMM pc=137 dst=r2 src=r0 offset=0 imm=14 -#line 93 "sample/encap_reflect_packet.c" + // EBPF_OP_ADD64_IMM pc=152 dst=r2 src=r0 offset=0 imm=14 +#line 102 "sample/encap_reflect_packet.c" r2 += IMMEDIATE(14); - // EBPF_OP_JGT_REG pc=138 dst=r2 src=r5 offset=158 imm=0 -#line 93 "sample/encap_reflect_packet.c" + // EBPF_OP_JGT_REG pc=153 dst=r2 src=r5 offset=168 imm=0 +#line 102 "sample/encap_reflect_packet.c" if (r2 > r5) -#line 93 "sample/encap_reflect_packet.c" - goto label_3; - // EBPF_OP_MOV64_REG pc=139 dst=r4 src=r1 offset=0 imm=0 -#line 100 "sample/encap_reflect_packet.c" +#line 102 "sample/encap_reflect_packet.c" + goto label_5; + // EBPF_OP_MOV64_REG pc=154 dst=r4 src=r1 offset=0 imm=0 +#line 109 "sample/encap_reflect_packet.c" r4 = r1; - // EBPF_OP_ADD64_IMM pc=140 dst=r4 src=r0 offset=0 imm=40 -#line 100 "sample/encap_reflect_packet.c" + // EBPF_OP_ADD64_IMM pc=155 dst=r4 src=r0 offset=0 imm=40 +#line 109 "sample/encap_reflect_packet.c" r4 += IMMEDIATE(40); - // EBPF_OP_JGT_REG pc=141 dst=r4 src=r5 offset=155 imm=0 -#line 100 "sample/encap_reflect_packet.c" + // EBPF_OP_JGT_REG pc=156 dst=r4 src=r5 offset=165 imm=0 +#line 109 "sample/encap_reflect_packet.c" if (r4 > r5) -#line 100 "sample/encap_reflect_packet.c" - goto label_3; - // EBPF_OP_MOV64_REG pc=142 dst=r3 src=r1 offset=0 imm=0 -#line 108 "sample/encap_reflect_packet.c" +#line 109 "sample/encap_reflect_packet.c" + goto label_5; + // EBPF_OP_MOV64_REG pc=157 dst=r3 src=r1 offset=0 imm=0 +#line 117 "sample/encap_reflect_packet.c" r3 = r1; - // EBPF_OP_ADD64_IMM pc=143 dst=r3 src=r0 offset=0 imm=54 -#line 108 "sample/encap_reflect_packet.c" + // EBPF_OP_ADD64_IMM pc=158 dst=r3 src=r0 offset=0 imm=54 +#line 117 "sample/encap_reflect_packet.c" r3 += IMMEDIATE(54); - // EBPF_OP_JGT_REG pc=144 dst=r3 src=r5 offset=152 imm=0 -#line 108 "sample/encap_reflect_packet.c" + // EBPF_OP_JGT_REG pc=159 dst=r3 src=r5 offset=162 imm=0 +#line 117 "sample/encap_reflect_packet.c" if (r3 > r5) -#line 108 "sample/encap_reflect_packet.c" - goto label_3; - // EBPF_OP_MOV64_REG pc=145 dst=r6 src=r1 offset=0 imm=0 -#line 108 "sample/encap_reflect_packet.c" - r6 = r1; - // EBPF_OP_ADD64_IMM pc=146 dst=r6 src=r0 offset=0 imm=94 -#line 108 "sample/encap_reflect_packet.c" - r6 += IMMEDIATE(94); - // EBPF_OP_JGT_REG pc=147 dst=r6 src=r5 offset=149 imm=0 -#line 108 "sample/encap_reflect_packet.c" - if (r6 > r5) -#line 108 "sample/encap_reflect_packet.c" - goto label_3; - // EBPF_OP_LDXH pc=148 dst=r5 src=r4 offset=4 imm=0 -#line 121 "sample/encap_reflect_packet.c" +#line 117 "sample/encap_reflect_packet.c" + goto label_5; + // EBPF_OP_MOV64_REG pc=160 dst=r7 src=r1 offset=0 imm=0 +#line 124 "sample/encap_reflect_packet.c" + r7 = r1; + // EBPF_OP_ADD64_IMM pc=161 dst=r7 src=r0 offset=0 imm=94 +#line 124 "sample/encap_reflect_packet.c" + r7 += IMMEDIATE(94); + // EBPF_OP_JGT_REG pc=162 dst=r7 src=r5 offset=159 imm=0 +#line 124 "sample/encap_reflect_packet.c" + if (r7 > r5) +#line 124 "sample/encap_reflect_packet.c" + goto label_5; + // EBPF_OP_LDXH pc=163 dst=r5 src=r4 offset=4 imm=0 +#line 130 "sample/encap_reflect_packet.c" r5 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(4)); - // EBPF_OP_STXH pc=149 dst=r1 src=r5 offset=4 imm=0 -#line 121 "sample/encap_reflect_packet.c" + // EBPF_OP_STXH pc=164 dst=r1 src=r5 offset=4 imm=0 +#line 130 "sample/encap_reflect_packet.c" *(uint16_t*)(uintptr_t)(r1 + OFFSET(4)) = (uint16_t)r5; - // EBPF_OP_LDXH pc=150 dst=r5 src=r4 offset=0 imm=0 -#line 121 "sample/encap_reflect_packet.c" + // EBPF_OP_LDXH pc=165 dst=r5 src=r4 offset=0 imm=0 +#line 130 "sample/encap_reflect_packet.c" r5 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(0)); - // EBPF_OP_STXH pc=151 dst=r1 src=r5 offset=0 imm=0 -#line 121 "sample/encap_reflect_packet.c" + // EBPF_OP_STXH pc=166 dst=r1 src=r5 offset=0 imm=0 +#line 130 "sample/encap_reflect_packet.c" *(uint16_t*)(uintptr_t)(r1 + OFFSET(0)) = (uint16_t)r5; - // EBPF_OP_LDXH pc=152 dst=r5 src=r4 offset=2 imm=0 -#line 121 "sample/encap_reflect_packet.c" + // EBPF_OP_LDXH pc=167 dst=r5 src=r4 offset=2 imm=0 +#line 130 "sample/encap_reflect_packet.c" r5 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(2)); - // EBPF_OP_STXH pc=153 dst=r1 src=r5 offset=2 imm=0 -#line 121 "sample/encap_reflect_packet.c" + // EBPF_OP_STXH pc=168 dst=r1 src=r5 offset=2 imm=0 +#line 130 "sample/encap_reflect_packet.c" *(uint16_t*)(uintptr_t)(r1 + OFFSET(2)) = (uint16_t)r5; - // EBPF_OP_LDXH pc=154 dst=r5 src=r4 offset=12 imm=0 -#line 121 "sample/encap_reflect_packet.c" + // EBPF_OP_LDXH pc=169 dst=r5 src=r4 offset=12 imm=0 +#line 130 "sample/encap_reflect_packet.c" r5 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(12)); - // EBPF_OP_STXH pc=155 dst=r1 src=r5 offset=12 imm=0 -#line 121 "sample/encap_reflect_packet.c" + // EBPF_OP_STXH pc=170 dst=r1 src=r5 offset=12 imm=0 +#line 130 "sample/encap_reflect_packet.c" *(uint16_t*)(uintptr_t)(r1 + OFFSET(12)) = (uint16_t)r5; - // EBPF_OP_LDXH pc=156 dst=r5 src=r4 offset=10 imm=0 -#line 121 "sample/encap_reflect_packet.c" + // EBPF_OP_LDXH pc=171 dst=r5 src=r4 offset=10 imm=0 +#line 130 "sample/encap_reflect_packet.c" r5 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(10)); - // EBPF_OP_STXH pc=157 dst=r1 src=r5 offset=10 imm=0 -#line 121 "sample/encap_reflect_packet.c" + // EBPF_OP_STXH pc=172 dst=r1 src=r5 offset=10 imm=0 +#line 130 "sample/encap_reflect_packet.c" *(uint16_t*)(uintptr_t)(r1 + OFFSET(10)) = (uint16_t)r5; - // EBPF_OP_LDXH pc=158 dst=r0 src=r4 offset=8 imm=0 -#line 121 "sample/encap_reflect_packet.c" - r0 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(8)); - // EBPF_OP_LDXH pc=159 dst=r6 src=r4 offset=6 imm=0 -#line 121 "sample/encap_reflect_packet.c" - r6 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(6)); - // EBPF_OP_STXH pc=160 dst=r1 src=r5 offset=4 imm=0 + // EBPF_OP_LDXH pc=173 dst=r7 src=r4 offset=8 imm=0 +#line 130 "sample/encap_reflect_packet.c" + r7 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(8)); + // EBPF_OP_LDXH pc=174 dst=r8 src=r4 offset=6 imm=0 +#line 130 "sample/encap_reflect_packet.c" + r8 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(6)); + // EBPF_OP_STXH pc=175 dst=r1 src=r5 offset=4 imm=0 #line 16 "sample/./xdp_common.h" *(uint16_t*)(uintptr_t)(r1 + OFFSET(4)) = (uint16_t)r5; - // EBPF_OP_STXH pc=161 dst=r1 src=r6 offset=6 imm=0 -#line 121 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r1 + OFFSET(6)) = (uint16_t)r6; - // EBPF_OP_STXH pc=162 dst=r1 src=r6 offset=0 imm=0 + // EBPF_OP_STXH pc=176 dst=r1 src=r8 offset=6 imm=0 +#line 130 "sample/encap_reflect_packet.c" + *(uint16_t*)(uintptr_t)(r1 + OFFSET(6)) = (uint16_t)r8; + // EBPF_OP_STXH pc=177 dst=r1 src=r8 offset=0 imm=0 #line 16 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r1 + OFFSET(0)) = (uint16_t)r6; - // EBPF_OP_STXH pc=163 dst=r1 src=r0 offset=8 imm=0 -#line 121 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r1 + OFFSET(8)) = (uint16_t)r0; - // EBPF_OP_STXH pc=164 dst=r1 src=r0 offset=2 imm=0 + *(uint16_t*)(uintptr_t)(r1 + OFFSET(0)) = (uint16_t)r8; + // EBPF_OP_STXH pc=178 dst=r1 src=r7 offset=8 imm=0 +#line 130 "sample/encap_reflect_packet.c" + *(uint16_t*)(uintptr_t)(r1 + OFFSET(8)) = (uint16_t)r7; + // EBPF_OP_STXH pc=179 dst=r1 src=r7 offset=2 imm=0 #line 16 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r1 + OFFSET(2)) = (uint16_t)r0; - // EBPF_OP_LDXH pc=165 dst=r5 src=r4 offset=4 imm=0 + *(uint16_t*)(uintptr_t)(r1 + OFFSET(2)) = (uint16_t)r7; + // EBPF_OP_LDXH pc=180 dst=r5 src=r4 offset=4 imm=0 #line 17 "sample/./xdp_common.h" r5 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(4)); - // EBPF_OP_STXH pc=166 dst=r1 src=r5 offset=10 imm=0 + // EBPF_OP_STXH pc=181 dst=r1 src=r5 offset=10 imm=0 #line 17 "sample/./xdp_common.h" *(uint16_t*)(uintptr_t)(r1 + OFFSET(10)) = (uint16_t)r5; - // EBPF_OP_LDXH pc=167 dst=r5 src=r4 offset=0 imm=0 + // EBPF_OP_LDXH pc=182 dst=r5 src=r4 offset=0 imm=0 #line 17 "sample/./xdp_common.h" r5 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(0)); - // EBPF_OP_STXH pc=168 dst=r1 src=r5 offset=6 imm=0 + // EBPF_OP_STXH pc=183 dst=r1 src=r5 offset=6 imm=0 #line 17 "sample/./xdp_common.h" *(uint16_t*)(uintptr_t)(r1 + OFFSET(6)) = (uint16_t)r5; - // EBPF_OP_LDXH pc=169 dst=r4 src=r4 offset=2 imm=0 + // EBPF_OP_LDXH pc=184 dst=r4 src=r4 offset=2 imm=0 #line 17 "sample/./xdp_common.h" r4 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(2)); - // EBPF_OP_STXH pc=170 dst=r1 src=r4 offset=8 imm=0 + // EBPF_OP_STXH pc=185 dst=r1 src=r4 offset=8 imm=0 #line 17 "sample/./xdp_common.h" *(uint16_t*)(uintptr_t)(r1 + OFFSET(8)) = (uint16_t)r4; - // EBPF_OP_LDXB pc=171 dst=r5 src=r1 offset=87 imm=0 + // EBPF_OP_LDXB pc=186 dst=r5 src=r1 offset=87 imm=0 #line 32 "sample/./xdp_common.h" r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(87)); - // EBPF_OP_LSH64_IMM pc=172 dst=r5 src=r0 offset=0 imm=8 + // EBPF_OP_LSH64_IMM pc=187 dst=r5 src=r0 offset=0 imm=8 #line 32 "sample/./xdp_common.h" r5 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=173 dst=r4 src=r1 offset=86 imm=0 + // EBPF_OP_LDXB pc=188 dst=r4 src=r1 offset=86 imm=0 #line 32 "sample/./xdp_common.h" r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(86)); - // EBPF_OP_OR64_REG pc=174 dst=r5 src=r4 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=189 dst=r5 src=r4 offset=0 imm=0 #line 32 "sample/./xdp_common.h" r5 |= r4; - // EBPF_OP_LDXB pc=175 dst=r4 src=r1 offset=89 imm=0 + // EBPF_OP_LDXB pc=190 dst=r4 src=r1 offset=89 imm=0 #line 32 "sample/./xdp_common.h" r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(89)); - // EBPF_OP_LSH64_IMM pc=176 dst=r4 src=r0 offset=0 imm=8 + // EBPF_OP_LSH64_IMM pc=191 dst=r4 src=r0 offset=0 imm=8 #line 32 "sample/./xdp_common.h" r4 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=177 dst=r0 src=r1 offset=88 imm=0 + // EBPF_OP_LDXB pc=192 dst=r7 src=r1 offset=88 imm=0 #line 32 "sample/./xdp_common.h" - r0 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(88)); - // EBPF_OP_OR64_REG pc=178 dst=r4 src=r0 offset=0 imm=0 + r7 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(88)); + // EBPF_OP_OR64_REG pc=193 dst=r4 src=r7 offset=0 imm=0 #line 32 "sample/./xdp_common.h" - r4 |= r0; - // EBPF_OP_LSH64_IMM pc=179 dst=r4 src=r0 offset=0 imm=16 + r4 |= r7; + // EBPF_OP_LSH64_IMM pc=194 dst=r4 src=r0 offset=0 imm=16 #line 32 "sample/./xdp_common.h" r4 <<= (IMMEDIATE(16) & 63); - // EBPF_OP_OR64_REG pc=180 dst=r4 src=r5 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=195 dst=r4 src=r5 offset=0 imm=0 #line 32 "sample/./xdp_common.h" r4 |= r5; - // EBPF_OP_LDXB pc=181 dst=r0 src=r1 offset=91 imm=0 + // EBPF_OP_LDXB pc=196 dst=r7 src=r1 offset=91 imm=0 #line 32 "sample/./xdp_common.h" - r0 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(91)); - // EBPF_OP_LSH64_IMM pc=182 dst=r0 src=r0 offset=0 imm=8 + r7 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(91)); + // EBPF_OP_LSH64_IMM pc=197 dst=r7 src=r0 offset=0 imm=8 #line 32 "sample/./xdp_common.h" - r0 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=183 dst=r5 src=r1 offset=90 imm=0 + r7 <<= (IMMEDIATE(8) & 63); + // EBPF_OP_LDXB pc=198 dst=r5 src=r1 offset=90 imm=0 #line 32 "sample/./xdp_common.h" r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(90)); - // EBPF_OP_OR64_REG pc=184 dst=r0 src=r5 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=199 dst=r7 src=r5 offset=0 imm=0 #line 32 "sample/./xdp_common.h" - r0 |= r5; - // EBPF_OP_LDXB pc=185 dst=r5 src=r1 offset=93 imm=0 + r7 |= r5; + // EBPF_OP_LDXB pc=200 dst=r5 src=r1 offset=93 imm=0 #line 32 "sample/./xdp_common.h" r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(93)); - // EBPF_OP_LSH64_IMM pc=186 dst=r5 src=r0 offset=0 imm=8 + // EBPF_OP_LSH64_IMM pc=201 dst=r5 src=r0 offset=0 imm=8 #line 32 "sample/./xdp_common.h" r5 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=187 dst=r6 src=r1 offset=92 imm=0 + // EBPF_OP_LDXB pc=202 dst=r8 src=r1 offset=92 imm=0 #line 32 "sample/./xdp_common.h" - r6 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(92)); - // EBPF_OP_OR64_REG pc=188 dst=r5 src=r6 offset=0 imm=0 + r8 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(92)); + // EBPF_OP_OR64_REG pc=203 dst=r5 src=r8 offset=0 imm=0 #line 32 "sample/./xdp_common.h" - r5 |= r6; - // EBPF_OP_LSH64_IMM pc=189 dst=r5 src=r0 offset=0 imm=16 + r5 |= r8; + // EBPF_OP_LSH64_IMM pc=204 dst=r5 src=r0 offset=0 imm=16 #line 32 "sample/./xdp_common.h" r5 <<= (IMMEDIATE(16) & 63); - // EBPF_OP_OR64_REG pc=190 dst=r5 src=r0 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=205 dst=r5 src=r7 offset=0 imm=0 #line 32 "sample/./xdp_common.h" - r5 |= r0; - // EBPF_OP_LSH64_IMM pc=191 dst=r5 src=r0 offset=0 imm=32 + r5 |= r7; + // EBPF_OP_LSH64_IMM pc=206 dst=r5 src=r0 offset=0 imm=32 #line 32 "sample/./xdp_common.h" r5 <<= (IMMEDIATE(32) & 63); - // EBPF_OP_OR64_REG pc=192 dst=r5 src=r4 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=207 dst=r5 src=r4 offset=0 imm=0 #line 32 "sample/./xdp_common.h" r5 |= r4; - // EBPF_OP_LDXB pc=193 dst=r0 src=r1 offset=79 imm=0 + // EBPF_OP_LDXB pc=208 dst=r7 src=r1 offset=79 imm=0 #line 32 "sample/./xdp_common.h" - r0 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(79)); - // EBPF_OP_LSH64_IMM pc=194 dst=r0 src=r0 offset=0 imm=8 + r7 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(79)); + // EBPF_OP_LSH64_IMM pc=209 dst=r7 src=r0 offset=0 imm=8 #line 32 "sample/./xdp_common.h" - r0 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=195 dst=r4 src=r1 offset=78 imm=0 + r7 <<= (IMMEDIATE(8) & 63); + // EBPF_OP_LDXB pc=210 dst=r4 src=r1 offset=78 imm=0 #line 32 "sample/./xdp_common.h" r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(78)); - // EBPF_OP_OR64_REG pc=196 dst=r0 src=r4 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=211 dst=r7 src=r4 offset=0 imm=0 #line 32 "sample/./xdp_common.h" - r0 |= r4; - // EBPF_OP_LDXB pc=197 dst=r4 src=r1 offset=81 imm=0 + r7 |= r4; + // EBPF_OP_LDXB pc=212 dst=r4 src=r1 offset=81 imm=0 #line 32 "sample/./xdp_common.h" r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(81)); - // EBPF_OP_LSH64_IMM pc=198 dst=r4 src=r0 offset=0 imm=8 + // EBPF_OP_LSH64_IMM pc=213 dst=r4 src=r0 offset=0 imm=8 #line 32 "sample/./xdp_common.h" r4 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=199 dst=r6 src=r1 offset=80 imm=0 + // EBPF_OP_LDXB pc=214 dst=r8 src=r1 offset=80 imm=0 #line 32 "sample/./xdp_common.h" - r6 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(80)); - // EBPF_OP_OR64_REG pc=200 dst=r4 src=r6 offset=0 imm=0 + r8 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(80)); + // EBPF_OP_OR64_REG pc=215 dst=r4 src=r8 offset=0 imm=0 #line 32 "sample/./xdp_common.h" - r4 |= r6; - // EBPF_OP_STXDW pc=201 dst=r10 src=r5 offset=-8 imm=0 + r4 |= r8; + // EBPF_OP_STXDW pc=216 dst=r10 src=r5 offset=-8 imm=0 #line 32 "sample/./xdp_common.h" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-8)) = (uint64_t)r5; - // EBPF_OP_LSH64_IMM pc=202 dst=r4 src=r0 offset=0 imm=16 + // EBPF_OP_LSH64_IMM pc=217 dst=r4 src=r0 offset=0 imm=16 #line 32 "sample/./xdp_common.h" r4 <<= (IMMEDIATE(16) & 63); - // EBPF_OP_OR64_REG pc=203 dst=r4 src=r0 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=218 dst=r4 src=r7 offset=0 imm=0 #line 32 "sample/./xdp_common.h" - r4 |= r0; - // EBPF_OP_LDXB pc=204 dst=r5 src=r1 offset=83 imm=0 + r4 |= r7; + // EBPF_OP_LDXB pc=219 dst=r5 src=r1 offset=83 imm=0 #line 32 "sample/./xdp_common.h" r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(83)); - // EBPF_OP_LSH64_IMM pc=205 dst=r5 src=r0 offset=0 imm=8 + // EBPF_OP_LSH64_IMM pc=220 dst=r5 src=r0 offset=0 imm=8 #line 32 "sample/./xdp_common.h" r5 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=206 dst=r0 src=r1 offset=82 imm=0 + // EBPF_OP_LDXB pc=221 dst=r7 src=r1 offset=82 imm=0 #line 32 "sample/./xdp_common.h" - r0 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(82)); - // EBPF_OP_OR64_REG pc=207 dst=r5 src=r0 offset=0 imm=0 + r7 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(82)); + // EBPF_OP_OR64_REG pc=222 dst=r5 src=r7 offset=0 imm=0 #line 32 "sample/./xdp_common.h" - r5 |= r0; - // EBPF_OP_LDXB pc=208 dst=r0 src=r1 offset=85 imm=0 + r5 |= r7; + // EBPF_OP_LDXB pc=223 dst=r7 src=r1 offset=85 imm=0 #line 32 "sample/./xdp_common.h" - r0 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(85)); - // EBPF_OP_LSH64_IMM pc=209 dst=r0 src=r0 offset=0 imm=8 + r7 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(85)); + // EBPF_OP_LSH64_IMM pc=224 dst=r7 src=r0 offset=0 imm=8 #line 32 "sample/./xdp_common.h" - r0 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=210 dst=r6 src=r1 offset=84 imm=0 + r7 <<= (IMMEDIATE(8) & 63); + // EBPF_OP_LDXB pc=225 dst=r8 src=r1 offset=84 imm=0 #line 32 "sample/./xdp_common.h" - r6 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(84)); - // EBPF_OP_OR64_REG pc=211 dst=r0 src=r6 offset=0 imm=0 + r8 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(84)); + // EBPF_OP_OR64_REG pc=226 dst=r7 src=r8 offset=0 imm=0 #line 32 "sample/./xdp_common.h" - r0 |= r6; - // EBPF_OP_LSH64_IMM pc=212 dst=r0 src=r0 offset=0 imm=16 + r7 |= r8; + // EBPF_OP_LSH64_IMM pc=227 dst=r7 src=r0 offset=0 imm=16 #line 32 "sample/./xdp_common.h" - r0 <<= (IMMEDIATE(16) & 63); - // EBPF_OP_OR64_REG pc=213 dst=r0 src=r5 offset=0 imm=0 + r7 <<= (IMMEDIATE(16) & 63); + // EBPF_OP_OR64_REG pc=228 dst=r7 src=r5 offset=0 imm=0 #line 32 "sample/./xdp_common.h" - r0 |= r5; - // EBPF_OP_LSH64_IMM pc=214 dst=r0 src=r0 offset=0 imm=32 + r7 |= r5; + // EBPF_OP_LSH64_IMM pc=229 dst=r7 src=r0 offset=0 imm=32 #line 32 "sample/./xdp_common.h" - r0 <<= (IMMEDIATE(32) & 63); - // EBPF_OP_OR64_REG pc=215 dst=r0 src=r4 offset=0 imm=0 + r7 <<= (IMMEDIATE(32) & 63); + // EBPF_OP_OR64_REG pc=230 dst=r7 src=r4 offset=0 imm=0 #line 32 "sample/./xdp_common.h" - r0 |= r4; - // EBPF_OP_STXDW pc=216 dst=r10 src=r0 offset=-16 imm=0 + r7 |= r4; + // EBPF_OP_STXDW pc=231 dst=r10 src=r7 offset=-16 imm=0 #line 32 "sample/./xdp_common.h" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-16)) = (uint64_t)r0; - // EBPF_OP_LDXW pc=217 dst=r4 src=r1 offset=62 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-16)) = (uint64_t)r7; + // EBPF_OP_LDXW pc=232 dst=r4 src=r1 offset=62 imm=0 #line 33 "sample/./xdp_common.h" r4 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(62)); - // EBPF_OP_STXW pc=218 dst=r1 src=r4 offset=78 imm=0 + // EBPF_OP_STXW pc=233 dst=r1 src=r4 offset=78 imm=0 #line 33 "sample/./xdp_common.h" *(uint32_t*)(uintptr_t)(r1 + OFFSET(78)) = (uint32_t)r4; - // EBPF_OP_LDXW pc=219 dst=r4 src=r1 offset=66 imm=0 + // EBPF_OP_LDXW pc=234 dst=r4 src=r1 offset=66 imm=0 #line 33 "sample/./xdp_common.h" r4 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(66)); - // EBPF_OP_STXW pc=220 dst=r1 src=r4 offset=82 imm=0 + // EBPF_OP_STXW pc=235 dst=r1 src=r4 offset=82 imm=0 #line 33 "sample/./xdp_common.h" *(uint32_t*)(uintptr_t)(r1 + OFFSET(82)) = (uint32_t)r4; - // EBPF_OP_LDXW pc=221 dst=r4 src=r1 offset=70 imm=0 + // EBPF_OP_LDXW pc=236 dst=r4 src=r1 offset=70 imm=0 #line 33 "sample/./xdp_common.h" r4 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(70)); - // EBPF_OP_STXW pc=222 dst=r1 src=r4 offset=86 imm=0 + // EBPF_OP_STXW pc=237 dst=r1 src=r4 offset=86 imm=0 #line 33 "sample/./xdp_common.h" *(uint32_t*)(uintptr_t)(r1 + OFFSET(86)) = (uint32_t)r4; - // EBPF_OP_LDXW pc=223 dst=r4 src=r1 offset=74 imm=0 + // EBPF_OP_LDXW pc=238 dst=r4 src=r1 offset=74 imm=0 #line 33 "sample/./xdp_common.h" r4 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(74)); - // EBPF_OP_STXW pc=224 dst=r1 src=r4 offset=90 imm=0 + // EBPF_OP_STXW pc=239 dst=r1 src=r4 offset=90 imm=0 #line 33 "sample/./xdp_common.h" *(uint32_t*)(uintptr_t)(r1 + OFFSET(90)) = (uint32_t)r4; - // EBPF_OP_LDXDW pc=225 dst=r4 src=r10 offset=-16 imm=0 + // EBPF_OP_LDXDW pc=240 dst=r4 src=r10 offset=-16 imm=0 #line 34 "sample/./xdp_common.h" r4 = *(uint64_t*)(uintptr_t)(r10 + OFFSET(-16)); - // EBPF_OP_MOV64_REG pc=226 dst=r5 src=r4 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=241 dst=r5 src=r4 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r5 = r4; - // EBPF_OP_RSH64_IMM pc=227 dst=r5 src=r0 offset=0 imm=48 + // EBPF_OP_RSH64_IMM pc=242 dst=r5 src=r0 offset=0 imm=48 #line 34 "sample/./xdp_common.h" r5 >>= (IMMEDIATE(48) & 63); - // EBPF_OP_STXB pc=228 dst=r1 src=r5 offset=68 imm=0 + // EBPF_OP_STXB pc=243 dst=r1 src=r5 offset=68 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(68)) = (uint8_t)r5; - // EBPF_OP_MOV64_REG pc=229 dst=r5 src=r4 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=244 dst=r5 src=r4 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r5 = r4; - // EBPF_OP_RSH64_IMM pc=230 dst=r5 src=r0 offset=0 imm=56 + // EBPF_OP_RSH64_IMM pc=245 dst=r5 src=r0 offset=0 imm=56 #line 34 "sample/./xdp_common.h" r5 >>= (IMMEDIATE(56) & 63); - // EBPF_OP_STXB pc=231 dst=r1 src=r5 offset=69 imm=0 + // EBPF_OP_STXB pc=246 dst=r1 src=r5 offset=69 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(69)) = (uint8_t)r5; - // EBPF_OP_MOV64_REG pc=232 dst=r5 src=r4 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=247 dst=r5 src=r4 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r5 = r4; - // EBPF_OP_RSH64_IMM pc=233 dst=r5 src=r0 offset=0 imm=32 + // EBPF_OP_RSH64_IMM pc=248 dst=r5 src=r0 offset=0 imm=32 #line 34 "sample/./xdp_common.h" r5 >>= (IMMEDIATE(32) & 63); - // EBPF_OP_STXB pc=234 dst=r1 src=r5 offset=66 imm=0 + // EBPF_OP_STXB pc=249 dst=r1 src=r5 offset=66 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(66)) = (uint8_t)r5; - // EBPF_OP_MOV64_REG pc=235 dst=r5 src=r4 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=250 dst=r5 src=r4 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r5 = r4; - // EBPF_OP_RSH64_IMM pc=236 dst=r5 src=r0 offset=0 imm=40 + // EBPF_OP_RSH64_IMM pc=251 dst=r5 src=r0 offset=0 imm=40 #line 34 "sample/./xdp_common.h" r5 >>= (IMMEDIATE(40) & 63); - // EBPF_OP_STXB pc=237 dst=r1 src=r5 offset=67 imm=0 + // EBPF_OP_STXB pc=252 dst=r1 src=r5 offset=67 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(67)) = (uint8_t)r5; - // EBPF_OP_MOV64_REG pc=238 dst=r5 src=r4 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=253 dst=r5 src=r4 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r5 = r4; - // EBPF_OP_RSH64_IMM pc=239 dst=r5 src=r0 offset=0 imm=16 + // EBPF_OP_RSH64_IMM pc=254 dst=r5 src=r0 offset=0 imm=16 #line 34 "sample/./xdp_common.h" r5 >>= (IMMEDIATE(16) & 63); - // EBPF_OP_STXB pc=240 dst=r1 src=r5 offset=64 imm=0 + // EBPF_OP_STXB pc=255 dst=r1 src=r5 offset=64 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(64)) = (uint8_t)r5; - // EBPF_OP_MOV64_REG pc=241 dst=r5 src=r4 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=256 dst=r5 src=r4 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r5 = r4; - // EBPF_OP_RSH64_IMM pc=242 dst=r5 src=r0 offset=0 imm=24 + // EBPF_OP_RSH64_IMM pc=257 dst=r5 src=r0 offset=0 imm=24 #line 34 "sample/./xdp_common.h" r5 >>= (IMMEDIATE(24) & 63); - // EBPF_OP_STXB pc=243 dst=r1 src=r5 offset=65 imm=0 + // EBPF_OP_STXB pc=258 dst=r1 src=r5 offset=65 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(65)) = (uint8_t)r5; - // EBPF_OP_STXB pc=244 dst=r1 src=r4 offset=62 imm=0 + // EBPF_OP_STXB pc=259 dst=r1 src=r4 offset=62 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(62)) = (uint8_t)r4; - // EBPF_OP_RSH64_IMM pc=245 dst=r4 src=r0 offset=0 imm=8 + // EBPF_OP_RSH64_IMM pc=260 dst=r4 src=r0 offset=0 imm=8 #line 34 "sample/./xdp_common.h" r4 >>= (IMMEDIATE(8) & 63); - // EBPF_OP_STXB pc=246 dst=r1 src=r4 offset=63 imm=0 + // EBPF_OP_STXB pc=261 dst=r1 src=r4 offset=63 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(63)) = (uint8_t)r4; - // EBPF_OP_LDXDW pc=247 dst=r4 src=r10 offset=-8 imm=0 + // EBPF_OP_LDXDW pc=262 dst=r4 src=r10 offset=-8 imm=0 #line 34 "sample/./xdp_common.h" r4 = *(uint64_t*)(uintptr_t)(r10 + OFFSET(-8)); - // EBPF_OP_MOV64_REG pc=248 dst=r5 src=r4 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=263 dst=r5 src=r4 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r5 = r4; - // EBPF_OP_RSH64_IMM pc=249 dst=r5 src=r0 offset=0 imm=48 + // EBPF_OP_RSH64_IMM pc=264 dst=r5 src=r0 offset=0 imm=48 #line 34 "sample/./xdp_common.h" r5 >>= (IMMEDIATE(48) & 63); - // EBPF_OP_STXB pc=250 dst=r1 src=r5 offset=76 imm=0 + // EBPF_OP_STXB pc=265 dst=r1 src=r5 offset=76 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(76)) = (uint8_t)r5; - // EBPF_OP_MOV64_REG pc=251 dst=r5 src=r4 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=266 dst=r5 src=r4 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r5 = r4; - // EBPF_OP_RSH64_IMM pc=252 dst=r5 src=r0 offset=0 imm=56 + // EBPF_OP_RSH64_IMM pc=267 dst=r5 src=r0 offset=0 imm=56 #line 34 "sample/./xdp_common.h" r5 >>= (IMMEDIATE(56) & 63); - // EBPF_OP_STXB pc=253 dst=r1 src=r5 offset=77 imm=0 + // EBPF_OP_STXB pc=268 dst=r1 src=r5 offset=77 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(77)) = (uint8_t)r5; - // EBPF_OP_MOV64_REG pc=254 dst=r5 src=r4 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=269 dst=r5 src=r4 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r5 = r4; - // EBPF_OP_RSH64_IMM pc=255 dst=r5 src=r0 offset=0 imm=32 + // EBPF_OP_RSH64_IMM pc=270 dst=r5 src=r0 offset=0 imm=32 #line 34 "sample/./xdp_common.h" r5 >>= (IMMEDIATE(32) & 63); - // EBPF_OP_STXB pc=256 dst=r1 src=r5 offset=74 imm=0 + // EBPF_OP_STXB pc=271 dst=r1 src=r5 offset=74 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(74)) = (uint8_t)r5; - // EBPF_OP_MOV64_REG pc=257 dst=r5 src=r4 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=272 dst=r5 src=r4 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r5 = r4; - // EBPF_OP_RSH64_IMM pc=258 dst=r5 src=r0 offset=0 imm=40 + // EBPF_OP_RSH64_IMM pc=273 dst=r5 src=r0 offset=0 imm=40 #line 34 "sample/./xdp_common.h" r5 >>= (IMMEDIATE(40) & 63); - // EBPF_OP_STXB pc=259 dst=r1 src=r5 offset=75 imm=0 + // EBPF_OP_STXB pc=274 dst=r1 src=r5 offset=75 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(75)) = (uint8_t)r5; - // EBPF_OP_MOV64_REG pc=260 dst=r5 src=r4 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=275 dst=r5 src=r4 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r5 = r4; - // EBPF_OP_RSH64_IMM pc=261 dst=r5 src=r0 offset=0 imm=16 + // EBPF_OP_RSH64_IMM pc=276 dst=r5 src=r0 offset=0 imm=16 #line 34 "sample/./xdp_common.h" r5 >>= (IMMEDIATE(16) & 63); - // EBPF_OP_STXB pc=262 dst=r1 src=r5 offset=72 imm=0 + // EBPF_OP_STXB pc=277 dst=r1 src=r5 offset=72 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(72)) = (uint8_t)r5; - // EBPF_OP_MOV64_REG pc=263 dst=r5 src=r4 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=278 dst=r5 src=r4 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r5 = r4; - // EBPF_OP_RSH64_IMM pc=264 dst=r5 src=r0 offset=0 imm=24 + // EBPF_OP_RSH64_IMM pc=279 dst=r5 src=r0 offset=0 imm=24 #line 34 "sample/./xdp_common.h" r5 >>= (IMMEDIATE(24) & 63); - // EBPF_OP_STXB pc=265 dst=r1 src=r5 offset=73 imm=0 + // EBPF_OP_STXB pc=280 dst=r1 src=r5 offset=73 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(73)) = (uint8_t)r5; - // EBPF_OP_STXB pc=266 dst=r1 src=r4 offset=70 imm=0 + // EBPF_OP_STXB pc=281 dst=r1 src=r4 offset=70 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(70)) = (uint8_t)r4; - // EBPF_OP_RSH64_IMM pc=267 dst=r4 src=r0 offset=0 imm=8 + // EBPF_OP_RSH64_IMM pc=282 dst=r4 src=r0 offset=0 imm=8 #line 34 "sample/./xdp_common.h" r4 >>= (IMMEDIATE(8) & 63); - // EBPF_OP_STXB pc=268 dst=r1 src=r4 offset=71 imm=0 + // EBPF_OP_STXB pc=283 dst=r1 src=r4 offset=71 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(71)) = (uint8_t)r4; - // EBPF_OP_LDXW pc=269 dst=r4 src=r3 offset=36 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_MOV64_REG pc=284 dst=r4 src=r1 offset=0 imm=0 +#line 138 "sample/encap_reflect_packet.c" + r4 = r1; + // EBPF_OP_ADD64_IMM pc=285 dst=r4 src=r0 offset=0 imm=102 +#line 138 "sample/encap_reflect_packet.c" + r4 += IMMEDIATE(102); + // EBPF_OP_LDXDW pc=286 dst=r5 src=r6 offset=8 imm=0 +#line 138 "sample/encap_reflect_packet.c" + r5 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(8)); + // EBPF_OP_JGT_REG pc=287 dst=r4 src=r5 offset=34 imm=0 +#line 138 "sample/encap_reflect_packet.c" + if (r4 > r5) +#line 138 "sample/encap_reflect_packet.c" + goto label_5; + // EBPF_OP_LDXH pc=288 dst=r4 src=r1 offset=96 imm=0 +#line 142 "sample/encap_reflect_packet.c" + r4 = *(uint16_t*)(uintptr_t)(r1 + OFFSET(96)); + // EBPF_OP_JNE_IMM pc=289 dst=r4 src=r0 offset=4 imm=7459 +#line 142 "sample/encap_reflect_packet.c" + if (r4 != IMMEDIATE(7459)) +#line 142 "sample/encap_reflect_packet.c" + goto label_3; + // EBPF_OP_LDXH pc=290 dst=r4 src=r1 offset=94 imm=0 +#line 40 "sample/./xdp_common.h" + r4 = *(uint16_t*)(uintptr_t)(r1 + OFFSET(94)); + // EBPF_OP_STXH pc=291 dst=r1 src=r4 offset=96 imm=0 +#line 42 "sample/./xdp_common.h" + *(uint16_t*)(uintptr_t)(r1 + OFFSET(96)) = (uint16_t)r4; + // EBPF_OP_MOV64_IMM pc=292 dst=r4 src=r0 offset=0 imm=7459 +#line 42 "sample/./xdp_common.h" + r4 = IMMEDIATE(7459); + // EBPF_OP_STXH pc=293 dst=r1 src=r4 offset=94 imm=0 +#line 41 "sample/./xdp_common.h" + *(uint16_t*)(uintptr_t)(r1 + OFFSET(94)) = (uint16_t)r4; +label_3: + // EBPF_OP_LDXW pc=294 dst=r4 src=r3 offset=36 imm=0 +#line 147 "sample/encap_reflect_packet.c" r4 = *(uint32_t*)(uintptr_t)(r3 + OFFSET(36)); - // EBPF_OP_STXW pc=270 dst=r2 src=r4 offset=36 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_STXW pc=295 dst=r2 src=r4 offset=36 imm=0 +#line 147 "sample/encap_reflect_packet.c" *(uint32_t*)(uintptr_t)(r2 + OFFSET(36)) = (uint32_t)r4; - // EBPF_OP_LDXW pc=271 dst=r4 src=r3 offset=32 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_LDXW pc=296 dst=r4 src=r3 offset=32 imm=0 +#line 147 "sample/encap_reflect_packet.c" r4 = *(uint32_t*)(uintptr_t)(r3 + OFFSET(32)); - // EBPF_OP_STXW pc=272 dst=r2 src=r4 offset=32 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_STXW pc=297 dst=r2 src=r4 offset=32 imm=0 +#line 147 "sample/encap_reflect_packet.c" *(uint32_t*)(uintptr_t)(r2 + OFFSET(32)) = (uint32_t)r4; - // EBPF_OP_LDXW pc=273 dst=r4 src=r3 offset=28 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_LDXW pc=298 dst=r4 src=r3 offset=28 imm=0 +#line 147 "sample/encap_reflect_packet.c" r4 = *(uint32_t*)(uintptr_t)(r3 + OFFSET(28)); - // EBPF_OP_STXW pc=274 dst=r2 src=r4 offset=28 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_STXW pc=299 dst=r2 src=r4 offset=28 imm=0 +#line 147 "sample/encap_reflect_packet.c" *(uint32_t*)(uintptr_t)(r2 + OFFSET(28)) = (uint32_t)r4; - // EBPF_OP_LDXW pc=275 dst=r4 src=r3 offset=24 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_LDXW pc=300 dst=r4 src=r3 offset=24 imm=0 +#line 147 "sample/encap_reflect_packet.c" r4 = *(uint32_t*)(uintptr_t)(r3 + OFFSET(24)); - // EBPF_OP_STXW pc=276 dst=r2 src=r4 offset=24 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_STXW pc=301 dst=r2 src=r4 offset=24 imm=0 +#line 147 "sample/encap_reflect_packet.c" *(uint32_t*)(uintptr_t)(r2 + OFFSET(24)) = (uint32_t)r4; - // EBPF_OP_LDXW pc=277 dst=r4 src=r3 offset=20 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_LDXW pc=302 dst=r4 src=r3 offset=20 imm=0 +#line 147 "sample/encap_reflect_packet.c" r4 = *(uint32_t*)(uintptr_t)(r3 + OFFSET(20)); - // EBPF_OP_STXW pc=278 dst=r2 src=r4 offset=20 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_STXW pc=303 dst=r2 src=r4 offset=20 imm=0 +#line 147 "sample/encap_reflect_packet.c" *(uint32_t*)(uintptr_t)(r2 + OFFSET(20)) = (uint32_t)r4; - // EBPF_OP_LDXW pc=279 dst=r4 src=r3 offset=16 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_LDXW pc=304 dst=r4 src=r3 offset=16 imm=0 +#line 147 "sample/encap_reflect_packet.c" r4 = *(uint32_t*)(uintptr_t)(r3 + OFFSET(16)); - // EBPF_OP_STXW pc=280 dst=r2 src=r4 offset=16 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_STXW pc=305 dst=r2 src=r4 offset=16 imm=0 +#line 147 "sample/encap_reflect_packet.c" *(uint32_t*)(uintptr_t)(r2 + OFFSET(16)) = (uint32_t)r4; - // EBPF_OP_LDXW pc=281 dst=r4 src=r3 offset=12 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_LDXW pc=306 dst=r4 src=r3 offset=12 imm=0 +#line 147 "sample/encap_reflect_packet.c" r4 = *(uint32_t*)(uintptr_t)(r3 + OFFSET(12)); - // EBPF_OP_STXW pc=282 dst=r2 src=r4 offset=12 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_STXW pc=307 dst=r2 src=r4 offset=12 imm=0 +#line 147 "sample/encap_reflect_packet.c" *(uint32_t*)(uintptr_t)(r2 + OFFSET(12)) = (uint32_t)r4; - // EBPF_OP_LDXW pc=283 dst=r4 src=r3 offset=8 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_LDXW pc=308 dst=r4 src=r3 offset=8 imm=0 +#line 147 "sample/encap_reflect_packet.c" r4 = *(uint32_t*)(uintptr_t)(r3 + OFFSET(8)); - // EBPF_OP_STXW pc=284 dst=r2 src=r4 offset=8 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_STXW pc=309 dst=r2 src=r4 offset=8 imm=0 +#line 147 "sample/encap_reflect_packet.c" *(uint32_t*)(uintptr_t)(r2 + OFFSET(8)) = (uint32_t)r4; - // EBPF_OP_LDXW pc=285 dst=r4 src=r3 offset=4 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_LDXW pc=310 dst=r4 src=r3 offset=4 imm=0 +#line 147 "sample/encap_reflect_packet.c" r4 = *(uint32_t*)(uintptr_t)(r3 + OFFSET(4)); - // EBPF_OP_STXW pc=286 dst=r2 src=r4 offset=4 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_STXW pc=311 dst=r2 src=r4 offset=4 imm=0 +#line 147 "sample/encap_reflect_packet.c" *(uint32_t*)(uintptr_t)(r2 + OFFSET(4)) = (uint32_t)r4; - // EBPF_OP_LDXW pc=287 dst=r3 src=r3 offset=0 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_LDXW pc=312 dst=r3 src=r3 offset=0 imm=0 +#line 147 "sample/encap_reflect_packet.c" r3 = *(uint32_t*)(uintptr_t)(r3 + OFFSET(0)); - // EBPF_OP_STXW pc=288 dst=r2 src=r3 offset=0 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_STXW pc=313 dst=r2 src=r3 offset=0 imm=0 +#line 147 "sample/encap_reflect_packet.c" *(uint32_t*)(uintptr_t)(r2 + OFFSET(0)) = (uint32_t)r3; - // EBPF_OP_MOV64_IMM pc=289 dst=r2 src=r0 offset=0 imm=41 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_MOV64_IMM pc=314 dst=r2 src=r0 offset=0 imm=41 +#line 147 "sample/encap_reflect_packet.c" r2 = IMMEDIATE(41); - // EBPF_OP_STXB pc=290 dst=r1 src=r2 offset=20 imm=0 -#line 132 "sample/encap_reflect_packet.c" + // EBPF_OP_STXB pc=315 dst=r1 src=r2 offset=20 imm=0 +#line 150 "sample/encap_reflect_packet.c" *(uint8_t*)(uintptr_t)(r1 + OFFSET(20)) = (uint8_t)r2; - // EBPF_OP_LDXH pc=291 dst=r2 src=r1 offset=58 imm=0 -#line 133 "sample/encap_reflect_packet.c" + // EBPF_OP_LDXH pc=316 dst=r2 src=r1 offset=58 imm=0 +#line 151 "sample/encap_reflect_packet.c" r2 = *(uint16_t*)(uintptr_t)(r1 + OFFSET(58)); - // EBPF_OP_BE pc=292 dst=r2 src=r0 offset=0 imm=16 -#line 133 "sample/encap_reflect_packet.c" + // EBPF_OP_BE pc=317 dst=r2 src=r0 offset=0 imm=16 +#line 151 "sample/encap_reflect_packet.c" r2 = htobe16((uint16_t)r2); -#line 133 "sample/encap_reflect_packet.c" +#line 151 "sample/encap_reflect_packet.c" r2 &= UINT32_MAX; - // EBPF_OP_ADD64_IMM pc=293 dst=r2 src=r0 offset=0 imm=40 -#line 133 "sample/encap_reflect_packet.c" + // EBPF_OP_ADD64_IMM pc=318 dst=r2 src=r0 offset=0 imm=40 +#line 151 "sample/encap_reflect_packet.c" r2 += IMMEDIATE(40); - // EBPF_OP_BE pc=294 dst=r2 src=r0 offset=0 imm=16 -#line 133 "sample/encap_reflect_packet.c" + // EBPF_OP_BE pc=319 dst=r2 src=r0 offset=0 imm=16 +#line 151 "sample/encap_reflect_packet.c" r2 = htobe16((uint16_t)r2); -#line 133 "sample/encap_reflect_packet.c" +#line 151 "sample/encap_reflect_packet.c" r2 &= UINT32_MAX; - // EBPF_OP_STXH pc=295 dst=r1 src=r2 offset=18 imm=0 -#line 133 "sample/encap_reflect_packet.c" + // EBPF_OP_STXH pc=320 dst=r1 src=r2 offset=18 imm=0 +#line 151 "sample/encap_reflect_packet.c" *(uint16_t*)(uintptr_t)(r1 + OFFSET(18)) = (uint16_t)r2; -label_2: - // EBPF_OP_MOV64_IMM pc=296 dst=r0 src=r0 offset=0 imm=3 -#line 133 "sample/encap_reflect_packet.c" +label_4: + // EBPF_OP_MOV64_IMM pc=321 dst=r0 src=r0 offset=0 imm=3 +#line 151 "sample/encap_reflect_packet.c" r0 = IMMEDIATE(3); -label_3: - // EBPF_OP_EXIT pc=297 dst=r0 src=r0 offset=0 imm=0 -#line 198 "sample/encap_reflect_packet.c" +label_5: + // EBPF_OP_EXIT pc=322 dst=r0 src=r0 offset=0 imm=0 +#line 216 "sample/encap_reflect_packet.c" return r0; -#line 198 "sample/encap_reflect_packet.c" +#line 216 "sample/encap_reflect_packet.c" } #pragma code_seg(pop) #line __LINE__ __FILE__ @@ -1061,7 +1150,7 @@ static program_entry_t _programs[] = { 0, encap_reflect_packet_helpers, 2, - 298, + 323, &encap_reflect_packet_program_type_guid, &encap_reflect_packet_attach_type_guid, }, diff --git a/tests/bpf2c_tests/expected/encap_reflect_packet_raw.c b/tests/bpf2c_tests/expected/encap_reflect_packet_raw.c index a842852cd5..d7db3f1240 100644 --- a/tests/bpf2c_tests/expected/encap_reflect_packet_raw.c +++ b/tests/bpf2c_tests/expected/encap_reflect_packet_raw.c @@ -31,120 +31,124 @@ static GUID encap_reflect_packet_attach_type_guid = { #pragma code_seg(push, "xdp/en~1") static uint64_t encap_reflect_packet(void* context) -#line 149 "sample/encap_reflect_packet.c" +#line 167 "sample/encap_reflect_packet.c" { -#line 149 "sample/encap_reflect_packet.c" +#line 167 "sample/encap_reflect_packet.c" // Prologue -#line 149 "sample/encap_reflect_packet.c" +#line 167 "sample/encap_reflect_packet.c" uint64_t stack[(UBPF_STACK_SIZE + 7) / 8]; -#line 149 "sample/encap_reflect_packet.c" +#line 167 "sample/encap_reflect_packet.c" register uint64_t r0 = 0; -#line 149 "sample/encap_reflect_packet.c" +#line 167 "sample/encap_reflect_packet.c" register uint64_t r1 = 0; -#line 149 "sample/encap_reflect_packet.c" +#line 167 "sample/encap_reflect_packet.c" register uint64_t r2 = 0; -#line 149 "sample/encap_reflect_packet.c" +#line 167 "sample/encap_reflect_packet.c" register uint64_t r3 = 0; -#line 149 "sample/encap_reflect_packet.c" +#line 167 "sample/encap_reflect_packet.c" register uint64_t r4 = 0; -#line 149 "sample/encap_reflect_packet.c" +#line 167 "sample/encap_reflect_packet.c" register uint64_t r5 = 0; -#line 149 "sample/encap_reflect_packet.c" +#line 167 "sample/encap_reflect_packet.c" register uint64_t r6 = 0; -#line 149 "sample/encap_reflect_packet.c" +#line 167 "sample/encap_reflect_packet.c" + register uint64_t r7 = 0; +#line 167 "sample/encap_reflect_packet.c" + register uint64_t r8 = 0; +#line 167 "sample/encap_reflect_packet.c" register uint64_t r10 = 0; -#line 149 "sample/encap_reflect_packet.c" +#line 167 "sample/encap_reflect_packet.c" r1 = (uintptr_t)context; -#line 149 "sample/encap_reflect_packet.c" +#line 167 "sample/encap_reflect_packet.c" r10 = (uintptr_t)((uint8_t*)stack + sizeof(stack)); // EBPF_OP_MOV64_REG pc=0 dst=r6 src=r1 offset=0 imm=0 -#line 149 "sample/encap_reflect_packet.c" +#line 167 "sample/encap_reflect_packet.c" r6 = r1; // EBPF_OP_MOV64_IMM pc=1 dst=r0 src=r0 offset=0 imm=1 -#line 149 "sample/encap_reflect_packet.c" +#line 167 "sample/encap_reflect_packet.c" r0 = IMMEDIATE(1); // EBPF_OP_LDXDW pc=2 dst=r1 src=r6 offset=8 imm=0 -#line 155 "sample/encap_reflect_packet.c" +#line 173 "sample/encap_reflect_packet.c" r1 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(8)); // EBPF_OP_LDXDW pc=3 dst=r2 src=r6 offset=0 imm=0 -#line 154 "sample/encap_reflect_packet.c" +#line 172 "sample/encap_reflect_packet.c" r2 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(0)); // EBPF_OP_MOV64_REG pc=4 dst=r3 src=r2 offset=0 imm=0 -#line 155 "sample/encap_reflect_packet.c" +#line 173 "sample/encap_reflect_packet.c" r3 = r2; // EBPF_OP_ADD64_IMM pc=5 dst=r3 src=r0 offset=0 imm=14 -#line 155 "sample/encap_reflect_packet.c" +#line 173 "sample/encap_reflect_packet.c" r3 += IMMEDIATE(14); - // EBPF_OP_JGT_REG pc=6 dst=r3 src=r1 offset=290 imm=0 -#line 155 "sample/encap_reflect_packet.c" + // EBPF_OP_JGT_REG pc=6 dst=r3 src=r1 offset=315 imm=0 +#line 173 "sample/encap_reflect_packet.c" if (r3 > r1) -#line 155 "sample/encap_reflect_packet.c" - goto label_3; +#line 173 "sample/encap_reflect_packet.c" + goto label_5; // EBPF_OP_LDXH pc=7 dst=r4 src=r2 offset=12 imm=0 -#line 160 "sample/encap_reflect_packet.c" +#line 178 "sample/encap_reflect_packet.c" r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(12)); - // EBPF_OP_JEQ_IMM pc=8 dst=r4 src=r0 offset=105 imm=56710 -#line 160 "sample/encap_reflect_packet.c" + // EBPF_OP_JEQ_IMM pc=8 dst=r4 src=r0 offset=120 imm=56710 +#line 178 "sample/encap_reflect_packet.c" if (r4 == IMMEDIATE(56710)) -#line 160 "sample/encap_reflect_packet.c" - goto label_1; - // EBPF_OP_JNE_IMM pc=9 dst=r4 src=r0 offset=287 imm=8 -#line 160 "sample/encap_reflect_packet.c" +#line 178 "sample/encap_reflect_packet.c" + goto label_2; + // EBPF_OP_JNE_IMM pc=9 dst=r4 src=r0 offset=312 imm=8 +#line 178 "sample/encap_reflect_packet.c" if (r4 != IMMEDIATE(8)) -#line 160 "sample/encap_reflect_packet.c" - goto label_3; +#line 178 "sample/encap_reflect_packet.c" + goto label_5; // EBPF_OP_MOV64_REG pc=10 dst=r4 src=r2 offset=0 imm=0 -#line 161 "sample/encap_reflect_packet.c" +#line 179 "sample/encap_reflect_packet.c" r4 = r2; // EBPF_OP_ADD64_IMM pc=11 dst=r4 src=r0 offset=0 imm=34 -#line 161 "sample/encap_reflect_packet.c" +#line 179 "sample/encap_reflect_packet.c" r4 += IMMEDIATE(34); - // EBPF_OP_JGT_REG pc=12 dst=r4 src=r1 offset=284 imm=0 -#line 161 "sample/encap_reflect_packet.c" + // EBPF_OP_JGT_REG pc=12 dst=r4 src=r1 offset=309 imm=0 +#line 179 "sample/encap_reflect_packet.c" if (r4 > r1) -#line 161 "sample/encap_reflect_packet.c" - goto label_3; +#line 179 "sample/encap_reflect_packet.c" + goto label_5; // EBPF_OP_LDXB pc=13 dst=r4 src=r2 offset=23 imm=0 -#line 167 "sample/encap_reflect_packet.c" +#line 185 "sample/encap_reflect_packet.c" r4 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(23)); - // EBPF_OP_JNE_IMM pc=14 dst=r4 src=r0 offset=282 imm=17 -#line 167 "sample/encap_reflect_packet.c" + // EBPF_OP_JNE_IMM pc=14 dst=r4 src=r0 offset=307 imm=17 +#line 185 "sample/encap_reflect_packet.c" if (r4 != IMMEDIATE(17)) -#line 167 "sample/encap_reflect_packet.c" - goto label_3; +#line 185 "sample/encap_reflect_packet.c" + goto label_5; // EBPF_OP_LDXB pc=15 dst=r2 src=r2 offset=14 imm=0 -#line 167 "sample/encap_reflect_packet.c" +#line 185 "sample/encap_reflect_packet.c" r2 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(14)); // EBPF_OP_LSH64_IMM pc=16 dst=r2 src=r0 offset=0 imm=2 -#line 167 "sample/encap_reflect_packet.c" +#line 185 "sample/encap_reflect_packet.c" r2 <<= (IMMEDIATE(2) & 63); // EBPF_OP_AND64_IMM pc=17 dst=r2 src=r0 offset=0 imm=60 -#line 167 "sample/encap_reflect_packet.c" +#line 185 "sample/encap_reflect_packet.c" r2 &= IMMEDIATE(60); // EBPF_OP_ADD64_REG pc=18 dst=r3 src=r2 offset=0 imm=0 -#line 167 "sample/encap_reflect_packet.c" +#line 185 "sample/encap_reflect_packet.c" r3 += r2; // EBPF_OP_MOV64_REG pc=19 dst=r2 src=r3 offset=0 imm=0 -#line 167 "sample/encap_reflect_packet.c" +#line 185 "sample/encap_reflect_packet.c" r2 = r3; // EBPF_OP_ADD64_IMM pc=20 dst=r2 src=r0 offset=0 imm=8 -#line 167 "sample/encap_reflect_packet.c" +#line 185 "sample/encap_reflect_packet.c" r2 += IMMEDIATE(8); - // EBPF_OP_JGT_REG pc=21 dst=r2 src=r1 offset=275 imm=0 -#line 167 "sample/encap_reflect_packet.c" + // EBPF_OP_JGT_REG pc=21 dst=r2 src=r1 offset=300 imm=0 +#line 185 "sample/encap_reflect_packet.c" if (r2 > r1) -#line 167 "sample/encap_reflect_packet.c" - goto label_3; +#line 185 "sample/encap_reflect_packet.c" + goto label_5; // EBPF_OP_LDXH pc=22 dst=r1 src=r3 offset=2 imm=0 -#line 173 "sample/encap_reflect_packet.c" +#line 191 "sample/encap_reflect_packet.c" r1 = *(uint16_t*)(uintptr_t)(r3 + OFFSET(2)); - // EBPF_OP_JNE_IMM pc=23 dst=r1 src=r0 offset=273 imm=7459 -#line 173 "sample/encap_reflect_packet.c" + // EBPF_OP_JNE_IMM pc=23 dst=r1 src=r0 offset=298 imm=7459 +#line 191 "sample/encap_reflect_packet.c" if (r1 != IMMEDIATE(7459)) -#line 173 "sample/encap_reflect_packet.c" - goto label_3; +#line 191 "sample/encap_reflect_packet.c" + goto label_5; // EBPF_OP_MOV64_REG pc=24 dst=r1 src=r6 offset=0 imm=0 #line 22 "sample/encap_reflect_packet.c" r1 = r6; @@ -175,850 +179,935 @@ encap_reflect_packet(void* context) // EBPF_OP_MOV64_IMM pc=32 dst=r2 src=r0 offset=0 imm=0 #line 22 "sample/encap_reflect_packet.c" r2 = IMMEDIATE(0); - // EBPF_OP_JSGT_REG pc=33 dst=r2 src=r1 offset=263 imm=0 + // EBPF_OP_JSGT_REG pc=33 dst=r2 src=r1 offset=288 imm=0 #line 22 "sample/encap_reflect_packet.c" if ((int64_t)r2 > (int64_t)r1) #line 22 "sample/encap_reflect_packet.c" - goto label_3; + goto label_5; // EBPF_OP_LDXDW pc=34 dst=r4 src=r6 offset=8 imm=0 #line 28 "sample/encap_reflect_packet.c" r4 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(8)); - // EBPF_OP_LDXDW pc=35 dst=r6 src=r6 offset=0 imm=0 + // EBPF_OP_LDXDW pc=35 dst=r7 src=r6 offset=0 imm=0 #line 27 "sample/encap_reflect_packet.c" - r6 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(0)); - // EBPF_OP_MOV64_REG pc=36 dst=r3 src=r6 offset=0 imm=0 + r7 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(0)); + // EBPF_OP_MOV64_REG pc=36 dst=r3 src=r7 offset=0 imm=0 #line 28 "sample/encap_reflect_packet.c" - r3 = r6; + r3 = r7; // EBPF_OP_ADD64_IMM pc=37 dst=r3 src=r0 offset=0 imm=14 #line 28 "sample/encap_reflect_packet.c" r3 += IMMEDIATE(14); - // EBPF_OP_JGT_REG pc=38 dst=r3 src=r4 offset=258 imm=0 + // EBPF_OP_JGT_REG pc=38 dst=r3 src=r4 offset=283 imm=0 #line 28 "sample/encap_reflect_packet.c" if (r3 > r4) #line 28 "sample/encap_reflect_packet.c" - goto label_3; - // EBPF_OP_MOV64_REG pc=39 dst=r2 src=r6 offset=0 imm=0 + goto label_5; + // EBPF_OP_MOV64_REG pc=39 dst=r2 src=r7 offset=0 imm=0 #line 35 "sample/encap_reflect_packet.c" - r2 = r6; + r2 = r7; // EBPF_OP_ADD64_IMM pc=40 dst=r2 src=r0 offset=0 imm=20 #line 35 "sample/encap_reflect_packet.c" r2 += IMMEDIATE(20); - // EBPF_OP_JGT_REG pc=41 dst=r2 src=r4 offset=255 imm=0 + // EBPF_OP_JGT_REG pc=41 dst=r2 src=r4 offset=280 imm=0 #line 35 "sample/encap_reflect_packet.c" if (r2 > r4) #line 35 "sample/encap_reflect_packet.c" - goto label_3; - // EBPF_OP_MOV64_REG pc=42 dst=r1 src=r6 offset=0 imm=0 + goto label_5; + // EBPF_OP_MOV64_REG pc=42 dst=r1 src=r7 offset=0 imm=0 #line 43 "sample/encap_reflect_packet.c" - r1 = r6; + r1 = r7; // EBPF_OP_ADD64_IMM pc=43 dst=r1 src=r0 offset=0 imm=34 #line 43 "sample/encap_reflect_packet.c" r1 += IMMEDIATE(34); - // EBPF_OP_JGT_REG pc=44 dst=r1 src=r4 offset=252 imm=0 + // EBPF_OP_JGT_REG pc=44 dst=r1 src=r4 offset=277 imm=0 #line 43 "sample/encap_reflect_packet.c" if (r1 > r4) #line 43 "sample/encap_reflect_packet.c" - goto label_3; - // EBPF_OP_MOV64_REG pc=45 dst=r5 src=r6 offset=0 imm=0 + goto label_5; + // EBPF_OP_MOV64_REG pc=45 dst=r5 src=r7 offset=0 imm=0 #line 43 "sample/encap_reflect_packet.c" - r5 = r6; + r5 = r7; // EBPF_OP_ADD64_IMM pc=46 dst=r5 src=r0 offset=0 imm=54 #line 43 "sample/encap_reflect_packet.c" r5 += IMMEDIATE(54); - // EBPF_OP_JGT_REG pc=47 dst=r5 src=r4 offset=249 imm=0 + // EBPF_OP_JGT_REG pc=47 dst=r5 src=r4 offset=274 imm=0 #line 43 "sample/encap_reflect_packet.c" if (r5 > r4) #line 43 "sample/encap_reflect_packet.c" - goto label_3; + goto label_5; // EBPF_OP_LDXH pc=48 dst=r4 src=r2 offset=4 imm=0 #line 56 "sample/encap_reflect_packet.c" r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(4)); - // EBPF_OP_STXH pc=49 dst=r6 src=r4 offset=4 imm=0 + // EBPF_OP_STXH pc=49 dst=r7 src=r4 offset=4 imm=0 #line 56 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(4)) = (uint16_t)r4; + *(uint16_t*)(uintptr_t)(r7 + OFFSET(4)) = (uint16_t)r4; // EBPF_OP_LDXH pc=50 dst=r4 src=r2 offset=0 imm=0 #line 56 "sample/encap_reflect_packet.c" r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(0)); - // EBPF_OP_STXH pc=51 dst=r6 src=r4 offset=0 imm=0 + // EBPF_OP_STXH pc=51 dst=r7 src=r4 offset=0 imm=0 #line 56 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(0)) = (uint16_t)r4; + *(uint16_t*)(uintptr_t)(r7 + OFFSET(0)) = (uint16_t)r4; // EBPF_OP_LDXH pc=52 dst=r4 src=r2 offset=2 imm=0 #line 56 "sample/encap_reflect_packet.c" r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(2)); - // EBPF_OP_STXH pc=53 dst=r6 src=r4 offset=2 imm=0 + // EBPF_OP_STXH pc=53 dst=r7 src=r4 offset=2 imm=0 #line 56 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(2)) = (uint16_t)r4; + *(uint16_t*)(uintptr_t)(r7 + OFFSET(2)) = (uint16_t)r4; // EBPF_OP_LDXH pc=54 dst=r4 src=r2 offset=12 imm=0 #line 56 "sample/encap_reflect_packet.c" r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(12)); - // EBPF_OP_STXH pc=55 dst=r6 src=r4 offset=12 imm=0 + // EBPF_OP_STXH pc=55 dst=r7 src=r4 offset=12 imm=0 #line 56 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(12)) = (uint16_t)r4; + *(uint16_t*)(uintptr_t)(r7 + OFFSET(12)) = (uint16_t)r4; // EBPF_OP_LDXH pc=56 dst=r4 src=r2 offset=10 imm=0 #line 56 "sample/encap_reflect_packet.c" r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(10)); - // EBPF_OP_STXH pc=57 dst=r6 src=r4 offset=10 imm=0 + // EBPF_OP_STXH pc=57 dst=r7 src=r4 offset=10 imm=0 #line 56 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(10)) = (uint16_t)r4; + *(uint16_t*)(uintptr_t)(r7 + OFFSET(10)) = (uint16_t)r4; // EBPF_OP_LDXH pc=58 dst=r5 src=r2 offset=8 imm=0 #line 56 "sample/encap_reflect_packet.c" r5 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(8)); - // EBPF_OP_LDXH pc=59 dst=r0 src=r2 offset=6 imm=0 + // EBPF_OP_LDXH pc=59 dst=r8 src=r2 offset=6 imm=0 #line 56 "sample/encap_reflect_packet.c" - r0 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(6)); - // EBPF_OP_STXH pc=60 dst=r6 src=r4 offset=4 imm=0 + r8 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(6)); + // EBPF_OP_STXH pc=60 dst=r7 src=r4 offset=4 imm=0 #line 16 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(4)) = (uint16_t)r4; - // EBPF_OP_STXH pc=61 dst=r6 src=r0 offset=6 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(4)) = (uint16_t)r4; + // EBPF_OP_STXH pc=61 dst=r7 src=r8 offset=6 imm=0 #line 56 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(6)) = (uint16_t)r0; - // EBPF_OP_STXH pc=62 dst=r6 src=r0 offset=0 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(6)) = (uint16_t)r8; + // EBPF_OP_STXH pc=62 dst=r7 src=r8 offset=0 imm=0 #line 16 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(0)) = (uint16_t)r0; - // EBPF_OP_STXH pc=63 dst=r6 src=r5 offset=8 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(0)) = (uint16_t)r8; + // EBPF_OP_STXH pc=63 dst=r7 src=r5 offset=8 imm=0 #line 56 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(8)) = (uint16_t)r5; - // EBPF_OP_STXH pc=64 dst=r6 src=r5 offset=2 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(8)) = (uint16_t)r5; + // EBPF_OP_STXH pc=64 dst=r7 src=r5 offset=2 imm=0 #line 16 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(2)) = (uint16_t)r5; + *(uint16_t*)(uintptr_t)(r7 + OFFSET(2)) = (uint16_t)r5; // EBPF_OP_LDXH pc=65 dst=r4 src=r2 offset=4 imm=0 #line 17 "sample/./xdp_common.h" r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(4)); - // EBPF_OP_STXH pc=66 dst=r6 src=r4 offset=10 imm=0 + // EBPF_OP_STXH pc=66 dst=r7 src=r4 offset=10 imm=0 #line 17 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(10)) = (uint16_t)r4; - // EBPF_OP_LDXH pc=67 dst=r4 src=r2 offset=2 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(10)) = (uint16_t)r4; + // EBPF_OP_LDXH pc=67 dst=r4 src=r2 offset=0 imm=0 #line 17 "sample/./xdp_common.h" - r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(2)); - // EBPF_OP_LDXH pc=68 dst=r2 src=r2 offset=0 imm=0 + r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(0)); + // EBPF_OP_STXH pc=68 dst=r7 src=r4 offset=6 imm=0 +#line 17 "sample/./xdp_common.h" + *(uint16_t*)(uintptr_t)(r7 + OFFSET(6)) = (uint16_t)r4; + // EBPF_OP_LDXH pc=69 dst=r2 src=r2 offset=2 imm=0 +#line 17 "sample/./xdp_common.h" + r2 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(2)); + // EBPF_OP_STXH pc=70 dst=r7 src=r2 offset=8 imm=0 #line 17 "sample/./xdp_common.h" - r2 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(0)); - // EBPF_OP_LDXW pc=69 dst=r5 src=r6 offset=50 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(8)) = (uint16_t)r2; + // EBPF_OP_LDXW pc=71 dst=r2 src=r7 offset=50 imm=0 #line 23 "sample/./xdp_common.h" - r5 = *(uint32_t*)(uintptr_t)(r6 + OFFSET(50)); - // EBPF_OP_LDXW pc=70 dst=r0 src=r6 offset=46 imm=0 + r2 = *(uint32_t*)(uintptr_t)(r7 + OFFSET(50)); + // EBPF_OP_LDXW pc=72 dst=r4 src=r7 offset=46 imm=0 #line 24 "sample/./xdp_common.h" - r0 = *(uint32_t*)(uintptr_t)(r6 + OFFSET(46)); - // EBPF_OP_STXW pc=71 dst=r6 src=r0 offset=50 imm=0 + r4 = *(uint32_t*)(uintptr_t)(r7 + OFFSET(46)); + // EBPF_OP_STXW pc=73 dst=r7 src=r4 offset=50 imm=0 #line 24 "sample/./xdp_common.h" - *(uint32_t*)(uintptr_t)(r6 + OFFSET(50)) = (uint32_t)r0; - // EBPF_OP_STXW pc=72 dst=r6 src=r5 offset=46 imm=0 + *(uint32_t*)(uintptr_t)(r7 + OFFSET(50)) = (uint32_t)r4; + // EBPF_OP_STXW pc=74 dst=r7 src=r2 offset=46 imm=0 #line 25 "sample/./xdp_common.h" - *(uint32_t*)(uintptr_t)(r6 + OFFSET(46)) = (uint32_t)r5; - // EBPF_OP_STXH pc=73 dst=r6 src=r2 offset=6 imm=0 -#line 17 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(6)) = (uint16_t)r2; - // EBPF_OP_STXH pc=74 dst=r6 src=r4 offset=8 imm=0 -#line 17 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(8)) = (uint16_t)r4; - // EBPF_OP_LDXW pc=75 dst=r2 src=r1 offset=16 imm=0 -#line 64 "sample/encap_reflect_packet.c" - r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(16)); - // EBPF_OP_STXW pc=76 dst=r3 src=r2 offset=16 imm=0 -#line 64 "sample/encap_reflect_packet.c" - *(uint32_t*)(uintptr_t)(r3 + OFFSET(16)) = (uint32_t)r2; - // EBPF_OP_LDXW pc=77 dst=r2 src=r1 offset=0 imm=0 + *(uint32_t*)(uintptr_t)(r7 + OFFSET(46)) = (uint32_t)r2; + // EBPF_OP_LDXB pc=75 dst=r4 src=r7 offset=34 imm=0 +#line 63 "sample/encap_reflect_packet.c" + r4 = *(uint8_t*)(uintptr_t)(r7 + OFFSET(34)); + // EBPF_OP_LSH64_IMM pc=76 dst=r4 src=r0 offset=0 imm=2 +#line 63 "sample/encap_reflect_packet.c" + r4 <<= (IMMEDIATE(2) & 63); + // EBPF_OP_AND64_IMM pc=77 dst=r4 src=r0 offset=0 imm=60 +#line 63 "sample/encap_reflect_packet.c" + r4 &= IMMEDIATE(60); + // EBPF_OP_MOV64_REG pc=78 dst=r2 src=r1 offset=0 imm=0 +#line 63 "sample/encap_reflect_packet.c" + r2 = r1; + // EBPF_OP_ADD64_REG pc=79 dst=r2 src=r4 offset=0 imm=0 +#line 63 "sample/encap_reflect_packet.c" + r2 += r4; + // EBPF_OP_MOV64_REG pc=80 dst=r4 src=r2 offset=0 imm=0 #line 64 "sample/encap_reflect_packet.c" - r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(0)); - // EBPF_OP_STXW pc=78 dst=r3 src=r2 offset=0 imm=0 + r4 = r2; + // EBPF_OP_ADD64_IMM pc=81 dst=r4 src=r0 offset=0 imm=8 #line 64 "sample/encap_reflect_packet.c" - *(uint32_t*)(uintptr_t)(r3 + OFFSET(0)) = (uint32_t)r2; - // EBPF_OP_LDXW pc=79 dst=r2 src=r1 offset=4 imm=0 + r4 += IMMEDIATE(8); + // EBPF_OP_LDXDW pc=82 dst=r5 src=r6 offset=8 imm=0 #line 64 "sample/encap_reflect_packet.c" - r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(4)); - // EBPF_OP_STXW pc=80 dst=r3 src=r2 offset=4 imm=0 + r5 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(8)); + // EBPF_OP_JGT_REG pc=83 dst=r4 src=r5 offset=238 imm=0 #line 64 "sample/encap_reflect_packet.c" - *(uint32_t*)(uintptr_t)(r3 + OFFSET(4)) = (uint32_t)r2; - // EBPF_OP_LDXW pc=81 dst=r2 src=r1 offset=8 imm=0 + if (r4 > r5) #line 64 "sample/encap_reflect_packet.c" + goto label_5; + // EBPF_OP_LDXH pc=84 dst=r4 src=r2 offset=2 imm=0 +#line 68 "sample/encap_reflect_packet.c" + r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(2)); + // EBPF_OP_JNE_IMM pc=85 dst=r4 src=r0 offset=4 imm=7459 +#line 68 "sample/encap_reflect_packet.c" + if (r4 != IMMEDIATE(7459)) +#line 68 "sample/encap_reflect_packet.c" + goto label_1; + // EBPF_OP_LDXH pc=86 dst=r4 src=r2 offset=0 imm=0 +#line 40 "sample/./xdp_common.h" + r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(0)); + // EBPF_OP_STXH pc=87 dst=r2 src=r4 offset=2 imm=0 +#line 42 "sample/./xdp_common.h" + *(uint16_t*)(uintptr_t)(r2 + OFFSET(2)) = (uint16_t)r4; + // EBPF_OP_MOV64_IMM pc=88 dst=r4 src=r0 offset=0 imm=7459 +#line 42 "sample/./xdp_common.h" + r4 = IMMEDIATE(7459); + // EBPF_OP_STXH pc=89 dst=r2 src=r4 offset=0 imm=0 +#line 41 "sample/./xdp_common.h" + *(uint16_t*)(uintptr_t)(r2 + OFFSET(0)) = (uint16_t)r4; +label_1: + // EBPF_OP_LDXW pc=90 dst=r2 src=r1 offset=16 imm=0 +#line 73 "sample/encap_reflect_packet.c" + r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(16)); + // EBPF_OP_STXW pc=91 dst=r3 src=r2 offset=16 imm=0 +#line 73 "sample/encap_reflect_packet.c" + *(uint32_t*)(uintptr_t)(r3 + OFFSET(16)) = (uint32_t)r2; + // EBPF_OP_LDXW pc=92 dst=r2 src=r1 offset=12 imm=0 +#line 73 "sample/encap_reflect_packet.c" + r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(12)); + // EBPF_OP_STXW pc=93 dst=r3 src=r2 offset=12 imm=0 +#line 73 "sample/encap_reflect_packet.c" + *(uint32_t*)(uintptr_t)(r3 + OFFSET(12)) = (uint32_t)r2; + // EBPF_OP_LDXW pc=94 dst=r2 src=r1 offset=8 imm=0 +#line 73 "sample/encap_reflect_packet.c" r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(8)); - // EBPF_OP_STXW pc=82 dst=r3 src=r2 offset=8 imm=0 -#line 64 "sample/encap_reflect_packet.c" + // EBPF_OP_STXW pc=95 dst=r3 src=r2 offset=8 imm=0 +#line 73 "sample/encap_reflect_packet.c" *(uint32_t*)(uintptr_t)(r3 + OFFSET(8)) = (uint32_t)r2; - // EBPF_OP_LDXW pc=83 dst=r1 src=r1 offset=12 imm=0 -#line 64 "sample/encap_reflect_packet.c" - r1 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(12)); - // EBPF_OP_STXW pc=84 dst=r3 src=r1 offset=12 imm=0 -#line 64 "sample/encap_reflect_packet.c" - *(uint32_t*)(uintptr_t)(r3 + OFFSET(12)) = (uint32_t)r1; - // EBPF_OP_MOV64_IMM pc=85 dst=r1 src=r0 offset=0 imm=4 -#line 64 "sample/encap_reflect_packet.c" + // EBPF_OP_LDXW pc=96 dst=r2 src=r1 offset=4 imm=0 +#line 73 "sample/encap_reflect_packet.c" + r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(4)); + // EBPF_OP_STXW pc=97 dst=r3 src=r2 offset=4 imm=0 +#line 73 "sample/encap_reflect_packet.c" + *(uint32_t*)(uintptr_t)(r3 + OFFSET(4)) = (uint32_t)r2; + // EBPF_OP_LDXW pc=98 dst=r1 src=r1 offset=0 imm=0 +#line 73 "sample/encap_reflect_packet.c" + r1 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(0)); + // EBPF_OP_STXW pc=99 dst=r3 src=r1 offset=0 imm=0 +#line 73 "sample/encap_reflect_packet.c" + *(uint32_t*)(uintptr_t)(r3 + OFFSET(0)) = (uint32_t)r1; + // EBPF_OP_MOV64_IMM pc=100 dst=r1 src=r0 offset=0 imm=4 +#line 73 "sample/encap_reflect_packet.c" r1 = IMMEDIATE(4); - // EBPF_OP_STXB pc=86 dst=r6 src=r1 offset=23 imm=0 -#line 67 "sample/encap_reflect_packet.c" - *(uint8_t*)(uintptr_t)(r6 + OFFSET(23)) = (uint8_t)r1; - // EBPF_OP_LDXB pc=87 dst=r1 src=r6 offset=14 imm=0 -#line 68 "sample/encap_reflect_packet.c" - r1 = *(uint8_t*)(uintptr_t)(r6 + OFFSET(14)); - // EBPF_OP_AND64_IMM pc=88 dst=r1 src=r0 offset=0 imm=240 -#line 68 "sample/encap_reflect_packet.c" + // EBPF_OP_STXB pc=101 dst=r7 src=r1 offset=23 imm=0 +#line 76 "sample/encap_reflect_packet.c" + *(uint8_t*)(uintptr_t)(r7 + OFFSET(23)) = (uint8_t)r1; + // EBPF_OP_LDXB pc=102 dst=r1 src=r7 offset=14 imm=0 +#line 77 "sample/encap_reflect_packet.c" + r1 = *(uint8_t*)(uintptr_t)(r7 + OFFSET(14)); + // EBPF_OP_AND64_IMM pc=103 dst=r1 src=r0 offset=0 imm=240 +#line 77 "sample/encap_reflect_packet.c" r1 &= IMMEDIATE(240); - // EBPF_OP_OR64_IMM pc=89 dst=r1 src=r0 offset=0 imm=5 -#line 68 "sample/encap_reflect_packet.c" + // EBPF_OP_OR64_IMM pc=104 dst=r1 src=r0 offset=0 imm=5 +#line 77 "sample/encap_reflect_packet.c" r1 |= IMMEDIATE(5); - // EBPF_OP_STXB pc=90 dst=r6 src=r1 offset=14 imm=0 -#line 68 "sample/encap_reflect_packet.c" - *(uint8_t*)(uintptr_t)(r6 + OFFSET(14)) = (uint8_t)r1; - // EBPF_OP_LDXH pc=91 dst=r1 src=r6 offset=36 imm=0 -#line 69 "sample/encap_reflect_packet.c" - r1 = *(uint16_t*)(uintptr_t)(r6 + OFFSET(36)); - // EBPF_OP_BE pc=92 dst=r1 src=r0 offset=0 imm=16 -#line 69 "sample/encap_reflect_packet.c" + // EBPF_OP_STXB pc=105 dst=r7 src=r1 offset=14 imm=0 +#line 77 "sample/encap_reflect_packet.c" + *(uint8_t*)(uintptr_t)(r7 + OFFSET(14)) = (uint8_t)r1; + // EBPF_OP_LDXH pc=106 dst=r1 src=r7 offset=36 imm=0 +#line 78 "sample/encap_reflect_packet.c" + r1 = *(uint16_t*)(uintptr_t)(r7 + OFFSET(36)); + // EBPF_OP_BE pc=107 dst=r1 src=r0 offset=0 imm=16 +#line 78 "sample/encap_reflect_packet.c" r1 = htobe16((uint16_t)r1); -#line 69 "sample/encap_reflect_packet.c" +#line 78 "sample/encap_reflect_packet.c" r1 &= UINT32_MAX; - // EBPF_OP_ADD64_IMM pc=93 dst=r1 src=r0 offset=0 imm=20 -#line 69 "sample/encap_reflect_packet.c" + // EBPF_OP_ADD64_IMM pc=108 dst=r1 src=r0 offset=0 imm=20 +#line 78 "sample/encap_reflect_packet.c" r1 += IMMEDIATE(20); - // EBPF_OP_BE pc=94 dst=r1 src=r0 offset=0 imm=16 -#line 69 "sample/encap_reflect_packet.c" + // EBPF_OP_BE pc=109 dst=r1 src=r0 offset=0 imm=16 +#line 78 "sample/encap_reflect_packet.c" r1 = htobe16((uint16_t)r1); -#line 69 "sample/encap_reflect_packet.c" +#line 78 "sample/encap_reflect_packet.c" r1 &= UINT32_MAX; - // EBPF_OP_STXH pc=95 dst=r6 src=r1 offset=16 imm=0 -#line 69 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(16)) = (uint16_t)r1; - // EBPF_OP_MOV64_IMM pc=96 dst=r1 src=r0 offset=0 imm=0 -#line 69 "sample/encap_reflect_packet.c" + // EBPF_OP_STXH pc=110 dst=r7 src=r1 offset=16 imm=0 +#line 78 "sample/encap_reflect_packet.c" + *(uint16_t*)(uintptr_t)(r7 + OFFSET(16)) = (uint16_t)r1; + // EBPF_OP_MOV64_IMM pc=111 dst=r1 src=r0 offset=0 imm=0 +#line 78 "sample/encap_reflect_packet.c" r1 = IMMEDIATE(0); - // EBPF_OP_STXH pc=97 dst=r6 src=r1 offset=24 imm=0 -#line 71 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(24)) = (uint16_t)r1; - // EBPF_OP_MOV64_IMM pc=98 dst=r1 src=r0 offset=0 imm=0 -#line 73 "sample/encap_reflect_packet.c" + // EBPF_OP_STXH pc=112 dst=r7 src=r1 offset=24 imm=0 +#line 80 "sample/encap_reflect_packet.c" + *(uint16_t*)(uintptr_t)(r7 + OFFSET(24)) = (uint16_t)r1; + // EBPF_OP_MOV64_IMM pc=113 dst=r1 src=r0 offset=0 imm=0 +#line 82 "sample/encap_reflect_packet.c" r1 = IMMEDIATE(0); - // EBPF_OP_MOV64_IMM pc=99 dst=r2 src=r0 offset=0 imm=0 -#line 73 "sample/encap_reflect_packet.c" + // EBPF_OP_MOV64_IMM pc=114 dst=r2 src=r0 offset=0 imm=0 +#line 82 "sample/encap_reflect_packet.c" r2 = IMMEDIATE(0); - // EBPF_OP_MOV64_IMM pc=100 dst=r4 src=r0 offset=0 imm=20 -#line 73 "sample/encap_reflect_packet.c" + // EBPF_OP_MOV64_IMM pc=115 dst=r4 src=r0 offset=0 imm=20 +#line 82 "sample/encap_reflect_packet.c" r4 = IMMEDIATE(20); - // EBPF_OP_MOV64_IMM pc=101 dst=r5 src=r0 offset=0 imm=0 -#line 73 "sample/encap_reflect_packet.c" + // EBPF_OP_MOV64_IMM pc=116 dst=r5 src=r0 offset=0 imm=0 +#line 82 "sample/encap_reflect_packet.c" r5 = IMMEDIATE(0); - // EBPF_OP_CALL pc=102 dst=r0 src=r0 offset=0 imm=10 -#line 73 "sample/encap_reflect_packet.c" + // EBPF_OP_CALL pc=117 dst=r0 src=r0 offset=0 imm=10 +#line 82 "sample/encap_reflect_packet.c" r0 = encap_reflect_packet_helpers[1].address -#line 73 "sample/encap_reflect_packet.c" +#line 82 "sample/encap_reflect_packet.c" (r1, r2, r3, r4, r5); -#line 73 "sample/encap_reflect_packet.c" +#line 82 "sample/encap_reflect_packet.c" if ((encap_reflect_packet_helpers[1].tail_call) && (r0 == 0)) -#line 73 "sample/encap_reflect_packet.c" +#line 82 "sample/encap_reflect_packet.c" return 0; - // EBPF_OP_MOV64_REG pc=103 dst=r1 src=r0 offset=0 imm=0 -#line 41 "sample/./xdp_common.h" + // EBPF_OP_MOV64_REG pc=118 dst=r1 src=r0 offset=0 imm=0 +#line 49 "sample/./xdp_common.h" r1 = r0; - // EBPF_OP_AND64_IMM pc=104 dst=r1 src=r0 offset=0 imm=65535 -#line 41 "sample/./xdp_common.h" + // EBPF_OP_AND64_IMM pc=119 dst=r1 src=r0 offset=0 imm=65535 +#line 49 "sample/./xdp_common.h" r1 &= IMMEDIATE(65535); - // EBPF_OP_LSH64_IMM pc=105 dst=r0 src=r0 offset=0 imm=32 -#line 73 "sample/encap_reflect_packet.c" + // EBPF_OP_LSH64_IMM pc=120 dst=r0 src=r0 offset=0 imm=32 +#line 82 "sample/encap_reflect_packet.c" r0 <<= (IMMEDIATE(32) & 63); - // EBPF_OP_ARSH64_IMM pc=106 dst=r0 src=r0 offset=0 imm=48 -#line 41 "sample/./xdp_common.h" + // EBPF_OP_ARSH64_IMM pc=121 dst=r0 src=r0 offset=0 imm=48 +#line 49 "sample/./xdp_common.h" r0 = (int64_t)r0 >> (uint32_t)(IMMEDIATE(48) & 63); - // EBPF_OP_ADD64_REG pc=107 dst=r0 src=r1 offset=0 imm=0 -#line 41 "sample/./xdp_common.h" + // EBPF_OP_ADD64_REG pc=122 dst=r0 src=r1 offset=0 imm=0 +#line 49 "sample/./xdp_common.h" r0 += r1; - // EBPF_OP_MOV64_REG pc=108 dst=r1 src=r0 offset=0 imm=0 -#line 42 "sample/./xdp_common.h" + // EBPF_OP_MOV64_REG pc=123 dst=r1 src=r0 offset=0 imm=0 +#line 50 "sample/./xdp_common.h" r1 = r0; - // EBPF_OP_RSH64_IMM pc=109 dst=r1 src=r0 offset=0 imm=16 -#line 42 "sample/./xdp_common.h" + // EBPF_OP_RSH64_IMM pc=124 dst=r1 src=r0 offset=0 imm=16 +#line 50 "sample/./xdp_common.h" r1 >>= (IMMEDIATE(16) & 63); - // EBPF_OP_ADD64_REG pc=110 dst=r1 src=r0 offset=0 imm=0 -#line 42 "sample/./xdp_common.h" + // EBPF_OP_ADD64_REG pc=125 dst=r1 src=r0 offset=0 imm=0 +#line 50 "sample/./xdp_common.h" r1 += r0; - // EBPF_OP_XOR64_IMM pc=111 dst=r1 src=r0 offset=0 imm=-1 -#line 73 "sample/encap_reflect_packet.c" + // EBPF_OP_XOR64_IMM pc=126 dst=r1 src=r0 offset=0 imm=-1 +#line 82 "sample/encap_reflect_packet.c" r1 ^= IMMEDIATE(-1); - // EBPF_OP_STXH pc=112 dst=r6 src=r1 offset=24 imm=0 -#line 72 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(24)) = (uint16_t)r1; - // EBPF_OP_JA pc=113 dst=r0 src=r0 offset=182 imm=0 -#line 72 "sample/encap_reflect_packet.c" - goto label_2; -label_1: - // EBPF_OP_MOV64_REG pc=114 dst=r3 src=r2 offset=0 imm=0 -#line 178 "sample/encap_reflect_packet.c" + // EBPF_OP_STXH pc=127 dst=r7 src=r1 offset=24 imm=0 +#line 81 "sample/encap_reflect_packet.c" + *(uint16_t*)(uintptr_t)(r7 + OFFSET(24)) = (uint16_t)r1; + // EBPF_OP_JA pc=128 dst=r0 src=r0 offset=192 imm=0 +#line 81 "sample/encap_reflect_packet.c" + goto label_4; +label_2: + // EBPF_OP_MOV64_REG pc=129 dst=r3 src=r2 offset=0 imm=0 +#line 196 "sample/encap_reflect_packet.c" r3 = r2; - // EBPF_OP_ADD64_IMM pc=115 dst=r3 src=r0 offset=0 imm=54 -#line 178 "sample/encap_reflect_packet.c" + // EBPF_OP_ADD64_IMM pc=130 dst=r3 src=r0 offset=0 imm=54 +#line 196 "sample/encap_reflect_packet.c" r3 += IMMEDIATE(54); - // EBPF_OP_JGT_REG pc=116 dst=r3 src=r1 offset=180 imm=0 -#line 178 "sample/encap_reflect_packet.c" + // EBPF_OP_JGT_REG pc=131 dst=r3 src=r1 offset=190 imm=0 +#line 196 "sample/encap_reflect_packet.c" if (r3 > r1) -#line 178 "sample/encap_reflect_packet.c" - goto label_3; - // EBPF_OP_MOV64_REG pc=117 dst=r3 src=r2 offset=0 imm=0 -#line 178 "sample/encap_reflect_packet.c" +#line 196 "sample/encap_reflect_packet.c" + goto label_5; + // EBPF_OP_MOV64_REG pc=132 dst=r3 src=r2 offset=0 imm=0 +#line 196 "sample/encap_reflect_packet.c" r3 = r2; - // EBPF_OP_ADD64_IMM pc=118 dst=r3 src=r0 offset=0 imm=62 -#line 178 "sample/encap_reflect_packet.c" + // EBPF_OP_ADD64_IMM pc=133 dst=r3 src=r0 offset=0 imm=62 +#line 196 "sample/encap_reflect_packet.c" r3 += IMMEDIATE(62); - // EBPF_OP_JGT_REG pc=119 dst=r3 src=r1 offset=177 imm=0 -#line 184 "sample/encap_reflect_packet.c" + // EBPF_OP_JGT_REG pc=134 dst=r3 src=r1 offset=187 imm=0 +#line 202 "sample/encap_reflect_packet.c" if (r3 > r1) -#line 184 "sample/encap_reflect_packet.c" - goto label_3; - // EBPF_OP_LDXB pc=120 dst=r1 src=r2 offset=20 imm=0 -#line 184 "sample/encap_reflect_packet.c" +#line 202 "sample/encap_reflect_packet.c" + goto label_5; + // EBPF_OP_LDXB pc=135 dst=r1 src=r2 offset=20 imm=0 +#line 202 "sample/encap_reflect_packet.c" r1 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(20)); - // EBPF_OP_JNE_IMM pc=121 dst=r1 src=r0 offset=175 imm=17 -#line 184 "sample/encap_reflect_packet.c" + // EBPF_OP_JNE_IMM pc=136 dst=r1 src=r0 offset=185 imm=17 +#line 202 "sample/encap_reflect_packet.c" if (r1 != IMMEDIATE(17)) -#line 184 "sample/encap_reflect_packet.c" - goto label_3; - // EBPF_OP_LDXH pc=122 dst=r1 src=r2 offset=56 imm=0 -#line 190 "sample/encap_reflect_packet.c" +#line 202 "sample/encap_reflect_packet.c" + goto label_5; + // EBPF_OP_LDXH pc=137 dst=r1 src=r2 offset=56 imm=0 +#line 208 "sample/encap_reflect_packet.c" r1 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(56)); - // EBPF_OP_JNE_IMM pc=123 dst=r1 src=r0 offset=173 imm=7459 -#line 190 "sample/encap_reflect_packet.c" + // EBPF_OP_JNE_IMM pc=138 dst=r1 src=r0 offset=183 imm=7459 +#line 208 "sample/encap_reflect_packet.c" if (r1 != IMMEDIATE(7459)) -#line 190 "sample/encap_reflect_packet.c" - goto label_3; - // EBPF_OP_MOV64_REG pc=124 dst=r1 src=r6 offset=0 imm=0 -#line 87 "sample/encap_reflect_packet.c" +#line 208 "sample/encap_reflect_packet.c" + goto label_5; + // EBPF_OP_MOV64_REG pc=139 dst=r1 src=r6 offset=0 imm=0 +#line 96 "sample/encap_reflect_packet.c" r1 = r6; - // EBPF_OP_LDDW pc=125 dst=r2 src=r0 offset=0 imm=-40 -#line 87 "sample/encap_reflect_packet.c" + // EBPF_OP_LDDW pc=140 dst=r2 src=r0 offset=0 imm=-40 +#line 96 "sample/encap_reflect_packet.c" r2 = (uint64_t)4294967256; - // EBPF_OP_CALL pc=127 dst=r0 src=r0 offset=0 imm=65536 -#line 87 "sample/encap_reflect_packet.c" + // EBPF_OP_CALL pc=142 dst=r0 src=r0 offset=0 imm=65536 +#line 96 "sample/encap_reflect_packet.c" r0 = encap_reflect_packet_helpers[0].address -#line 87 "sample/encap_reflect_packet.c" +#line 96 "sample/encap_reflect_packet.c" (r1, r2, r3, r4, r5); -#line 87 "sample/encap_reflect_packet.c" +#line 96 "sample/encap_reflect_packet.c" if ((encap_reflect_packet_helpers[0].tail_call) && (r0 == 0)) -#line 87 "sample/encap_reflect_packet.c" +#line 96 "sample/encap_reflect_packet.c" return 0; - // EBPF_OP_MOV64_REG pc=128 dst=r1 src=r0 offset=0 imm=0 -#line 87 "sample/encap_reflect_packet.c" + // EBPF_OP_MOV64_REG pc=143 dst=r1 src=r0 offset=0 imm=0 +#line 96 "sample/encap_reflect_packet.c" r1 = r0; - // EBPF_OP_MOV64_IMM pc=129 dst=r0 src=r0 offset=0 imm=2 -#line 87 "sample/encap_reflect_packet.c" + // EBPF_OP_MOV64_IMM pc=144 dst=r0 src=r0 offset=0 imm=2 +#line 96 "sample/encap_reflect_packet.c" r0 = IMMEDIATE(2); - // EBPF_OP_LSH64_IMM pc=130 dst=r1 src=r0 offset=0 imm=32 -#line 87 "sample/encap_reflect_packet.c" + // EBPF_OP_LSH64_IMM pc=145 dst=r1 src=r0 offset=0 imm=32 +#line 96 "sample/encap_reflect_packet.c" r1 <<= (IMMEDIATE(32) & 63); - // EBPF_OP_ARSH64_IMM pc=131 dst=r1 src=r0 offset=0 imm=32 -#line 87 "sample/encap_reflect_packet.c" + // EBPF_OP_ARSH64_IMM pc=146 dst=r1 src=r0 offset=0 imm=32 +#line 96 "sample/encap_reflect_packet.c" r1 = (int64_t)r1 >> (uint32_t)(IMMEDIATE(32) & 63); - // EBPF_OP_MOV64_IMM pc=132 dst=r2 src=r0 offset=0 imm=0 -#line 87 "sample/encap_reflect_packet.c" + // EBPF_OP_MOV64_IMM pc=147 dst=r2 src=r0 offset=0 imm=0 +#line 96 "sample/encap_reflect_packet.c" r2 = IMMEDIATE(0); - // EBPF_OP_JSGT_REG pc=133 dst=r2 src=r1 offset=163 imm=0 -#line 87 "sample/encap_reflect_packet.c" + // EBPF_OP_JSGT_REG pc=148 dst=r2 src=r1 offset=173 imm=0 +#line 96 "sample/encap_reflect_packet.c" if ((int64_t)r2 > (int64_t)r1) -#line 87 "sample/encap_reflect_packet.c" - goto label_3; - // EBPF_OP_LDXDW pc=134 dst=r5 src=r6 offset=8 imm=0 -#line 93 "sample/encap_reflect_packet.c" +#line 96 "sample/encap_reflect_packet.c" + goto label_5; + // EBPF_OP_LDXDW pc=149 dst=r5 src=r6 offset=8 imm=0 +#line 102 "sample/encap_reflect_packet.c" r5 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(8)); - // EBPF_OP_LDXDW pc=135 dst=r1 src=r6 offset=0 imm=0 -#line 92 "sample/encap_reflect_packet.c" + // EBPF_OP_LDXDW pc=150 dst=r1 src=r6 offset=0 imm=0 +#line 101 "sample/encap_reflect_packet.c" r1 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(0)); - // EBPF_OP_MOV64_REG pc=136 dst=r2 src=r1 offset=0 imm=0 -#line 93 "sample/encap_reflect_packet.c" + // EBPF_OP_MOV64_REG pc=151 dst=r2 src=r1 offset=0 imm=0 +#line 102 "sample/encap_reflect_packet.c" r2 = r1; - // EBPF_OP_ADD64_IMM pc=137 dst=r2 src=r0 offset=0 imm=14 -#line 93 "sample/encap_reflect_packet.c" + // EBPF_OP_ADD64_IMM pc=152 dst=r2 src=r0 offset=0 imm=14 +#line 102 "sample/encap_reflect_packet.c" r2 += IMMEDIATE(14); - // EBPF_OP_JGT_REG pc=138 dst=r2 src=r5 offset=158 imm=0 -#line 93 "sample/encap_reflect_packet.c" + // EBPF_OP_JGT_REG pc=153 dst=r2 src=r5 offset=168 imm=0 +#line 102 "sample/encap_reflect_packet.c" if (r2 > r5) -#line 93 "sample/encap_reflect_packet.c" - goto label_3; - // EBPF_OP_MOV64_REG pc=139 dst=r4 src=r1 offset=0 imm=0 -#line 100 "sample/encap_reflect_packet.c" +#line 102 "sample/encap_reflect_packet.c" + goto label_5; + // EBPF_OP_MOV64_REG pc=154 dst=r4 src=r1 offset=0 imm=0 +#line 109 "sample/encap_reflect_packet.c" r4 = r1; - // EBPF_OP_ADD64_IMM pc=140 dst=r4 src=r0 offset=0 imm=40 -#line 100 "sample/encap_reflect_packet.c" + // EBPF_OP_ADD64_IMM pc=155 dst=r4 src=r0 offset=0 imm=40 +#line 109 "sample/encap_reflect_packet.c" r4 += IMMEDIATE(40); - // EBPF_OP_JGT_REG pc=141 dst=r4 src=r5 offset=155 imm=0 -#line 100 "sample/encap_reflect_packet.c" + // EBPF_OP_JGT_REG pc=156 dst=r4 src=r5 offset=165 imm=0 +#line 109 "sample/encap_reflect_packet.c" if (r4 > r5) -#line 100 "sample/encap_reflect_packet.c" - goto label_3; - // EBPF_OP_MOV64_REG pc=142 dst=r3 src=r1 offset=0 imm=0 -#line 108 "sample/encap_reflect_packet.c" +#line 109 "sample/encap_reflect_packet.c" + goto label_5; + // EBPF_OP_MOV64_REG pc=157 dst=r3 src=r1 offset=0 imm=0 +#line 117 "sample/encap_reflect_packet.c" r3 = r1; - // EBPF_OP_ADD64_IMM pc=143 dst=r3 src=r0 offset=0 imm=54 -#line 108 "sample/encap_reflect_packet.c" + // EBPF_OP_ADD64_IMM pc=158 dst=r3 src=r0 offset=0 imm=54 +#line 117 "sample/encap_reflect_packet.c" r3 += IMMEDIATE(54); - // EBPF_OP_JGT_REG pc=144 dst=r3 src=r5 offset=152 imm=0 -#line 108 "sample/encap_reflect_packet.c" + // EBPF_OP_JGT_REG pc=159 dst=r3 src=r5 offset=162 imm=0 +#line 117 "sample/encap_reflect_packet.c" if (r3 > r5) -#line 108 "sample/encap_reflect_packet.c" - goto label_3; - // EBPF_OP_MOV64_REG pc=145 dst=r6 src=r1 offset=0 imm=0 -#line 108 "sample/encap_reflect_packet.c" - r6 = r1; - // EBPF_OP_ADD64_IMM pc=146 dst=r6 src=r0 offset=0 imm=94 -#line 108 "sample/encap_reflect_packet.c" - r6 += IMMEDIATE(94); - // EBPF_OP_JGT_REG pc=147 dst=r6 src=r5 offset=149 imm=0 -#line 108 "sample/encap_reflect_packet.c" - if (r6 > r5) -#line 108 "sample/encap_reflect_packet.c" - goto label_3; - // EBPF_OP_LDXH pc=148 dst=r5 src=r4 offset=4 imm=0 -#line 121 "sample/encap_reflect_packet.c" +#line 117 "sample/encap_reflect_packet.c" + goto label_5; + // EBPF_OP_MOV64_REG pc=160 dst=r7 src=r1 offset=0 imm=0 +#line 124 "sample/encap_reflect_packet.c" + r7 = r1; + // EBPF_OP_ADD64_IMM pc=161 dst=r7 src=r0 offset=0 imm=94 +#line 124 "sample/encap_reflect_packet.c" + r7 += IMMEDIATE(94); + // EBPF_OP_JGT_REG pc=162 dst=r7 src=r5 offset=159 imm=0 +#line 124 "sample/encap_reflect_packet.c" + if (r7 > r5) +#line 124 "sample/encap_reflect_packet.c" + goto label_5; + // EBPF_OP_LDXH pc=163 dst=r5 src=r4 offset=4 imm=0 +#line 130 "sample/encap_reflect_packet.c" r5 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(4)); - // EBPF_OP_STXH pc=149 dst=r1 src=r5 offset=4 imm=0 -#line 121 "sample/encap_reflect_packet.c" + // EBPF_OP_STXH pc=164 dst=r1 src=r5 offset=4 imm=0 +#line 130 "sample/encap_reflect_packet.c" *(uint16_t*)(uintptr_t)(r1 + OFFSET(4)) = (uint16_t)r5; - // EBPF_OP_LDXH pc=150 dst=r5 src=r4 offset=0 imm=0 -#line 121 "sample/encap_reflect_packet.c" + // EBPF_OP_LDXH pc=165 dst=r5 src=r4 offset=0 imm=0 +#line 130 "sample/encap_reflect_packet.c" r5 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(0)); - // EBPF_OP_STXH pc=151 dst=r1 src=r5 offset=0 imm=0 -#line 121 "sample/encap_reflect_packet.c" + // EBPF_OP_STXH pc=166 dst=r1 src=r5 offset=0 imm=0 +#line 130 "sample/encap_reflect_packet.c" *(uint16_t*)(uintptr_t)(r1 + OFFSET(0)) = (uint16_t)r5; - // EBPF_OP_LDXH pc=152 dst=r5 src=r4 offset=2 imm=0 -#line 121 "sample/encap_reflect_packet.c" + // EBPF_OP_LDXH pc=167 dst=r5 src=r4 offset=2 imm=0 +#line 130 "sample/encap_reflect_packet.c" r5 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(2)); - // EBPF_OP_STXH pc=153 dst=r1 src=r5 offset=2 imm=0 -#line 121 "sample/encap_reflect_packet.c" + // EBPF_OP_STXH pc=168 dst=r1 src=r5 offset=2 imm=0 +#line 130 "sample/encap_reflect_packet.c" *(uint16_t*)(uintptr_t)(r1 + OFFSET(2)) = (uint16_t)r5; - // EBPF_OP_LDXH pc=154 dst=r5 src=r4 offset=12 imm=0 -#line 121 "sample/encap_reflect_packet.c" + // EBPF_OP_LDXH pc=169 dst=r5 src=r4 offset=12 imm=0 +#line 130 "sample/encap_reflect_packet.c" r5 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(12)); - // EBPF_OP_STXH pc=155 dst=r1 src=r5 offset=12 imm=0 -#line 121 "sample/encap_reflect_packet.c" + // EBPF_OP_STXH pc=170 dst=r1 src=r5 offset=12 imm=0 +#line 130 "sample/encap_reflect_packet.c" *(uint16_t*)(uintptr_t)(r1 + OFFSET(12)) = (uint16_t)r5; - // EBPF_OP_LDXH pc=156 dst=r5 src=r4 offset=10 imm=0 -#line 121 "sample/encap_reflect_packet.c" + // EBPF_OP_LDXH pc=171 dst=r5 src=r4 offset=10 imm=0 +#line 130 "sample/encap_reflect_packet.c" r5 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(10)); - // EBPF_OP_STXH pc=157 dst=r1 src=r5 offset=10 imm=0 -#line 121 "sample/encap_reflect_packet.c" + // EBPF_OP_STXH pc=172 dst=r1 src=r5 offset=10 imm=0 +#line 130 "sample/encap_reflect_packet.c" *(uint16_t*)(uintptr_t)(r1 + OFFSET(10)) = (uint16_t)r5; - // EBPF_OP_LDXH pc=158 dst=r0 src=r4 offset=8 imm=0 -#line 121 "sample/encap_reflect_packet.c" - r0 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(8)); - // EBPF_OP_LDXH pc=159 dst=r6 src=r4 offset=6 imm=0 -#line 121 "sample/encap_reflect_packet.c" - r6 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(6)); - // EBPF_OP_STXH pc=160 dst=r1 src=r5 offset=4 imm=0 + // EBPF_OP_LDXH pc=173 dst=r7 src=r4 offset=8 imm=0 +#line 130 "sample/encap_reflect_packet.c" + r7 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(8)); + // EBPF_OP_LDXH pc=174 dst=r8 src=r4 offset=6 imm=0 +#line 130 "sample/encap_reflect_packet.c" + r8 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(6)); + // EBPF_OP_STXH pc=175 dst=r1 src=r5 offset=4 imm=0 #line 16 "sample/./xdp_common.h" *(uint16_t*)(uintptr_t)(r1 + OFFSET(4)) = (uint16_t)r5; - // EBPF_OP_STXH pc=161 dst=r1 src=r6 offset=6 imm=0 -#line 121 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r1 + OFFSET(6)) = (uint16_t)r6; - // EBPF_OP_STXH pc=162 dst=r1 src=r6 offset=0 imm=0 + // EBPF_OP_STXH pc=176 dst=r1 src=r8 offset=6 imm=0 +#line 130 "sample/encap_reflect_packet.c" + *(uint16_t*)(uintptr_t)(r1 + OFFSET(6)) = (uint16_t)r8; + // EBPF_OP_STXH pc=177 dst=r1 src=r8 offset=0 imm=0 #line 16 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r1 + OFFSET(0)) = (uint16_t)r6; - // EBPF_OP_STXH pc=163 dst=r1 src=r0 offset=8 imm=0 -#line 121 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r1 + OFFSET(8)) = (uint16_t)r0; - // EBPF_OP_STXH pc=164 dst=r1 src=r0 offset=2 imm=0 + *(uint16_t*)(uintptr_t)(r1 + OFFSET(0)) = (uint16_t)r8; + // EBPF_OP_STXH pc=178 dst=r1 src=r7 offset=8 imm=0 +#line 130 "sample/encap_reflect_packet.c" + *(uint16_t*)(uintptr_t)(r1 + OFFSET(8)) = (uint16_t)r7; + // EBPF_OP_STXH pc=179 dst=r1 src=r7 offset=2 imm=0 #line 16 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r1 + OFFSET(2)) = (uint16_t)r0; - // EBPF_OP_LDXH pc=165 dst=r5 src=r4 offset=4 imm=0 + *(uint16_t*)(uintptr_t)(r1 + OFFSET(2)) = (uint16_t)r7; + // EBPF_OP_LDXH pc=180 dst=r5 src=r4 offset=4 imm=0 #line 17 "sample/./xdp_common.h" r5 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(4)); - // EBPF_OP_STXH pc=166 dst=r1 src=r5 offset=10 imm=0 + // EBPF_OP_STXH pc=181 dst=r1 src=r5 offset=10 imm=0 #line 17 "sample/./xdp_common.h" *(uint16_t*)(uintptr_t)(r1 + OFFSET(10)) = (uint16_t)r5; - // EBPF_OP_LDXH pc=167 dst=r5 src=r4 offset=0 imm=0 + // EBPF_OP_LDXH pc=182 dst=r5 src=r4 offset=0 imm=0 #line 17 "sample/./xdp_common.h" r5 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(0)); - // EBPF_OP_STXH pc=168 dst=r1 src=r5 offset=6 imm=0 + // EBPF_OP_STXH pc=183 dst=r1 src=r5 offset=6 imm=0 #line 17 "sample/./xdp_common.h" *(uint16_t*)(uintptr_t)(r1 + OFFSET(6)) = (uint16_t)r5; - // EBPF_OP_LDXH pc=169 dst=r4 src=r4 offset=2 imm=0 + // EBPF_OP_LDXH pc=184 dst=r4 src=r4 offset=2 imm=0 #line 17 "sample/./xdp_common.h" r4 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(2)); - // EBPF_OP_STXH pc=170 dst=r1 src=r4 offset=8 imm=0 + // EBPF_OP_STXH pc=185 dst=r1 src=r4 offset=8 imm=0 #line 17 "sample/./xdp_common.h" *(uint16_t*)(uintptr_t)(r1 + OFFSET(8)) = (uint16_t)r4; - // EBPF_OP_LDXB pc=171 dst=r5 src=r1 offset=87 imm=0 + // EBPF_OP_LDXB pc=186 dst=r5 src=r1 offset=87 imm=0 #line 32 "sample/./xdp_common.h" r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(87)); - // EBPF_OP_LSH64_IMM pc=172 dst=r5 src=r0 offset=0 imm=8 + // EBPF_OP_LSH64_IMM pc=187 dst=r5 src=r0 offset=0 imm=8 #line 32 "sample/./xdp_common.h" r5 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=173 dst=r4 src=r1 offset=86 imm=0 + // EBPF_OP_LDXB pc=188 dst=r4 src=r1 offset=86 imm=0 #line 32 "sample/./xdp_common.h" r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(86)); - // EBPF_OP_OR64_REG pc=174 dst=r5 src=r4 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=189 dst=r5 src=r4 offset=0 imm=0 #line 32 "sample/./xdp_common.h" r5 |= r4; - // EBPF_OP_LDXB pc=175 dst=r4 src=r1 offset=89 imm=0 + // EBPF_OP_LDXB pc=190 dst=r4 src=r1 offset=89 imm=0 #line 32 "sample/./xdp_common.h" r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(89)); - // EBPF_OP_LSH64_IMM pc=176 dst=r4 src=r0 offset=0 imm=8 + // EBPF_OP_LSH64_IMM pc=191 dst=r4 src=r0 offset=0 imm=8 #line 32 "sample/./xdp_common.h" r4 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=177 dst=r0 src=r1 offset=88 imm=0 + // EBPF_OP_LDXB pc=192 dst=r7 src=r1 offset=88 imm=0 #line 32 "sample/./xdp_common.h" - r0 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(88)); - // EBPF_OP_OR64_REG pc=178 dst=r4 src=r0 offset=0 imm=0 + r7 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(88)); + // EBPF_OP_OR64_REG pc=193 dst=r4 src=r7 offset=0 imm=0 #line 32 "sample/./xdp_common.h" - r4 |= r0; - // EBPF_OP_LSH64_IMM pc=179 dst=r4 src=r0 offset=0 imm=16 + r4 |= r7; + // EBPF_OP_LSH64_IMM pc=194 dst=r4 src=r0 offset=0 imm=16 #line 32 "sample/./xdp_common.h" r4 <<= (IMMEDIATE(16) & 63); - // EBPF_OP_OR64_REG pc=180 dst=r4 src=r5 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=195 dst=r4 src=r5 offset=0 imm=0 #line 32 "sample/./xdp_common.h" r4 |= r5; - // EBPF_OP_LDXB pc=181 dst=r0 src=r1 offset=91 imm=0 + // EBPF_OP_LDXB pc=196 dst=r7 src=r1 offset=91 imm=0 #line 32 "sample/./xdp_common.h" - r0 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(91)); - // EBPF_OP_LSH64_IMM pc=182 dst=r0 src=r0 offset=0 imm=8 + r7 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(91)); + // EBPF_OP_LSH64_IMM pc=197 dst=r7 src=r0 offset=0 imm=8 #line 32 "sample/./xdp_common.h" - r0 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=183 dst=r5 src=r1 offset=90 imm=0 + r7 <<= (IMMEDIATE(8) & 63); + // EBPF_OP_LDXB pc=198 dst=r5 src=r1 offset=90 imm=0 #line 32 "sample/./xdp_common.h" r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(90)); - // EBPF_OP_OR64_REG pc=184 dst=r0 src=r5 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=199 dst=r7 src=r5 offset=0 imm=0 #line 32 "sample/./xdp_common.h" - r0 |= r5; - // EBPF_OP_LDXB pc=185 dst=r5 src=r1 offset=93 imm=0 + r7 |= r5; + // EBPF_OP_LDXB pc=200 dst=r5 src=r1 offset=93 imm=0 #line 32 "sample/./xdp_common.h" r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(93)); - // EBPF_OP_LSH64_IMM pc=186 dst=r5 src=r0 offset=0 imm=8 + // EBPF_OP_LSH64_IMM pc=201 dst=r5 src=r0 offset=0 imm=8 #line 32 "sample/./xdp_common.h" r5 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=187 dst=r6 src=r1 offset=92 imm=0 + // EBPF_OP_LDXB pc=202 dst=r8 src=r1 offset=92 imm=0 #line 32 "sample/./xdp_common.h" - r6 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(92)); - // EBPF_OP_OR64_REG pc=188 dst=r5 src=r6 offset=0 imm=0 + r8 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(92)); + // EBPF_OP_OR64_REG pc=203 dst=r5 src=r8 offset=0 imm=0 #line 32 "sample/./xdp_common.h" - r5 |= r6; - // EBPF_OP_LSH64_IMM pc=189 dst=r5 src=r0 offset=0 imm=16 + r5 |= r8; + // EBPF_OP_LSH64_IMM pc=204 dst=r5 src=r0 offset=0 imm=16 #line 32 "sample/./xdp_common.h" r5 <<= (IMMEDIATE(16) & 63); - // EBPF_OP_OR64_REG pc=190 dst=r5 src=r0 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=205 dst=r5 src=r7 offset=0 imm=0 #line 32 "sample/./xdp_common.h" - r5 |= r0; - // EBPF_OP_LSH64_IMM pc=191 dst=r5 src=r0 offset=0 imm=32 + r5 |= r7; + // EBPF_OP_LSH64_IMM pc=206 dst=r5 src=r0 offset=0 imm=32 #line 32 "sample/./xdp_common.h" r5 <<= (IMMEDIATE(32) & 63); - // EBPF_OP_OR64_REG pc=192 dst=r5 src=r4 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=207 dst=r5 src=r4 offset=0 imm=0 #line 32 "sample/./xdp_common.h" r5 |= r4; - // EBPF_OP_LDXB pc=193 dst=r0 src=r1 offset=79 imm=0 + // EBPF_OP_LDXB pc=208 dst=r7 src=r1 offset=79 imm=0 #line 32 "sample/./xdp_common.h" - r0 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(79)); - // EBPF_OP_LSH64_IMM pc=194 dst=r0 src=r0 offset=0 imm=8 + r7 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(79)); + // EBPF_OP_LSH64_IMM pc=209 dst=r7 src=r0 offset=0 imm=8 #line 32 "sample/./xdp_common.h" - r0 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=195 dst=r4 src=r1 offset=78 imm=0 + r7 <<= (IMMEDIATE(8) & 63); + // EBPF_OP_LDXB pc=210 dst=r4 src=r1 offset=78 imm=0 #line 32 "sample/./xdp_common.h" r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(78)); - // EBPF_OP_OR64_REG pc=196 dst=r0 src=r4 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=211 dst=r7 src=r4 offset=0 imm=0 #line 32 "sample/./xdp_common.h" - r0 |= r4; - // EBPF_OP_LDXB pc=197 dst=r4 src=r1 offset=81 imm=0 + r7 |= r4; + // EBPF_OP_LDXB pc=212 dst=r4 src=r1 offset=81 imm=0 #line 32 "sample/./xdp_common.h" r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(81)); - // EBPF_OP_LSH64_IMM pc=198 dst=r4 src=r0 offset=0 imm=8 + // EBPF_OP_LSH64_IMM pc=213 dst=r4 src=r0 offset=0 imm=8 #line 32 "sample/./xdp_common.h" r4 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=199 dst=r6 src=r1 offset=80 imm=0 + // EBPF_OP_LDXB pc=214 dst=r8 src=r1 offset=80 imm=0 #line 32 "sample/./xdp_common.h" - r6 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(80)); - // EBPF_OP_OR64_REG pc=200 dst=r4 src=r6 offset=0 imm=0 + r8 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(80)); + // EBPF_OP_OR64_REG pc=215 dst=r4 src=r8 offset=0 imm=0 #line 32 "sample/./xdp_common.h" - r4 |= r6; - // EBPF_OP_STXDW pc=201 dst=r10 src=r5 offset=-8 imm=0 + r4 |= r8; + // EBPF_OP_STXDW pc=216 dst=r10 src=r5 offset=-8 imm=0 #line 32 "sample/./xdp_common.h" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-8)) = (uint64_t)r5; - // EBPF_OP_LSH64_IMM pc=202 dst=r4 src=r0 offset=0 imm=16 + // EBPF_OP_LSH64_IMM pc=217 dst=r4 src=r0 offset=0 imm=16 #line 32 "sample/./xdp_common.h" r4 <<= (IMMEDIATE(16) & 63); - // EBPF_OP_OR64_REG pc=203 dst=r4 src=r0 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=218 dst=r4 src=r7 offset=0 imm=0 #line 32 "sample/./xdp_common.h" - r4 |= r0; - // EBPF_OP_LDXB pc=204 dst=r5 src=r1 offset=83 imm=0 + r4 |= r7; + // EBPF_OP_LDXB pc=219 dst=r5 src=r1 offset=83 imm=0 #line 32 "sample/./xdp_common.h" r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(83)); - // EBPF_OP_LSH64_IMM pc=205 dst=r5 src=r0 offset=0 imm=8 + // EBPF_OP_LSH64_IMM pc=220 dst=r5 src=r0 offset=0 imm=8 #line 32 "sample/./xdp_common.h" r5 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=206 dst=r0 src=r1 offset=82 imm=0 + // EBPF_OP_LDXB pc=221 dst=r7 src=r1 offset=82 imm=0 #line 32 "sample/./xdp_common.h" - r0 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(82)); - // EBPF_OP_OR64_REG pc=207 dst=r5 src=r0 offset=0 imm=0 + r7 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(82)); + // EBPF_OP_OR64_REG pc=222 dst=r5 src=r7 offset=0 imm=0 #line 32 "sample/./xdp_common.h" - r5 |= r0; - // EBPF_OP_LDXB pc=208 dst=r0 src=r1 offset=85 imm=0 + r5 |= r7; + // EBPF_OP_LDXB pc=223 dst=r7 src=r1 offset=85 imm=0 #line 32 "sample/./xdp_common.h" - r0 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(85)); - // EBPF_OP_LSH64_IMM pc=209 dst=r0 src=r0 offset=0 imm=8 + r7 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(85)); + // EBPF_OP_LSH64_IMM pc=224 dst=r7 src=r0 offset=0 imm=8 #line 32 "sample/./xdp_common.h" - r0 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=210 dst=r6 src=r1 offset=84 imm=0 + r7 <<= (IMMEDIATE(8) & 63); + // EBPF_OP_LDXB pc=225 dst=r8 src=r1 offset=84 imm=0 #line 32 "sample/./xdp_common.h" - r6 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(84)); - // EBPF_OP_OR64_REG pc=211 dst=r0 src=r6 offset=0 imm=0 + r8 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(84)); + // EBPF_OP_OR64_REG pc=226 dst=r7 src=r8 offset=0 imm=0 #line 32 "sample/./xdp_common.h" - r0 |= r6; - // EBPF_OP_LSH64_IMM pc=212 dst=r0 src=r0 offset=0 imm=16 + r7 |= r8; + // EBPF_OP_LSH64_IMM pc=227 dst=r7 src=r0 offset=0 imm=16 #line 32 "sample/./xdp_common.h" - r0 <<= (IMMEDIATE(16) & 63); - // EBPF_OP_OR64_REG pc=213 dst=r0 src=r5 offset=0 imm=0 + r7 <<= (IMMEDIATE(16) & 63); + // EBPF_OP_OR64_REG pc=228 dst=r7 src=r5 offset=0 imm=0 #line 32 "sample/./xdp_common.h" - r0 |= r5; - // EBPF_OP_LSH64_IMM pc=214 dst=r0 src=r0 offset=0 imm=32 + r7 |= r5; + // EBPF_OP_LSH64_IMM pc=229 dst=r7 src=r0 offset=0 imm=32 #line 32 "sample/./xdp_common.h" - r0 <<= (IMMEDIATE(32) & 63); - // EBPF_OP_OR64_REG pc=215 dst=r0 src=r4 offset=0 imm=0 + r7 <<= (IMMEDIATE(32) & 63); + // EBPF_OP_OR64_REG pc=230 dst=r7 src=r4 offset=0 imm=0 #line 32 "sample/./xdp_common.h" - r0 |= r4; - // EBPF_OP_STXDW pc=216 dst=r10 src=r0 offset=-16 imm=0 + r7 |= r4; + // EBPF_OP_STXDW pc=231 dst=r10 src=r7 offset=-16 imm=0 #line 32 "sample/./xdp_common.h" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-16)) = (uint64_t)r0; - // EBPF_OP_LDXW pc=217 dst=r4 src=r1 offset=62 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-16)) = (uint64_t)r7; + // EBPF_OP_LDXW pc=232 dst=r4 src=r1 offset=62 imm=0 #line 33 "sample/./xdp_common.h" r4 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(62)); - // EBPF_OP_STXW pc=218 dst=r1 src=r4 offset=78 imm=0 + // EBPF_OP_STXW pc=233 dst=r1 src=r4 offset=78 imm=0 #line 33 "sample/./xdp_common.h" *(uint32_t*)(uintptr_t)(r1 + OFFSET(78)) = (uint32_t)r4; - // EBPF_OP_LDXW pc=219 dst=r4 src=r1 offset=66 imm=0 + // EBPF_OP_LDXW pc=234 dst=r4 src=r1 offset=66 imm=0 #line 33 "sample/./xdp_common.h" r4 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(66)); - // EBPF_OP_STXW pc=220 dst=r1 src=r4 offset=82 imm=0 + // EBPF_OP_STXW pc=235 dst=r1 src=r4 offset=82 imm=0 #line 33 "sample/./xdp_common.h" *(uint32_t*)(uintptr_t)(r1 + OFFSET(82)) = (uint32_t)r4; - // EBPF_OP_LDXW pc=221 dst=r4 src=r1 offset=70 imm=0 + // EBPF_OP_LDXW pc=236 dst=r4 src=r1 offset=70 imm=0 #line 33 "sample/./xdp_common.h" r4 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(70)); - // EBPF_OP_STXW pc=222 dst=r1 src=r4 offset=86 imm=0 + // EBPF_OP_STXW pc=237 dst=r1 src=r4 offset=86 imm=0 #line 33 "sample/./xdp_common.h" *(uint32_t*)(uintptr_t)(r1 + OFFSET(86)) = (uint32_t)r4; - // EBPF_OP_LDXW pc=223 dst=r4 src=r1 offset=74 imm=0 + // EBPF_OP_LDXW pc=238 dst=r4 src=r1 offset=74 imm=0 #line 33 "sample/./xdp_common.h" r4 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(74)); - // EBPF_OP_STXW pc=224 dst=r1 src=r4 offset=90 imm=0 + // EBPF_OP_STXW pc=239 dst=r1 src=r4 offset=90 imm=0 #line 33 "sample/./xdp_common.h" *(uint32_t*)(uintptr_t)(r1 + OFFSET(90)) = (uint32_t)r4; - // EBPF_OP_LDXDW pc=225 dst=r4 src=r10 offset=-16 imm=0 + // EBPF_OP_LDXDW pc=240 dst=r4 src=r10 offset=-16 imm=0 #line 34 "sample/./xdp_common.h" r4 = *(uint64_t*)(uintptr_t)(r10 + OFFSET(-16)); - // EBPF_OP_MOV64_REG pc=226 dst=r5 src=r4 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=241 dst=r5 src=r4 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r5 = r4; - // EBPF_OP_RSH64_IMM pc=227 dst=r5 src=r0 offset=0 imm=48 + // EBPF_OP_RSH64_IMM pc=242 dst=r5 src=r0 offset=0 imm=48 #line 34 "sample/./xdp_common.h" r5 >>= (IMMEDIATE(48) & 63); - // EBPF_OP_STXB pc=228 dst=r1 src=r5 offset=68 imm=0 + // EBPF_OP_STXB pc=243 dst=r1 src=r5 offset=68 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(68)) = (uint8_t)r5; - // EBPF_OP_MOV64_REG pc=229 dst=r5 src=r4 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=244 dst=r5 src=r4 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r5 = r4; - // EBPF_OP_RSH64_IMM pc=230 dst=r5 src=r0 offset=0 imm=56 + // EBPF_OP_RSH64_IMM pc=245 dst=r5 src=r0 offset=0 imm=56 #line 34 "sample/./xdp_common.h" r5 >>= (IMMEDIATE(56) & 63); - // EBPF_OP_STXB pc=231 dst=r1 src=r5 offset=69 imm=0 + // EBPF_OP_STXB pc=246 dst=r1 src=r5 offset=69 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(69)) = (uint8_t)r5; - // EBPF_OP_MOV64_REG pc=232 dst=r5 src=r4 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=247 dst=r5 src=r4 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r5 = r4; - // EBPF_OP_RSH64_IMM pc=233 dst=r5 src=r0 offset=0 imm=32 + // EBPF_OP_RSH64_IMM pc=248 dst=r5 src=r0 offset=0 imm=32 #line 34 "sample/./xdp_common.h" r5 >>= (IMMEDIATE(32) & 63); - // EBPF_OP_STXB pc=234 dst=r1 src=r5 offset=66 imm=0 + // EBPF_OP_STXB pc=249 dst=r1 src=r5 offset=66 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(66)) = (uint8_t)r5; - // EBPF_OP_MOV64_REG pc=235 dst=r5 src=r4 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=250 dst=r5 src=r4 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r5 = r4; - // EBPF_OP_RSH64_IMM pc=236 dst=r5 src=r0 offset=0 imm=40 + // EBPF_OP_RSH64_IMM pc=251 dst=r5 src=r0 offset=0 imm=40 #line 34 "sample/./xdp_common.h" r5 >>= (IMMEDIATE(40) & 63); - // EBPF_OP_STXB pc=237 dst=r1 src=r5 offset=67 imm=0 + // EBPF_OP_STXB pc=252 dst=r1 src=r5 offset=67 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(67)) = (uint8_t)r5; - // EBPF_OP_MOV64_REG pc=238 dst=r5 src=r4 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=253 dst=r5 src=r4 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r5 = r4; - // EBPF_OP_RSH64_IMM pc=239 dst=r5 src=r0 offset=0 imm=16 + // EBPF_OP_RSH64_IMM pc=254 dst=r5 src=r0 offset=0 imm=16 #line 34 "sample/./xdp_common.h" r5 >>= (IMMEDIATE(16) & 63); - // EBPF_OP_STXB pc=240 dst=r1 src=r5 offset=64 imm=0 + // EBPF_OP_STXB pc=255 dst=r1 src=r5 offset=64 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(64)) = (uint8_t)r5; - // EBPF_OP_MOV64_REG pc=241 dst=r5 src=r4 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=256 dst=r5 src=r4 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r5 = r4; - // EBPF_OP_RSH64_IMM pc=242 dst=r5 src=r0 offset=0 imm=24 + // EBPF_OP_RSH64_IMM pc=257 dst=r5 src=r0 offset=0 imm=24 #line 34 "sample/./xdp_common.h" r5 >>= (IMMEDIATE(24) & 63); - // EBPF_OP_STXB pc=243 dst=r1 src=r5 offset=65 imm=0 + // EBPF_OP_STXB pc=258 dst=r1 src=r5 offset=65 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(65)) = (uint8_t)r5; - // EBPF_OP_STXB pc=244 dst=r1 src=r4 offset=62 imm=0 + // EBPF_OP_STXB pc=259 dst=r1 src=r4 offset=62 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(62)) = (uint8_t)r4; - // EBPF_OP_RSH64_IMM pc=245 dst=r4 src=r0 offset=0 imm=8 + // EBPF_OP_RSH64_IMM pc=260 dst=r4 src=r0 offset=0 imm=8 #line 34 "sample/./xdp_common.h" r4 >>= (IMMEDIATE(8) & 63); - // EBPF_OP_STXB pc=246 dst=r1 src=r4 offset=63 imm=0 + // EBPF_OP_STXB pc=261 dst=r1 src=r4 offset=63 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(63)) = (uint8_t)r4; - // EBPF_OP_LDXDW pc=247 dst=r4 src=r10 offset=-8 imm=0 + // EBPF_OP_LDXDW pc=262 dst=r4 src=r10 offset=-8 imm=0 #line 34 "sample/./xdp_common.h" r4 = *(uint64_t*)(uintptr_t)(r10 + OFFSET(-8)); - // EBPF_OP_MOV64_REG pc=248 dst=r5 src=r4 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=263 dst=r5 src=r4 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r5 = r4; - // EBPF_OP_RSH64_IMM pc=249 dst=r5 src=r0 offset=0 imm=48 + // EBPF_OP_RSH64_IMM pc=264 dst=r5 src=r0 offset=0 imm=48 #line 34 "sample/./xdp_common.h" r5 >>= (IMMEDIATE(48) & 63); - // EBPF_OP_STXB pc=250 dst=r1 src=r5 offset=76 imm=0 + // EBPF_OP_STXB pc=265 dst=r1 src=r5 offset=76 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(76)) = (uint8_t)r5; - // EBPF_OP_MOV64_REG pc=251 dst=r5 src=r4 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=266 dst=r5 src=r4 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r5 = r4; - // EBPF_OP_RSH64_IMM pc=252 dst=r5 src=r0 offset=0 imm=56 + // EBPF_OP_RSH64_IMM pc=267 dst=r5 src=r0 offset=0 imm=56 #line 34 "sample/./xdp_common.h" r5 >>= (IMMEDIATE(56) & 63); - // EBPF_OP_STXB pc=253 dst=r1 src=r5 offset=77 imm=0 + // EBPF_OP_STXB pc=268 dst=r1 src=r5 offset=77 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(77)) = (uint8_t)r5; - // EBPF_OP_MOV64_REG pc=254 dst=r5 src=r4 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=269 dst=r5 src=r4 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r5 = r4; - // EBPF_OP_RSH64_IMM pc=255 dst=r5 src=r0 offset=0 imm=32 + // EBPF_OP_RSH64_IMM pc=270 dst=r5 src=r0 offset=0 imm=32 #line 34 "sample/./xdp_common.h" r5 >>= (IMMEDIATE(32) & 63); - // EBPF_OP_STXB pc=256 dst=r1 src=r5 offset=74 imm=0 + // EBPF_OP_STXB pc=271 dst=r1 src=r5 offset=74 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(74)) = (uint8_t)r5; - // EBPF_OP_MOV64_REG pc=257 dst=r5 src=r4 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=272 dst=r5 src=r4 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r5 = r4; - // EBPF_OP_RSH64_IMM pc=258 dst=r5 src=r0 offset=0 imm=40 + // EBPF_OP_RSH64_IMM pc=273 dst=r5 src=r0 offset=0 imm=40 #line 34 "sample/./xdp_common.h" r5 >>= (IMMEDIATE(40) & 63); - // EBPF_OP_STXB pc=259 dst=r1 src=r5 offset=75 imm=0 + // EBPF_OP_STXB pc=274 dst=r1 src=r5 offset=75 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(75)) = (uint8_t)r5; - // EBPF_OP_MOV64_REG pc=260 dst=r5 src=r4 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=275 dst=r5 src=r4 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r5 = r4; - // EBPF_OP_RSH64_IMM pc=261 dst=r5 src=r0 offset=0 imm=16 + // EBPF_OP_RSH64_IMM pc=276 dst=r5 src=r0 offset=0 imm=16 #line 34 "sample/./xdp_common.h" r5 >>= (IMMEDIATE(16) & 63); - // EBPF_OP_STXB pc=262 dst=r1 src=r5 offset=72 imm=0 + // EBPF_OP_STXB pc=277 dst=r1 src=r5 offset=72 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(72)) = (uint8_t)r5; - // EBPF_OP_MOV64_REG pc=263 dst=r5 src=r4 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=278 dst=r5 src=r4 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r5 = r4; - // EBPF_OP_RSH64_IMM pc=264 dst=r5 src=r0 offset=0 imm=24 + // EBPF_OP_RSH64_IMM pc=279 dst=r5 src=r0 offset=0 imm=24 #line 34 "sample/./xdp_common.h" r5 >>= (IMMEDIATE(24) & 63); - // EBPF_OP_STXB pc=265 dst=r1 src=r5 offset=73 imm=0 + // EBPF_OP_STXB pc=280 dst=r1 src=r5 offset=73 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(73)) = (uint8_t)r5; - // EBPF_OP_STXB pc=266 dst=r1 src=r4 offset=70 imm=0 + // EBPF_OP_STXB pc=281 dst=r1 src=r4 offset=70 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(70)) = (uint8_t)r4; - // EBPF_OP_RSH64_IMM pc=267 dst=r4 src=r0 offset=0 imm=8 + // EBPF_OP_RSH64_IMM pc=282 dst=r4 src=r0 offset=0 imm=8 #line 34 "sample/./xdp_common.h" r4 >>= (IMMEDIATE(8) & 63); - // EBPF_OP_STXB pc=268 dst=r1 src=r4 offset=71 imm=0 + // EBPF_OP_STXB pc=283 dst=r1 src=r4 offset=71 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(71)) = (uint8_t)r4; - // EBPF_OP_LDXW pc=269 dst=r4 src=r3 offset=36 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_MOV64_REG pc=284 dst=r4 src=r1 offset=0 imm=0 +#line 138 "sample/encap_reflect_packet.c" + r4 = r1; + // EBPF_OP_ADD64_IMM pc=285 dst=r4 src=r0 offset=0 imm=102 +#line 138 "sample/encap_reflect_packet.c" + r4 += IMMEDIATE(102); + // EBPF_OP_LDXDW pc=286 dst=r5 src=r6 offset=8 imm=0 +#line 138 "sample/encap_reflect_packet.c" + r5 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(8)); + // EBPF_OP_JGT_REG pc=287 dst=r4 src=r5 offset=34 imm=0 +#line 138 "sample/encap_reflect_packet.c" + if (r4 > r5) +#line 138 "sample/encap_reflect_packet.c" + goto label_5; + // EBPF_OP_LDXH pc=288 dst=r4 src=r1 offset=96 imm=0 +#line 142 "sample/encap_reflect_packet.c" + r4 = *(uint16_t*)(uintptr_t)(r1 + OFFSET(96)); + // EBPF_OP_JNE_IMM pc=289 dst=r4 src=r0 offset=4 imm=7459 +#line 142 "sample/encap_reflect_packet.c" + if (r4 != IMMEDIATE(7459)) +#line 142 "sample/encap_reflect_packet.c" + goto label_3; + // EBPF_OP_LDXH pc=290 dst=r4 src=r1 offset=94 imm=0 +#line 40 "sample/./xdp_common.h" + r4 = *(uint16_t*)(uintptr_t)(r1 + OFFSET(94)); + // EBPF_OP_STXH pc=291 dst=r1 src=r4 offset=96 imm=0 +#line 42 "sample/./xdp_common.h" + *(uint16_t*)(uintptr_t)(r1 + OFFSET(96)) = (uint16_t)r4; + // EBPF_OP_MOV64_IMM pc=292 dst=r4 src=r0 offset=0 imm=7459 +#line 42 "sample/./xdp_common.h" + r4 = IMMEDIATE(7459); + // EBPF_OP_STXH pc=293 dst=r1 src=r4 offset=94 imm=0 +#line 41 "sample/./xdp_common.h" + *(uint16_t*)(uintptr_t)(r1 + OFFSET(94)) = (uint16_t)r4; +label_3: + // EBPF_OP_LDXW pc=294 dst=r4 src=r3 offset=36 imm=0 +#line 147 "sample/encap_reflect_packet.c" r4 = *(uint32_t*)(uintptr_t)(r3 + OFFSET(36)); - // EBPF_OP_STXW pc=270 dst=r2 src=r4 offset=36 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_STXW pc=295 dst=r2 src=r4 offset=36 imm=0 +#line 147 "sample/encap_reflect_packet.c" *(uint32_t*)(uintptr_t)(r2 + OFFSET(36)) = (uint32_t)r4; - // EBPF_OP_LDXW pc=271 dst=r4 src=r3 offset=32 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_LDXW pc=296 dst=r4 src=r3 offset=32 imm=0 +#line 147 "sample/encap_reflect_packet.c" r4 = *(uint32_t*)(uintptr_t)(r3 + OFFSET(32)); - // EBPF_OP_STXW pc=272 dst=r2 src=r4 offset=32 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_STXW pc=297 dst=r2 src=r4 offset=32 imm=0 +#line 147 "sample/encap_reflect_packet.c" *(uint32_t*)(uintptr_t)(r2 + OFFSET(32)) = (uint32_t)r4; - // EBPF_OP_LDXW pc=273 dst=r4 src=r3 offset=28 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_LDXW pc=298 dst=r4 src=r3 offset=28 imm=0 +#line 147 "sample/encap_reflect_packet.c" r4 = *(uint32_t*)(uintptr_t)(r3 + OFFSET(28)); - // EBPF_OP_STXW pc=274 dst=r2 src=r4 offset=28 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_STXW pc=299 dst=r2 src=r4 offset=28 imm=0 +#line 147 "sample/encap_reflect_packet.c" *(uint32_t*)(uintptr_t)(r2 + OFFSET(28)) = (uint32_t)r4; - // EBPF_OP_LDXW pc=275 dst=r4 src=r3 offset=24 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_LDXW pc=300 dst=r4 src=r3 offset=24 imm=0 +#line 147 "sample/encap_reflect_packet.c" r4 = *(uint32_t*)(uintptr_t)(r3 + OFFSET(24)); - // EBPF_OP_STXW pc=276 dst=r2 src=r4 offset=24 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_STXW pc=301 dst=r2 src=r4 offset=24 imm=0 +#line 147 "sample/encap_reflect_packet.c" *(uint32_t*)(uintptr_t)(r2 + OFFSET(24)) = (uint32_t)r4; - // EBPF_OP_LDXW pc=277 dst=r4 src=r3 offset=20 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_LDXW pc=302 dst=r4 src=r3 offset=20 imm=0 +#line 147 "sample/encap_reflect_packet.c" r4 = *(uint32_t*)(uintptr_t)(r3 + OFFSET(20)); - // EBPF_OP_STXW pc=278 dst=r2 src=r4 offset=20 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_STXW pc=303 dst=r2 src=r4 offset=20 imm=0 +#line 147 "sample/encap_reflect_packet.c" *(uint32_t*)(uintptr_t)(r2 + OFFSET(20)) = (uint32_t)r4; - // EBPF_OP_LDXW pc=279 dst=r4 src=r3 offset=16 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_LDXW pc=304 dst=r4 src=r3 offset=16 imm=0 +#line 147 "sample/encap_reflect_packet.c" r4 = *(uint32_t*)(uintptr_t)(r3 + OFFSET(16)); - // EBPF_OP_STXW pc=280 dst=r2 src=r4 offset=16 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_STXW pc=305 dst=r2 src=r4 offset=16 imm=0 +#line 147 "sample/encap_reflect_packet.c" *(uint32_t*)(uintptr_t)(r2 + OFFSET(16)) = (uint32_t)r4; - // EBPF_OP_LDXW pc=281 dst=r4 src=r3 offset=12 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_LDXW pc=306 dst=r4 src=r3 offset=12 imm=0 +#line 147 "sample/encap_reflect_packet.c" r4 = *(uint32_t*)(uintptr_t)(r3 + OFFSET(12)); - // EBPF_OP_STXW pc=282 dst=r2 src=r4 offset=12 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_STXW pc=307 dst=r2 src=r4 offset=12 imm=0 +#line 147 "sample/encap_reflect_packet.c" *(uint32_t*)(uintptr_t)(r2 + OFFSET(12)) = (uint32_t)r4; - // EBPF_OP_LDXW pc=283 dst=r4 src=r3 offset=8 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_LDXW pc=308 dst=r4 src=r3 offset=8 imm=0 +#line 147 "sample/encap_reflect_packet.c" r4 = *(uint32_t*)(uintptr_t)(r3 + OFFSET(8)); - // EBPF_OP_STXW pc=284 dst=r2 src=r4 offset=8 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_STXW pc=309 dst=r2 src=r4 offset=8 imm=0 +#line 147 "sample/encap_reflect_packet.c" *(uint32_t*)(uintptr_t)(r2 + OFFSET(8)) = (uint32_t)r4; - // EBPF_OP_LDXW pc=285 dst=r4 src=r3 offset=4 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_LDXW pc=310 dst=r4 src=r3 offset=4 imm=0 +#line 147 "sample/encap_reflect_packet.c" r4 = *(uint32_t*)(uintptr_t)(r3 + OFFSET(4)); - // EBPF_OP_STXW pc=286 dst=r2 src=r4 offset=4 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_STXW pc=311 dst=r2 src=r4 offset=4 imm=0 +#line 147 "sample/encap_reflect_packet.c" *(uint32_t*)(uintptr_t)(r2 + OFFSET(4)) = (uint32_t)r4; - // EBPF_OP_LDXW pc=287 dst=r3 src=r3 offset=0 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_LDXW pc=312 dst=r3 src=r3 offset=0 imm=0 +#line 147 "sample/encap_reflect_packet.c" r3 = *(uint32_t*)(uintptr_t)(r3 + OFFSET(0)); - // EBPF_OP_STXW pc=288 dst=r2 src=r3 offset=0 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_STXW pc=313 dst=r2 src=r3 offset=0 imm=0 +#line 147 "sample/encap_reflect_packet.c" *(uint32_t*)(uintptr_t)(r2 + OFFSET(0)) = (uint32_t)r3; - // EBPF_OP_MOV64_IMM pc=289 dst=r2 src=r0 offset=0 imm=41 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_MOV64_IMM pc=314 dst=r2 src=r0 offset=0 imm=41 +#line 147 "sample/encap_reflect_packet.c" r2 = IMMEDIATE(41); - // EBPF_OP_STXB pc=290 dst=r1 src=r2 offset=20 imm=0 -#line 132 "sample/encap_reflect_packet.c" + // EBPF_OP_STXB pc=315 dst=r1 src=r2 offset=20 imm=0 +#line 150 "sample/encap_reflect_packet.c" *(uint8_t*)(uintptr_t)(r1 + OFFSET(20)) = (uint8_t)r2; - // EBPF_OP_LDXH pc=291 dst=r2 src=r1 offset=58 imm=0 -#line 133 "sample/encap_reflect_packet.c" + // EBPF_OP_LDXH pc=316 dst=r2 src=r1 offset=58 imm=0 +#line 151 "sample/encap_reflect_packet.c" r2 = *(uint16_t*)(uintptr_t)(r1 + OFFSET(58)); - // EBPF_OP_BE pc=292 dst=r2 src=r0 offset=0 imm=16 -#line 133 "sample/encap_reflect_packet.c" + // EBPF_OP_BE pc=317 dst=r2 src=r0 offset=0 imm=16 +#line 151 "sample/encap_reflect_packet.c" r2 = htobe16((uint16_t)r2); -#line 133 "sample/encap_reflect_packet.c" +#line 151 "sample/encap_reflect_packet.c" r2 &= UINT32_MAX; - // EBPF_OP_ADD64_IMM pc=293 dst=r2 src=r0 offset=0 imm=40 -#line 133 "sample/encap_reflect_packet.c" + // EBPF_OP_ADD64_IMM pc=318 dst=r2 src=r0 offset=0 imm=40 +#line 151 "sample/encap_reflect_packet.c" r2 += IMMEDIATE(40); - // EBPF_OP_BE pc=294 dst=r2 src=r0 offset=0 imm=16 -#line 133 "sample/encap_reflect_packet.c" + // EBPF_OP_BE pc=319 dst=r2 src=r0 offset=0 imm=16 +#line 151 "sample/encap_reflect_packet.c" r2 = htobe16((uint16_t)r2); -#line 133 "sample/encap_reflect_packet.c" +#line 151 "sample/encap_reflect_packet.c" r2 &= UINT32_MAX; - // EBPF_OP_STXH pc=295 dst=r1 src=r2 offset=18 imm=0 -#line 133 "sample/encap_reflect_packet.c" + // EBPF_OP_STXH pc=320 dst=r1 src=r2 offset=18 imm=0 +#line 151 "sample/encap_reflect_packet.c" *(uint16_t*)(uintptr_t)(r1 + OFFSET(18)) = (uint16_t)r2; -label_2: - // EBPF_OP_MOV64_IMM pc=296 dst=r0 src=r0 offset=0 imm=3 -#line 133 "sample/encap_reflect_packet.c" +label_4: + // EBPF_OP_MOV64_IMM pc=321 dst=r0 src=r0 offset=0 imm=3 +#line 151 "sample/encap_reflect_packet.c" r0 = IMMEDIATE(3); -label_3: - // EBPF_OP_EXIT pc=297 dst=r0 src=r0 offset=0 imm=0 -#line 198 "sample/encap_reflect_packet.c" +label_5: + // EBPF_OP_EXIT pc=322 dst=r0 src=r0 offset=0 imm=0 +#line 216 "sample/encap_reflect_packet.c" return r0; -#line 198 "sample/encap_reflect_packet.c" +#line 216 "sample/encap_reflect_packet.c" } #pragma code_seg(pop) #line __LINE__ __FILE__ @@ -1035,7 +1124,7 @@ static program_entry_t _programs[] = { 0, encap_reflect_packet_helpers, 2, - 298, + 323, &encap_reflect_packet_program_type_guid, &encap_reflect_packet_attach_type_guid, }, diff --git a/tests/bpf2c_tests/expected/encap_reflect_packet_sys.c b/tests/bpf2c_tests/expected/encap_reflect_packet_sys.c index 776afbf34b..5bf9346433 100644 --- a/tests/bpf2c_tests/expected/encap_reflect_packet_sys.c +++ b/tests/bpf2c_tests/expected/encap_reflect_packet_sys.c @@ -192,120 +192,124 @@ static GUID encap_reflect_packet_attach_type_guid = { #pragma code_seg(push, "xdp/en~1") static uint64_t encap_reflect_packet(void* context) -#line 149 "sample/encap_reflect_packet.c" +#line 167 "sample/encap_reflect_packet.c" { -#line 149 "sample/encap_reflect_packet.c" +#line 167 "sample/encap_reflect_packet.c" // Prologue -#line 149 "sample/encap_reflect_packet.c" +#line 167 "sample/encap_reflect_packet.c" uint64_t stack[(UBPF_STACK_SIZE + 7) / 8]; -#line 149 "sample/encap_reflect_packet.c" +#line 167 "sample/encap_reflect_packet.c" register uint64_t r0 = 0; -#line 149 "sample/encap_reflect_packet.c" +#line 167 "sample/encap_reflect_packet.c" register uint64_t r1 = 0; -#line 149 "sample/encap_reflect_packet.c" +#line 167 "sample/encap_reflect_packet.c" register uint64_t r2 = 0; -#line 149 "sample/encap_reflect_packet.c" +#line 167 "sample/encap_reflect_packet.c" register uint64_t r3 = 0; -#line 149 "sample/encap_reflect_packet.c" +#line 167 "sample/encap_reflect_packet.c" register uint64_t r4 = 0; -#line 149 "sample/encap_reflect_packet.c" +#line 167 "sample/encap_reflect_packet.c" register uint64_t r5 = 0; -#line 149 "sample/encap_reflect_packet.c" +#line 167 "sample/encap_reflect_packet.c" register uint64_t r6 = 0; -#line 149 "sample/encap_reflect_packet.c" +#line 167 "sample/encap_reflect_packet.c" + register uint64_t r7 = 0; +#line 167 "sample/encap_reflect_packet.c" + register uint64_t r8 = 0; +#line 167 "sample/encap_reflect_packet.c" register uint64_t r10 = 0; -#line 149 "sample/encap_reflect_packet.c" +#line 167 "sample/encap_reflect_packet.c" r1 = (uintptr_t)context; -#line 149 "sample/encap_reflect_packet.c" +#line 167 "sample/encap_reflect_packet.c" r10 = (uintptr_t)((uint8_t*)stack + sizeof(stack)); // EBPF_OP_MOV64_REG pc=0 dst=r6 src=r1 offset=0 imm=0 -#line 149 "sample/encap_reflect_packet.c" +#line 167 "sample/encap_reflect_packet.c" r6 = r1; // EBPF_OP_MOV64_IMM pc=1 dst=r0 src=r0 offset=0 imm=1 -#line 149 "sample/encap_reflect_packet.c" +#line 167 "sample/encap_reflect_packet.c" r0 = IMMEDIATE(1); // EBPF_OP_LDXDW pc=2 dst=r1 src=r6 offset=8 imm=0 -#line 155 "sample/encap_reflect_packet.c" +#line 173 "sample/encap_reflect_packet.c" r1 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(8)); // EBPF_OP_LDXDW pc=3 dst=r2 src=r6 offset=0 imm=0 -#line 154 "sample/encap_reflect_packet.c" +#line 172 "sample/encap_reflect_packet.c" r2 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(0)); // EBPF_OP_MOV64_REG pc=4 dst=r3 src=r2 offset=0 imm=0 -#line 155 "sample/encap_reflect_packet.c" +#line 173 "sample/encap_reflect_packet.c" r3 = r2; // EBPF_OP_ADD64_IMM pc=5 dst=r3 src=r0 offset=0 imm=14 -#line 155 "sample/encap_reflect_packet.c" +#line 173 "sample/encap_reflect_packet.c" r3 += IMMEDIATE(14); - // EBPF_OP_JGT_REG pc=6 dst=r3 src=r1 offset=290 imm=0 -#line 155 "sample/encap_reflect_packet.c" + // EBPF_OP_JGT_REG pc=6 dst=r3 src=r1 offset=315 imm=0 +#line 173 "sample/encap_reflect_packet.c" if (r3 > r1) -#line 155 "sample/encap_reflect_packet.c" - goto label_3; +#line 173 "sample/encap_reflect_packet.c" + goto label_5; // EBPF_OP_LDXH pc=7 dst=r4 src=r2 offset=12 imm=0 -#line 160 "sample/encap_reflect_packet.c" +#line 178 "sample/encap_reflect_packet.c" r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(12)); - // EBPF_OP_JEQ_IMM pc=8 dst=r4 src=r0 offset=105 imm=56710 -#line 160 "sample/encap_reflect_packet.c" + // EBPF_OP_JEQ_IMM pc=8 dst=r4 src=r0 offset=120 imm=56710 +#line 178 "sample/encap_reflect_packet.c" if (r4 == IMMEDIATE(56710)) -#line 160 "sample/encap_reflect_packet.c" - goto label_1; - // EBPF_OP_JNE_IMM pc=9 dst=r4 src=r0 offset=287 imm=8 -#line 160 "sample/encap_reflect_packet.c" +#line 178 "sample/encap_reflect_packet.c" + goto label_2; + // EBPF_OP_JNE_IMM pc=9 dst=r4 src=r0 offset=312 imm=8 +#line 178 "sample/encap_reflect_packet.c" if (r4 != IMMEDIATE(8)) -#line 160 "sample/encap_reflect_packet.c" - goto label_3; +#line 178 "sample/encap_reflect_packet.c" + goto label_5; // EBPF_OP_MOV64_REG pc=10 dst=r4 src=r2 offset=0 imm=0 -#line 161 "sample/encap_reflect_packet.c" +#line 179 "sample/encap_reflect_packet.c" r4 = r2; // EBPF_OP_ADD64_IMM pc=11 dst=r4 src=r0 offset=0 imm=34 -#line 161 "sample/encap_reflect_packet.c" +#line 179 "sample/encap_reflect_packet.c" r4 += IMMEDIATE(34); - // EBPF_OP_JGT_REG pc=12 dst=r4 src=r1 offset=284 imm=0 -#line 161 "sample/encap_reflect_packet.c" + // EBPF_OP_JGT_REG pc=12 dst=r4 src=r1 offset=309 imm=0 +#line 179 "sample/encap_reflect_packet.c" if (r4 > r1) -#line 161 "sample/encap_reflect_packet.c" - goto label_3; +#line 179 "sample/encap_reflect_packet.c" + goto label_5; // EBPF_OP_LDXB pc=13 dst=r4 src=r2 offset=23 imm=0 -#line 167 "sample/encap_reflect_packet.c" +#line 185 "sample/encap_reflect_packet.c" r4 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(23)); - // EBPF_OP_JNE_IMM pc=14 dst=r4 src=r0 offset=282 imm=17 -#line 167 "sample/encap_reflect_packet.c" + // EBPF_OP_JNE_IMM pc=14 dst=r4 src=r0 offset=307 imm=17 +#line 185 "sample/encap_reflect_packet.c" if (r4 != IMMEDIATE(17)) -#line 167 "sample/encap_reflect_packet.c" - goto label_3; +#line 185 "sample/encap_reflect_packet.c" + goto label_5; // EBPF_OP_LDXB pc=15 dst=r2 src=r2 offset=14 imm=0 -#line 167 "sample/encap_reflect_packet.c" +#line 185 "sample/encap_reflect_packet.c" r2 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(14)); // EBPF_OP_LSH64_IMM pc=16 dst=r2 src=r0 offset=0 imm=2 -#line 167 "sample/encap_reflect_packet.c" +#line 185 "sample/encap_reflect_packet.c" r2 <<= (IMMEDIATE(2) & 63); // EBPF_OP_AND64_IMM pc=17 dst=r2 src=r0 offset=0 imm=60 -#line 167 "sample/encap_reflect_packet.c" +#line 185 "sample/encap_reflect_packet.c" r2 &= IMMEDIATE(60); // EBPF_OP_ADD64_REG pc=18 dst=r3 src=r2 offset=0 imm=0 -#line 167 "sample/encap_reflect_packet.c" +#line 185 "sample/encap_reflect_packet.c" r3 += r2; // EBPF_OP_MOV64_REG pc=19 dst=r2 src=r3 offset=0 imm=0 -#line 167 "sample/encap_reflect_packet.c" +#line 185 "sample/encap_reflect_packet.c" r2 = r3; // EBPF_OP_ADD64_IMM pc=20 dst=r2 src=r0 offset=0 imm=8 -#line 167 "sample/encap_reflect_packet.c" +#line 185 "sample/encap_reflect_packet.c" r2 += IMMEDIATE(8); - // EBPF_OP_JGT_REG pc=21 dst=r2 src=r1 offset=275 imm=0 -#line 167 "sample/encap_reflect_packet.c" + // EBPF_OP_JGT_REG pc=21 dst=r2 src=r1 offset=300 imm=0 +#line 185 "sample/encap_reflect_packet.c" if (r2 > r1) -#line 167 "sample/encap_reflect_packet.c" - goto label_3; +#line 185 "sample/encap_reflect_packet.c" + goto label_5; // EBPF_OP_LDXH pc=22 dst=r1 src=r3 offset=2 imm=0 -#line 173 "sample/encap_reflect_packet.c" +#line 191 "sample/encap_reflect_packet.c" r1 = *(uint16_t*)(uintptr_t)(r3 + OFFSET(2)); - // EBPF_OP_JNE_IMM pc=23 dst=r1 src=r0 offset=273 imm=7459 -#line 173 "sample/encap_reflect_packet.c" + // EBPF_OP_JNE_IMM pc=23 dst=r1 src=r0 offset=298 imm=7459 +#line 191 "sample/encap_reflect_packet.c" if (r1 != IMMEDIATE(7459)) -#line 173 "sample/encap_reflect_packet.c" - goto label_3; +#line 191 "sample/encap_reflect_packet.c" + goto label_5; // EBPF_OP_MOV64_REG pc=24 dst=r1 src=r6 offset=0 imm=0 #line 22 "sample/encap_reflect_packet.c" r1 = r6; @@ -336,850 +340,935 @@ encap_reflect_packet(void* context) // EBPF_OP_MOV64_IMM pc=32 dst=r2 src=r0 offset=0 imm=0 #line 22 "sample/encap_reflect_packet.c" r2 = IMMEDIATE(0); - // EBPF_OP_JSGT_REG pc=33 dst=r2 src=r1 offset=263 imm=0 + // EBPF_OP_JSGT_REG pc=33 dst=r2 src=r1 offset=288 imm=0 #line 22 "sample/encap_reflect_packet.c" if ((int64_t)r2 > (int64_t)r1) #line 22 "sample/encap_reflect_packet.c" - goto label_3; + goto label_5; // EBPF_OP_LDXDW pc=34 dst=r4 src=r6 offset=8 imm=0 #line 28 "sample/encap_reflect_packet.c" r4 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(8)); - // EBPF_OP_LDXDW pc=35 dst=r6 src=r6 offset=0 imm=0 + // EBPF_OP_LDXDW pc=35 dst=r7 src=r6 offset=0 imm=0 #line 27 "sample/encap_reflect_packet.c" - r6 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(0)); - // EBPF_OP_MOV64_REG pc=36 dst=r3 src=r6 offset=0 imm=0 + r7 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(0)); + // EBPF_OP_MOV64_REG pc=36 dst=r3 src=r7 offset=0 imm=0 #line 28 "sample/encap_reflect_packet.c" - r3 = r6; + r3 = r7; // EBPF_OP_ADD64_IMM pc=37 dst=r3 src=r0 offset=0 imm=14 #line 28 "sample/encap_reflect_packet.c" r3 += IMMEDIATE(14); - // EBPF_OP_JGT_REG pc=38 dst=r3 src=r4 offset=258 imm=0 + // EBPF_OP_JGT_REG pc=38 dst=r3 src=r4 offset=283 imm=0 #line 28 "sample/encap_reflect_packet.c" if (r3 > r4) #line 28 "sample/encap_reflect_packet.c" - goto label_3; - // EBPF_OP_MOV64_REG pc=39 dst=r2 src=r6 offset=0 imm=0 + goto label_5; + // EBPF_OP_MOV64_REG pc=39 dst=r2 src=r7 offset=0 imm=0 #line 35 "sample/encap_reflect_packet.c" - r2 = r6; + r2 = r7; // EBPF_OP_ADD64_IMM pc=40 dst=r2 src=r0 offset=0 imm=20 #line 35 "sample/encap_reflect_packet.c" r2 += IMMEDIATE(20); - // EBPF_OP_JGT_REG pc=41 dst=r2 src=r4 offset=255 imm=0 + // EBPF_OP_JGT_REG pc=41 dst=r2 src=r4 offset=280 imm=0 #line 35 "sample/encap_reflect_packet.c" if (r2 > r4) #line 35 "sample/encap_reflect_packet.c" - goto label_3; - // EBPF_OP_MOV64_REG pc=42 dst=r1 src=r6 offset=0 imm=0 + goto label_5; + // EBPF_OP_MOV64_REG pc=42 dst=r1 src=r7 offset=0 imm=0 #line 43 "sample/encap_reflect_packet.c" - r1 = r6; + r1 = r7; // EBPF_OP_ADD64_IMM pc=43 dst=r1 src=r0 offset=0 imm=34 #line 43 "sample/encap_reflect_packet.c" r1 += IMMEDIATE(34); - // EBPF_OP_JGT_REG pc=44 dst=r1 src=r4 offset=252 imm=0 + // EBPF_OP_JGT_REG pc=44 dst=r1 src=r4 offset=277 imm=0 #line 43 "sample/encap_reflect_packet.c" if (r1 > r4) #line 43 "sample/encap_reflect_packet.c" - goto label_3; - // EBPF_OP_MOV64_REG pc=45 dst=r5 src=r6 offset=0 imm=0 + goto label_5; + // EBPF_OP_MOV64_REG pc=45 dst=r5 src=r7 offset=0 imm=0 #line 43 "sample/encap_reflect_packet.c" - r5 = r6; + r5 = r7; // EBPF_OP_ADD64_IMM pc=46 dst=r5 src=r0 offset=0 imm=54 #line 43 "sample/encap_reflect_packet.c" r5 += IMMEDIATE(54); - // EBPF_OP_JGT_REG pc=47 dst=r5 src=r4 offset=249 imm=0 + // EBPF_OP_JGT_REG pc=47 dst=r5 src=r4 offset=274 imm=0 #line 43 "sample/encap_reflect_packet.c" if (r5 > r4) #line 43 "sample/encap_reflect_packet.c" - goto label_3; + goto label_5; // EBPF_OP_LDXH pc=48 dst=r4 src=r2 offset=4 imm=0 #line 56 "sample/encap_reflect_packet.c" r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(4)); - // EBPF_OP_STXH pc=49 dst=r6 src=r4 offset=4 imm=0 + // EBPF_OP_STXH pc=49 dst=r7 src=r4 offset=4 imm=0 #line 56 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(4)) = (uint16_t)r4; + *(uint16_t*)(uintptr_t)(r7 + OFFSET(4)) = (uint16_t)r4; // EBPF_OP_LDXH pc=50 dst=r4 src=r2 offset=0 imm=0 #line 56 "sample/encap_reflect_packet.c" r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(0)); - // EBPF_OP_STXH pc=51 dst=r6 src=r4 offset=0 imm=0 + // EBPF_OP_STXH pc=51 dst=r7 src=r4 offset=0 imm=0 #line 56 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(0)) = (uint16_t)r4; + *(uint16_t*)(uintptr_t)(r7 + OFFSET(0)) = (uint16_t)r4; // EBPF_OP_LDXH pc=52 dst=r4 src=r2 offset=2 imm=0 #line 56 "sample/encap_reflect_packet.c" r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(2)); - // EBPF_OP_STXH pc=53 dst=r6 src=r4 offset=2 imm=0 + // EBPF_OP_STXH pc=53 dst=r7 src=r4 offset=2 imm=0 #line 56 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(2)) = (uint16_t)r4; + *(uint16_t*)(uintptr_t)(r7 + OFFSET(2)) = (uint16_t)r4; // EBPF_OP_LDXH pc=54 dst=r4 src=r2 offset=12 imm=0 #line 56 "sample/encap_reflect_packet.c" r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(12)); - // EBPF_OP_STXH pc=55 dst=r6 src=r4 offset=12 imm=0 + // EBPF_OP_STXH pc=55 dst=r7 src=r4 offset=12 imm=0 #line 56 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(12)) = (uint16_t)r4; + *(uint16_t*)(uintptr_t)(r7 + OFFSET(12)) = (uint16_t)r4; // EBPF_OP_LDXH pc=56 dst=r4 src=r2 offset=10 imm=0 #line 56 "sample/encap_reflect_packet.c" r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(10)); - // EBPF_OP_STXH pc=57 dst=r6 src=r4 offset=10 imm=0 + // EBPF_OP_STXH pc=57 dst=r7 src=r4 offset=10 imm=0 #line 56 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(10)) = (uint16_t)r4; + *(uint16_t*)(uintptr_t)(r7 + OFFSET(10)) = (uint16_t)r4; // EBPF_OP_LDXH pc=58 dst=r5 src=r2 offset=8 imm=0 #line 56 "sample/encap_reflect_packet.c" r5 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(8)); - // EBPF_OP_LDXH pc=59 dst=r0 src=r2 offset=6 imm=0 + // EBPF_OP_LDXH pc=59 dst=r8 src=r2 offset=6 imm=0 #line 56 "sample/encap_reflect_packet.c" - r0 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(6)); - // EBPF_OP_STXH pc=60 dst=r6 src=r4 offset=4 imm=0 + r8 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(6)); + // EBPF_OP_STXH pc=60 dst=r7 src=r4 offset=4 imm=0 #line 16 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(4)) = (uint16_t)r4; - // EBPF_OP_STXH pc=61 dst=r6 src=r0 offset=6 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(4)) = (uint16_t)r4; + // EBPF_OP_STXH pc=61 dst=r7 src=r8 offset=6 imm=0 #line 56 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(6)) = (uint16_t)r0; - // EBPF_OP_STXH pc=62 dst=r6 src=r0 offset=0 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(6)) = (uint16_t)r8; + // EBPF_OP_STXH pc=62 dst=r7 src=r8 offset=0 imm=0 #line 16 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(0)) = (uint16_t)r0; - // EBPF_OP_STXH pc=63 dst=r6 src=r5 offset=8 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(0)) = (uint16_t)r8; + // EBPF_OP_STXH pc=63 dst=r7 src=r5 offset=8 imm=0 #line 56 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(8)) = (uint16_t)r5; - // EBPF_OP_STXH pc=64 dst=r6 src=r5 offset=2 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(8)) = (uint16_t)r5; + // EBPF_OP_STXH pc=64 dst=r7 src=r5 offset=2 imm=0 #line 16 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(2)) = (uint16_t)r5; + *(uint16_t*)(uintptr_t)(r7 + OFFSET(2)) = (uint16_t)r5; // EBPF_OP_LDXH pc=65 dst=r4 src=r2 offset=4 imm=0 #line 17 "sample/./xdp_common.h" r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(4)); - // EBPF_OP_STXH pc=66 dst=r6 src=r4 offset=10 imm=0 + // EBPF_OP_STXH pc=66 dst=r7 src=r4 offset=10 imm=0 #line 17 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(10)) = (uint16_t)r4; - // EBPF_OP_LDXH pc=67 dst=r4 src=r2 offset=2 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(10)) = (uint16_t)r4; + // EBPF_OP_LDXH pc=67 dst=r4 src=r2 offset=0 imm=0 #line 17 "sample/./xdp_common.h" - r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(2)); - // EBPF_OP_LDXH pc=68 dst=r2 src=r2 offset=0 imm=0 + r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(0)); + // EBPF_OP_STXH pc=68 dst=r7 src=r4 offset=6 imm=0 +#line 17 "sample/./xdp_common.h" + *(uint16_t*)(uintptr_t)(r7 + OFFSET(6)) = (uint16_t)r4; + // EBPF_OP_LDXH pc=69 dst=r2 src=r2 offset=2 imm=0 +#line 17 "sample/./xdp_common.h" + r2 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(2)); + // EBPF_OP_STXH pc=70 dst=r7 src=r2 offset=8 imm=0 #line 17 "sample/./xdp_common.h" - r2 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(0)); - // EBPF_OP_LDXW pc=69 dst=r5 src=r6 offset=50 imm=0 + *(uint16_t*)(uintptr_t)(r7 + OFFSET(8)) = (uint16_t)r2; + // EBPF_OP_LDXW pc=71 dst=r2 src=r7 offset=50 imm=0 #line 23 "sample/./xdp_common.h" - r5 = *(uint32_t*)(uintptr_t)(r6 + OFFSET(50)); - // EBPF_OP_LDXW pc=70 dst=r0 src=r6 offset=46 imm=0 + r2 = *(uint32_t*)(uintptr_t)(r7 + OFFSET(50)); + // EBPF_OP_LDXW pc=72 dst=r4 src=r7 offset=46 imm=0 #line 24 "sample/./xdp_common.h" - r0 = *(uint32_t*)(uintptr_t)(r6 + OFFSET(46)); - // EBPF_OP_STXW pc=71 dst=r6 src=r0 offset=50 imm=0 + r4 = *(uint32_t*)(uintptr_t)(r7 + OFFSET(46)); + // EBPF_OP_STXW pc=73 dst=r7 src=r4 offset=50 imm=0 #line 24 "sample/./xdp_common.h" - *(uint32_t*)(uintptr_t)(r6 + OFFSET(50)) = (uint32_t)r0; - // EBPF_OP_STXW pc=72 dst=r6 src=r5 offset=46 imm=0 + *(uint32_t*)(uintptr_t)(r7 + OFFSET(50)) = (uint32_t)r4; + // EBPF_OP_STXW pc=74 dst=r7 src=r2 offset=46 imm=0 #line 25 "sample/./xdp_common.h" - *(uint32_t*)(uintptr_t)(r6 + OFFSET(46)) = (uint32_t)r5; - // EBPF_OP_STXH pc=73 dst=r6 src=r2 offset=6 imm=0 -#line 17 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(6)) = (uint16_t)r2; - // EBPF_OP_STXH pc=74 dst=r6 src=r4 offset=8 imm=0 -#line 17 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(8)) = (uint16_t)r4; - // EBPF_OP_LDXW pc=75 dst=r2 src=r1 offset=16 imm=0 -#line 64 "sample/encap_reflect_packet.c" - r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(16)); - // EBPF_OP_STXW pc=76 dst=r3 src=r2 offset=16 imm=0 -#line 64 "sample/encap_reflect_packet.c" - *(uint32_t*)(uintptr_t)(r3 + OFFSET(16)) = (uint32_t)r2; - // EBPF_OP_LDXW pc=77 dst=r2 src=r1 offset=0 imm=0 + *(uint32_t*)(uintptr_t)(r7 + OFFSET(46)) = (uint32_t)r2; + // EBPF_OP_LDXB pc=75 dst=r4 src=r7 offset=34 imm=0 +#line 63 "sample/encap_reflect_packet.c" + r4 = *(uint8_t*)(uintptr_t)(r7 + OFFSET(34)); + // EBPF_OP_LSH64_IMM pc=76 dst=r4 src=r0 offset=0 imm=2 +#line 63 "sample/encap_reflect_packet.c" + r4 <<= (IMMEDIATE(2) & 63); + // EBPF_OP_AND64_IMM pc=77 dst=r4 src=r0 offset=0 imm=60 +#line 63 "sample/encap_reflect_packet.c" + r4 &= IMMEDIATE(60); + // EBPF_OP_MOV64_REG pc=78 dst=r2 src=r1 offset=0 imm=0 +#line 63 "sample/encap_reflect_packet.c" + r2 = r1; + // EBPF_OP_ADD64_REG pc=79 dst=r2 src=r4 offset=0 imm=0 +#line 63 "sample/encap_reflect_packet.c" + r2 += r4; + // EBPF_OP_MOV64_REG pc=80 dst=r4 src=r2 offset=0 imm=0 #line 64 "sample/encap_reflect_packet.c" - r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(0)); - // EBPF_OP_STXW pc=78 dst=r3 src=r2 offset=0 imm=0 + r4 = r2; + // EBPF_OP_ADD64_IMM pc=81 dst=r4 src=r0 offset=0 imm=8 #line 64 "sample/encap_reflect_packet.c" - *(uint32_t*)(uintptr_t)(r3 + OFFSET(0)) = (uint32_t)r2; - // EBPF_OP_LDXW pc=79 dst=r2 src=r1 offset=4 imm=0 + r4 += IMMEDIATE(8); + // EBPF_OP_LDXDW pc=82 dst=r5 src=r6 offset=8 imm=0 #line 64 "sample/encap_reflect_packet.c" - r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(4)); - // EBPF_OP_STXW pc=80 dst=r3 src=r2 offset=4 imm=0 + r5 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(8)); + // EBPF_OP_JGT_REG pc=83 dst=r4 src=r5 offset=238 imm=0 #line 64 "sample/encap_reflect_packet.c" - *(uint32_t*)(uintptr_t)(r3 + OFFSET(4)) = (uint32_t)r2; - // EBPF_OP_LDXW pc=81 dst=r2 src=r1 offset=8 imm=0 + if (r4 > r5) #line 64 "sample/encap_reflect_packet.c" + goto label_5; + // EBPF_OP_LDXH pc=84 dst=r4 src=r2 offset=2 imm=0 +#line 68 "sample/encap_reflect_packet.c" + r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(2)); + // EBPF_OP_JNE_IMM pc=85 dst=r4 src=r0 offset=4 imm=7459 +#line 68 "sample/encap_reflect_packet.c" + if (r4 != IMMEDIATE(7459)) +#line 68 "sample/encap_reflect_packet.c" + goto label_1; + // EBPF_OP_LDXH pc=86 dst=r4 src=r2 offset=0 imm=0 +#line 40 "sample/./xdp_common.h" + r4 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(0)); + // EBPF_OP_STXH pc=87 dst=r2 src=r4 offset=2 imm=0 +#line 42 "sample/./xdp_common.h" + *(uint16_t*)(uintptr_t)(r2 + OFFSET(2)) = (uint16_t)r4; + // EBPF_OP_MOV64_IMM pc=88 dst=r4 src=r0 offset=0 imm=7459 +#line 42 "sample/./xdp_common.h" + r4 = IMMEDIATE(7459); + // EBPF_OP_STXH pc=89 dst=r2 src=r4 offset=0 imm=0 +#line 41 "sample/./xdp_common.h" + *(uint16_t*)(uintptr_t)(r2 + OFFSET(0)) = (uint16_t)r4; +label_1: + // EBPF_OP_LDXW pc=90 dst=r2 src=r1 offset=16 imm=0 +#line 73 "sample/encap_reflect_packet.c" + r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(16)); + // EBPF_OP_STXW pc=91 dst=r3 src=r2 offset=16 imm=0 +#line 73 "sample/encap_reflect_packet.c" + *(uint32_t*)(uintptr_t)(r3 + OFFSET(16)) = (uint32_t)r2; + // EBPF_OP_LDXW pc=92 dst=r2 src=r1 offset=12 imm=0 +#line 73 "sample/encap_reflect_packet.c" + r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(12)); + // EBPF_OP_STXW pc=93 dst=r3 src=r2 offset=12 imm=0 +#line 73 "sample/encap_reflect_packet.c" + *(uint32_t*)(uintptr_t)(r3 + OFFSET(12)) = (uint32_t)r2; + // EBPF_OP_LDXW pc=94 dst=r2 src=r1 offset=8 imm=0 +#line 73 "sample/encap_reflect_packet.c" r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(8)); - // EBPF_OP_STXW pc=82 dst=r3 src=r2 offset=8 imm=0 -#line 64 "sample/encap_reflect_packet.c" + // EBPF_OP_STXW pc=95 dst=r3 src=r2 offset=8 imm=0 +#line 73 "sample/encap_reflect_packet.c" *(uint32_t*)(uintptr_t)(r3 + OFFSET(8)) = (uint32_t)r2; - // EBPF_OP_LDXW pc=83 dst=r1 src=r1 offset=12 imm=0 -#line 64 "sample/encap_reflect_packet.c" - r1 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(12)); - // EBPF_OP_STXW pc=84 dst=r3 src=r1 offset=12 imm=0 -#line 64 "sample/encap_reflect_packet.c" - *(uint32_t*)(uintptr_t)(r3 + OFFSET(12)) = (uint32_t)r1; - // EBPF_OP_MOV64_IMM pc=85 dst=r1 src=r0 offset=0 imm=4 -#line 64 "sample/encap_reflect_packet.c" + // EBPF_OP_LDXW pc=96 dst=r2 src=r1 offset=4 imm=0 +#line 73 "sample/encap_reflect_packet.c" + r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(4)); + // EBPF_OP_STXW pc=97 dst=r3 src=r2 offset=4 imm=0 +#line 73 "sample/encap_reflect_packet.c" + *(uint32_t*)(uintptr_t)(r3 + OFFSET(4)) = (uint32_t)r2; + // EBPF_OP_LDXW pc=98 dst=r1 src=r1 offset=0 imm=0 +#line 73 "sample/encap_reflect_packet.c" + r1 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(0)); + // EBPF_OP_STXW pc=99 dst=r3 src=r1 offset=0 imm=0 +#line 73 "sample/encap_reflect_packet.c" + *(uint32_t*)(uintptr_t)(r3 + OFFSET(0)) = (uint32_t)r1; + // EBPF_OP_MOV64_IMM pc=100 dst=r1 src=r0 offset=0 imm=4 +#line 73 "sample/encap_reflect_packet.c" r1 = IMMEDIATE(4); - // EBPF_OP_STXB pc=86 dst=r6 src=r1 offset=23 imm=0 -#line 67 "sample/encap_reflect_packet.c" - *(uint8_t*)(uintptr_t)(r6 + OFFSET(23)) = (uint8_t)r1; - // EBPF_OP_LDXB pc=87 dst=r1 src=r6 offset=14 imm=0 -#line 68 "sample/encap_reflect_packet.c" - r1 = *(uint8_t*)(uintptr_t)(r6 + OFFSET(14)); - // EBPF_OP_AND64_IMM pc=88 dst=r1 src=r0 offset=0 imm=240 -#line 68 "sample/encap_reflect_packet.c" + // EBPF_OP_STXB pc=101 dst=r7 src=r1 offset=23 imm=0 +#line 76 "sample/encap_reflect_packet.c" + *(uint8_t*)(uintptr_t)(r7 + OFFSET(23)) = (uint8_t)r1; + // EBPF_OP_LDXB pc=102 dst=r1 src=r7 offset=14 imm=0 +#line 77 "sample/encap_reflect_packet.c" + r1 = *(uint8_t*)(uintptr_t)(r7 + OFFSET(14)); + // EBPF_OP_AND64_IMM pc=103 dst=r1 src=r0 offset=0 imm=240 +#line 77 "sample/encap_reflect_packet.c" r1 &= IMMEDIATE(240); - // EBPF_OP_OR64_IMM pc=89 dst=r1 src=r0 offset=0 imm=5 -#line 68 "sample/encap_reflect_packet.c" + // EBPF_OP_OR64_IMM pc=104 dst=r1 src=r0 offset=0 imm=5 +#line 77 "sample/encap_reflect_packet.c" r1 |= IMMEDIATE(5); - // EBPF_OP_STXB pc=90 dst=r6 src=r1 offset=14 imm=0 -#line 68 "sample/encap_reflect_packet.c" - *(uint8_t*)(uintptr_t)(r6 + OFFSET(14)) = (uint8_t)r1; - // EBPF_OP_LDXH pc=91 dst=r1 src=r6 offset=36 imm=0 -#line 69 "sample/encap_reflect_packet.c" - r1 = *(uint16_t*)(uintptr_t)(r6 + OFFSET(36)); - // EBPF_OP_BE pc=92 dst=r1 src=r0 offset=0 imm=16 -#line 69 "sample/encap_reflect_packet.c" + // EBPF_OP_STXB pc=105 dst=r7 src=r1 offset=14 imm=0 +#line 77 "sample/encap_reflect_packet.c" + *(uint8_t*)(uintptr_t)(r7 + OFFSET(14)) = (uint8_t)r1; + // EBPF_OP_LDXH pc=106 dst=r1 src=r7 offset=36 imm=0 +#line 78 "sample/encap_reflect_packet.c" + r1 = *(uint16_t*)(uintptr_t)(r7 + OFFSET(36)); + // EBPF_OP_BE pc=107 dst=r1 src=r0 offset=0 imm=16 +#line 78 "sample/encap_reflect_packet.c" r1 = htobe16((uint16_t)r1); -#line 69 "sample/encap_reflect_packet.c" +#line 78 "sample/encap_reflect_packet.c" r1 &= UINT32_MAX; - // EBPF_OP_ADD64_IMM pc=93 dst=r1 src=r0 offset=0 imm=20 -#line 69 "sample/encap_reflect_packet.c" + // EBPF_OP_ADD64_IMM pc=108 dst=r1 src=r0 offset=0 imm=20 +#line 78 "sample/encap_reflect_packet.c" r1 += IMMEDIATE(20); - // EBPF_OP_BE pc=94 dst=r1 src=r0 offset=0 imm=16 -#line 69 "sample/encap_reflect_packet.c" + // EBPF_OP_BE pc=109 dst=r1 src=r0 offset=0 imm=16 +#line 78 "sample/encap_reflect_packet.c" r1 = htobe16((uint16_t)r1); -#line 69 "sample/encap_reflect_packet.c" +#line 78 "sample/encap_reflect_packet.c" r1 &= UINT32_MAX; - // EBPF_OP_STXH pc=95 dst=r6 src=r1 offset=16 imm=0 -#line 69 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(16)) = (uint16_t)r1; - // EBPF_OP_MOV64_IMM pc=96 dst=r1 src=r0 offset=0 imm=0 -#line 69 "sample/encap_reflect_packet.c" + // EBPF_OP_STXH pc=110 dst=r7 src=r1 offset=16 imm=0 +#line 78 "sample/encap_reflect_packet.c" + *(uint16_t*)(uintptr_t)(r7 + OFFSET(16)) = (uint16_t)r1; + // EBPF_OP_MOV64_IMM pc=111 dst=r1 src=r0 offset=0 imm=0 +#line 78 "sample/encap_reflect_packet.c" r1 = IMMEDIATE(0); - // EBPF_OP_STXH pc=97 dst=r6 src=r1 offset=24 imm=0 -#line 71 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(24)) = (uint16_t)r1; - // EBPF_OP_MOV64_IMM pc=98 dst=r1 src=r0 offset=0 imm=0 -#line 73 "sample/encap_reflect_packet.c" + // EBPF_OP_STXH pc=112 dst=r7 src=r1 offset=24 imm=0 +#line 80 "sample/encap_reflect_packet.c" + *(uint16_t*)(uintptr_t)(r7 + OFFSET(24)) = (uint16_t)r1; + // EBPF_OP_MOV64_IMM pc=113 dst=r1 src=r0 offset=0 imm=0 +#line 82 "sample/encap_reflect_packet.c" r1 = IMMEDIATE(0); - // EBPF_OP_MOV64_IMM pc=99 dst=r2 src=r0 offset=0 imm=0 -#line 73 "sample/encap_reflect_packet.c" + // EBPF_OP_MOV64_IMM pc=114 dst=r2 src=r0 offset=0 imm=0 +#line 82 "sample/encap_reflect_packet.c" r2 = IMMEDIATE(0); - // EBPF_OP_MOV64_IMM pc=100 dst=r4 src=r0 offset=0 imm=20 -#line 73 "sample/encap_reflect_packet.c" + // EBPF_OP_MOV64_IMM pc=115 dst=r4 src=r0 offset=0 imm=20 +#line 82 "sample/encap_reflect_packet.c" r4 = IMMEDIATE(20); - // EBPF_OP_MOV64_IMM pc=101 dst=r5 src=r0 offset=0 imm=0 -#line 73 "sample/encap_reflect_packet.c" + // EBPF_OP_MOV64_IMM pc=116 dst=r5 src=r0 offset=0 imm=0 +#line 82 "sample/encap_reflect_packet.c" r5 = IMMEDIATE(0); - // EBPF_OP_CALL pc=102 dst=r0 src=r0 offset=0 imm=10 -#line 73 "sample/encap_reflect_packet.c" + // EBPF_OP_CALL pc=117 dst=r0 src=r0 offset=0 imm=10 +#line 82 "sample/encap_reflect_packet.c" r0 = encap_reflect_packet_helpers[1].address -#line 73 "sample/encap_reflect_packet.c" +#line 82 "sample/encap_reflect_packet.c" (r1, r2, r3, r4, r5); -#line 73 "sample/encap_reflect_packet.c" +#line 82 "sample/encap_reflect_packet.c" if ((encap_reflect_packet_helpers[1].tail_call) && (r0 == 0)) -#line 73 "sample/encap_reflect_packet.c" +#line 82 "sample/encap_reflect_packet.c" return 0; - // EBPF_OP_MOV64_REG pc=103 dst=r1 src=r0 offset=0 imm=0 -#line 41 "sample/./xdp_common.h" + // EBPF_OP_MOV64_REG pc=118 dst=r1 src=r0 offset=0 imm=0 +#line 49 "sample/./xdp_common.h" r1 = r0; - // EBPF_OP_AND64_IMM pc=104 dst=r1 src=r0 offset=0 imm=65535 -#line 41 "sample/./xdp_common.h" + // EBPF_OP_AND64_IMM pc=119 dst=r1 src=r0 offset=0 imm=65535 +#line 49 "sample/./xdp_common.h" r1 &= IMMEDIATE(65535); - // EBPF_OP_LSH64_IMM pc=105 dst=r0 src=r0 offset=0 imm=32 -#line 73 "sample/encap_reflect_packet.c" + // EBPF_OP_LSH64_IMM pc=120 dst=r0 src=r0 offset=0 imm=32 +#line 82 "sample/encap_reflect_packet.c" r0 <<= (IMMEDIATE(32) & 63); - // EBPF_OP_ARSH64_IMM pc=106 dst=r0 src=r0 offset=0 imm=48 -#line 41 "sample/./xdp_common.h" + // EBPF_OP_ARSH64_IMM pc=121 dst=r0 src=r0 offset=0 imm=48 +#line 49 "sample/./xdp_common.h" r0 = (int64_t)r0 >> (uint32_t)(IMMEDIATE(48) & 63); - // EBPF_OP_ADD64_REG pc=107 dst=r0 src=r1 offset=0 imm=0 -#line 41 "sample/./xdp_common.h" + // EBPF_OP_ADD64_REG pc=122 dst=r0 src=r1 offset=0 imm=0 +#line 49 "sample/./xdp_common.h" r0 += r1; - // EBPF_OP_MOV64_REG pc=108 dst=r1 src=r0 offset=0 imm=0 -#line 42 "sample/./xdp_common.h" + // EBPF_OP_MOV64_REG pc=123 dst=r1 src=r0 offset=0 imm=0 +#line 50 "sample/./xdp_common.h" r1 = r0; - // EBPF_OP_RSH64_IMM pc=109 dst=r1 src=r0 offset=0 imm=16 -#line 42 "sample/./xdp_common.h" + // EBPF_OP_RSH64_IMM pc=124 dst=r1 src=r0 offset=0 imm=16 +#line 50 "sample/./xdp_common.h" r1 >>= (IMMEDIATE(16) & 63); - // EBPF_OP_ADD64_REG pc=110 dst=r1 src=r0 offset=0 imm=0 -#line 42 "sample/./xdp_common.h" + // EBPF_OP_ADD64_REG pc=125 dst=r1 src=r0 offset=0 imm=0 +#line 50 "sample/./xdp_common.h" r1 += r0; - // EBPF_OP_XOR64_IMM pc=111 dst=r1 src=r0 offset=0 imm=-1 -#line 73 "sample/encap_reflect_packet.c" + // EBPF_OP_XOR64_IMM pc=126 dst=r1 src=r0 offset=0 imm=-1 +#line 82 "sample/encap_reflect_packet.c" r1 ^= IMMEDIATE(-1); - // EBPF_OP_STXH pc=112 dst=r6 src=r1 offset=24 imm=0 -#line 72 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r6 + OFFSET(24)) = (uint16_t)r1; - // EBPF_OP_JA pc=113 dst=r0 src=r0 offset=182 imm=0 -#line 72 "sample/encap_reflect_packet.c" - goto label_2; -label_1: - // EBPF_OP_MOV64_REG pc=114 dst=r3 src=r2 offset=0 imm=0 -#line 178 "sample/encap_reflect_packet.c" + // EBPF_OP_STXH pc=127 dst=r7 src=r1 offset=24 imm=0 +#line 81 "sample/encap_reflect_packet.c" + *(uint16_t*)(uintptr_t)(r7 + OFFSET(24)) = (uint16_t)r1; + // EBPF_OP_JA pc=128 dst=r0 src=r0 offset=192 imm=0 +#line 81 "sample/encap_reflect_packet.c" + goto label_4; +label_2: + // EBPF_OP_MOV64_REG pc=129 dst=r3 src=r2 offset=0 imm=0 +#line 196 "sample/encap_reflect_packet.c" r3 = r2; - // EBPF_OP_ADD64_IMM pc=115 dst=r3 src=r0 offset=0 imm=54 -#line 178 "sample/encap_reflect_packet.c" + // EBPF_OP_ADD64_IMM pc=130 dst=r3 src=r0 offset=0 imm=54 +#line 196 "sample/encap_reflect_packet.c" r3 += IMMEDIATE(54); - // EBPF_OP_JGT_REG pc=116 dst=r3 src=r1 offset=180 imm=0 -#line 178 "sample/encap_reflect_packet.c" + // EBPF_OP_JGT_REG pc=131 dst=r3 src=r1 offset=190 imm=0 +#line 196 "sample/encap_reflect_packet.c" if (r3 > r1) -#line 178 "sample/encap_reflect_packet.c" - goto label_3; - // EBPF_OP_MOV64_REG pc=117 dst=r3 src=r2 offset=0 imm=0 -#line 178 "sample/encap_reflect_packet.c" +#line 196 "sample/encap_reflect_packet.c" + goto label_5; + // EBPF_OP_MOV64_REG pc=132 dst=r3 src=r2 offset=0 imm=0 +#line 196 "sample/encap_reflect_packet.c" r3 = r2; - // EBPF_OP_ADD64_IMM pc=118 dst=r3 src=r0 offset=0 imm=62 -#line 178 "sample/encap_reflect_packet.c" + // EBPF_OP_ADD64_IMM pc=133 dst=r3 src=r0 offset=0 imm=62 +#line 196 "sample/encap_reflect_packet.c" r3 += IMMEDIATE(62); - // EBPF_OP_JGT_REG pc=119 dst=r3 src=r1 offset=177 imm=0 -#line 184 "sample/encap_reflect_packet.c" + // EBPF_OP_JGT_REG pc=134 dst=r3 src=r1 offset=187 imm=0 +#line 202 "sample/encap_reflect_packet.c" if (r3 > r1) -#line 184 "sample/encap_reflect_packet.c" - goto label_3; - // EBPF_OP_LDXB pc=120 dst=r1 src=r2 offset=20 imm=0 -#line 184 "sample/encap_reflect_packet.c" +#line 202 "sample/encap_reflect_packet.c" + goto label_5; + // EBPF_OP_LDXB pc=135 dst=r1 src=r2 offset=20 imm=0 +#line 202 "sample/encap_reflect_packet.c" r1 = *(uint8_t*)(uintptr_t)(r2 + OFFSET(20)); - // EBPF_OP_JNE_IMM pc=121 dst=r1 src=r0 offset=175 imm=17 -#line 184 "sample/encap_reflect_packet.c" + // EBPF_OP_JNE_IMM pc=136 dst=r1 src=r0 offset=185 imm=17 +#line 202 "sample/encap_reflect_packet.c" if (r1 != IMMEDIATE(17)) -#line 184 "sample/encap_reflect_packet.c" - goto label_3; - // EBPF_OP_LDXH pc=122 dst=r1 src=r2 offset=56 imm=0 -#line 190 "sample/encap_reflect_packet.c" +#line 202 "sample/encap_reflect_packet.c" + goto label_5; + // EBPF_OP_LDXH pc=137 dst=r1 src=r2 offset=56 imm=0 +#line 208 "sample/encap_reflect_packet.c" r1 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(56)); - // EBPF_OP_JNE_IMM pc=123 dst=r1 src=r0 offset=173 imm=7459 -#line 190 "sample/encap_reflect_packet.c" + // EBPF_OP_JNE_IMM pc=138 dst=r1 src=r0 offset=183 imm=7459 +#line 208 "sample/encap_reflect_packet.c" if (r1 != IMMEDIATE(7459)) -#line 190 "sample/encap_reflect_packet.c" - goto label_3; - // EBPF_OP_MOV64_REG pc=124 dst=r1 src=r6 offset=0 imm=0 -#line 87 "sample/encap_reflect_packet.c" +#line 208 "sample/encap_reflect_packet.c" + goto label_5; + // EBPF_OP_MOV64_REG pc=139 dst=r1 src=r6 offset=0 imm=0 +#line 96 "sample/encap_reflect_packet.c" r1 = r6; - // EBPF_OP_LDDW pc=125 dst=r2 src=r0 offset=0 imm=-40 -#line 87 "sample/encap_reflect_packet.c" + // EBPF_OP_LDDW pc=140 dst=r2 src=r0 offset=0 imm=-40 +#line 96 "sample/encap_reflect_packet.c" r2 = (uint64_t)4294967256; - // EBPF_OP_CALL pc=127 dst=r0 src=r0 offset=0 imm=65536 -#line 87 "sample/encap_reflect_packet.c" + // EBPF_OP_CALL pc=142 dst=r0 src=r0 offset=0 imm=65536 +#line 96 "sample/encap_reflect_packet.c" r0 = encap_reflect_packet_helpers[0].address -#line 87 "sample/encap_reflect_packet.c" +#line 96 "sample/encap_reflect_packet.c" (r1, r2, r3, r4, r5); -#line 87 "sample/encap_reflect_packet.c" +#line 96 "sample/encap_reflect_packet.c" if ((encap_reflect_packet_helpers[0].tail_call) && (r0 == 0)) -#line 87 "sample/encap_reflect_packet.c" +#line 96 "sample/encap_reflect_packet.c" return 0; - // EBPF_OP_MOV64_REG pc=128 dst=r1 src=r0 offset=0 imm=0 -#line 87 "sample/encap_reflect_packet.c" + // EBPF_OP_MOV64_REG pc=143 dst=r1 src=r0 offset=0 imm=0 +#line 96 "sample/encap_reflect_packet.c" r1 = r0; - // EBPF_OP_MOV64_IMM pc=129 dst=r0 src=r0 offset=0 imm=2 -#line 87 "sample/encap_reflect_packet.c" + // EBPF_OP_MOV64_IMM pc=144 dst=r0 src=r0 offset=0 imm=2 +#line 96 "sample/encap_reflect_packet.c" r0 = IMMEDIATE(2); - // EBPF_OP_LSH64_IMM pc=130 dst=r1 src=r0 offset=0 imm=32 -#line 87 "sample/encap_reflect_packet.c" + // EBPF_OP_LSH64_IMM pc=145 dst=r1 src=r0 offset=0 imm=32 +#line 96 "sample/encap_reflect_packet.c" r1 <<= (IMMEDIATE(32) & 63); - // EBPF_OP_ARSH64_IMM pc=131 dst=r1 src=r0 offset=0 imm=32 -#line 87 "sample/encap_reflect_packet.c" + // EBPF_OP_ARSH64_IMM pc=146 dst=r1 src=r0 offset=0 imm=32 +#line 96 "sample/encap_reflect_packet.c" r1 = (int64_t)r1 >> (uint32_t)(IMMEDIATE(32) & 63); - // EBPF_OP_MOV64_IMM pc=132 dst=r2 src=r0 offset=0 imm=0 -#line 87 "sample/encap_reflect_packet.c" + // EBPF_OP_MOV64_IMM pc=147 dst=r2 src=r0 offset=0 imm=0 +#line 96 "sample/encap_reflect_packet.c" r2 = IMMEDIATE(0); - // EBPF_OP_JSGT_REG pc=133 dst=r2 src=r1 offset=163 imm=0 -#line 87 "sample/encap_reflect_packet.c" + // EBPF_OP_JSGT_REG pc=148 dst=r2 src=r1 offset=173 imm=0 +#line 96 "sample/encap_reflect_packet.c" if ((int64_t)r2 > (int64_t)r1) -#line 87 "sample/encap_reflect_packet.c" - goto label_3; - // EBPF_OP_LDXDW pc=134 dst=r5 src=r6 offset=8 imm=0 -#line 93 "sample/encap_reflect_packet.c" +#line 96 "sample/encap_reflect_packet.c" + goto label_5; + // EBPF_OP_LDXDW pc=149 dst=r5 src=r6 offset=8 imm=0 +#line 102 "sample/encap_reflect_packet.c" r5 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(8)); - // EBPF_OP_LDXDW pc=135 dst=r1 src=r6 offset=0 imm=0 -#line 92 "sample/encap_reflect_packet.c" + // EBPF_OP_LDXDW pc=150 dst=r1 src=r6 offset=0 imm=0 +#line 101 "sample/encap_reflect_packet.c" r1 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(0)); - // EBPF_OP_MOV64_REG pc=136 dst=r2 src=r1 offset=0 imm=0 -#line 93 "sample/encap_reflect_packet.c" + // EBPF_OP_MOV64_REG pc=151 dst=r2 src=r1 offset=0 imm=0 +#line 102 "sample/encap_reflect_packet.c" r2 = r1; - // EBPF_OP_ADD64_IMM pc=137 dst=r2 src=r0 offset=0 imm=14 -#line 93 "sample/encap_reflect_packet.c" + // EBPF_OP_ADD64_IMM pc=152 dst=r2 src=r0 offset=0 imm=14 +#line 102 "sample/encap_reflect_packet.c" r2 += IMMEDIATE(14); - // EBPF_OP_JGT_REG pc=138 dst=r2 src=r5 offset=158 imm=0 -#line 93 "sample/encap_reflect_packet.c" + // EBPF_OP_JGT_REG pc=153 dst=r2 src=r5 offset=168 imm=0 +#line 102 "sample/encap_reflect_packet.c" if (r2 > r5) -#line 93 "sample/encap_reflect_packet.c" - goto label_3; - // EBPF_OP_MOV64_REG pc=139 dst=r4 src=r1 offset=0 imm=0 -#line 100 "sample/encap_reflect_packet.c" +#line 102 "sample/encap_reflect_packet.c" + goto label_5; + // EBPF_OP_MOV64_REG pc=154 dst=r4 src=r1 offset=0 imm=0 +#line 109 "sample/encap_reflect_packet.c" r4 = r1; - // EBPF_OP_ADD64_IMM pc=140 dst=r4 src=r0 offset=0 imm=40 -#line 100 "sample/encap_reflect_packet.c" + // EBPF_OP_ADD64_IMM pc=155 dst=r4 src=r0 offset=0 imm=40 +#line 109 "sample/encap_reflect_packet.c" r4 += IMMEDIATE(40); - // EBPF_OP_JGT_REG pc=141 dst=r4 src=r5 offset=155 imm=0 -#line 100 "sample/encap_reflect_packet.c" + // EBPF_OP_JGT_REG pc=156 dst=r4 src=r5 offset=165 imm=0 +#line 109 "sample/encap_reflect_packet.c" if (r4 > r5) -#line 100 "sample/encap_reflect_packet.c" - goto label_3; - // EBPF_OP_MOV64_REG pc=142 dst=r3 src=r1 offset=0 imm=0 -#line 108 "sample/encap_reflect_packet.c" +#line 109 "sample/encap_reflect_packet.c" + goto label_5; + // EBPF_OP_MOV64_REG pc=157 dst=r3 src=r1 offset=0 imm=0 +#line 117 "sample/encap_reflect_packet.c" r3 = r1; - // EBPF_OP_ADD64_IMM pc=143 dst=r3 src=r0 offset=0 imm=54 -#line 108 "sample/encap_reflect_packet.c" + // EBPF_OP_ADD64_IMM pc=158 dst=r3 src=r0 offset=0 imm=54 +#line 117 "sample/encap_reflect_packet.c" r3 += IMMEDIATE(54); - // EBPF_OP_JGT_REG pc=144 dst=r3 src=r5 offset=152 imm=0 -#line 108 "sample/encap_reflect_packet.c" + // EBPF_OP_JGT_REG pc=159 dst=r3 src=r5 offset=162 imm=0 +#line 117 "sample/encap_reflect_packet.c" if (r3 > r5) -#line 108 "sample/encap_reflect_packet.c" - goto label_3; - // EBPF_OP_MOV64_REG pc=145 dst=r6 src=r1 offset=0 imm=0 -#line 108 "sample/encap_reflect_packet.c" - r6 = r1; - // EBPF_OP_ADD64_IMM pc=146 dst=r6 src=r0 offset=0 imm=94 -#line 108 "sample/encap_reflect_packet.c" - r6 += IMMEDIATE(94); - // EBPF_OP_JGT_REG pc=147 dst=r6 src=r5 offset=149 imm=0 -#line 108 "sample/encap_reflect_packet.c" - if (r6 > r5) -#line 108 "sample/encap_reflect_packet.c" - goto label_3; - // EBPF_OP_LDXH pc=148 dst=r5 src=r4 offset=4 imm=0 -#line 121 "sample/encap_reflect_packet.c" +#line 117 "sample/encap_reflect_packet.c" + goto label_5; + // EBPF_OP_MOV64_REG pc=160 dst=r7 src=r1 offset=0 imm=0 +#line 124 "sample/encap_reflect_packet.c" + r7 = r1; + // EBPF_OP_ADD64_IMM pc=161 dst=r7 src=r0 offset=0 imm=94 +#line 124 "sample/encap_reflect_packet.c" + r7 += IMMEDIATE(94); + // EBPF_OP_JGT_REG pc=162 dst=r7 src=r5 offset=159 imm=0 +#line 124 "sample/encap_reflect_packet.c" + if (r7 > r5) +#line 124 "sample/encap_reflect_packet.c" + goto label_5; + // EBPF_OP_LDXH pc=163 dst=r5 src=r4 offset=4 imm=0 +#line 130 "sample/encap_reflect_packet.c" r5 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(4)); - // EBPF_OP_STXH pc=149 dst=r1 src=r5 offset=4 imm=0 -#line 121 "sample/encap_reflect_packet.c" + // EBPF_OP_STXH pc=164 dst=r1 src=r5 offset=4 imm=0 +#line 130 "sample/encap_reflect_packet.c" *(uint16_t*)(uintptr_t)(r1 + OFFSET(4)) = (uint16_t)r5; - // EBPF_OP_LDXH pc=150 dst=r5 src=r4 offset=0 imm=0 -#line 121 "sample/encap_reflect_packet.c" + // EBPF_OP_LDXH pc=165 dst=r5 src=r4 offset=0 imm=0 +#line 130 "sample/encap_reflect_packet.c" r5 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(0)); - // EBPF_OP_STXH pc=151 dst=r1 src=r5 offset=0 imm=0 -#line 121 "sample/encap_reflect_packet.c" + // EBPF_OP_STXH pc=166 dst=r1 src=r5 offset=0 imm=0 +#line 130 "sample/encap_reflect_packet.c" *(uint16_t*)(uintptr_t)(r1 + OFFSET(0)) = (uint16_t)r5; - // EBPF_OP_LDXH pc=152 dst=r5 src=r4 offset=2 imm=0 -#line 121 "sample/encap_reflect_packet.c" + // EBPF_OP_LDXH pc=167 dst=r5 src=r4 offset=2 imm=0 +#line 130 "sample/encap_reflect_packet.c" r5 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(2)); - // EBPF_OP_STXH pc=153 dst=r1 src=r5 offset=2 imm=0 -#line 121 "sample/encap_reflect_packet.c" + // EBPF_OP_STXH pc=168 dst=r1 src=r5 offset=2 imm=0 +#line 130 "sample/encap_reflect_packet.c" *(uint16_t*)(uintptr_t)(r1 + OFFSET(2)) = (uint16_t)r5; - // EBPF_OP_LDXH pc=154 dst=r5 src=r4 offset=12 imm=0 -#line 121 "sample/encap_reflect_packet.c" + // EBPF_OP_LDXH pc=169 dst=r5 src=r4 offset=12 imm=0 +#line 130 "sample/encap_reflect_packet.c" r5 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(12)); - // EBPF_OP_STXH pc=155 dst=r1 src=r5 offset=12 imm=0 -#line 121 "sample/encap_reflect_packet.c" + // EBPF_OP_STXH pc=170 dst=r1 src=r5 offset=12 imm=0 +#line 130 "sample/encap_reflect_packet.c" *(uint16_t*)(uintptr_t)(r1 + OFFSET(12)) = (uint16_t)r5; - // EBPF_OP_LDXH pc=156 dst=r5 src=r4 offset=10 imm=0 -#line 121 "sample/encap_reflect_packet.c" + // EBPF_OP_LDXH pc=171 dst=r5 src=r4 offset=10 imm=0 +#line 130 "sample/encap_reflect_packet.c" r5 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(10)); - // EBPF_OP_STXH pc=157 dst=r1 src=r5 offset=10 imm=0 -#line 121 "sample/encap_reflect_packet.c" + // EBPF_OP_STXH pc=172 dst=r1 src=r5 offset=10 imm=0 +#line 130 "sample/encap_reflect_packet.c" *(uint16_t*)(uintptr_t)(r1 + OFFSET(10)) = (uint16_t)r5; - // EBPF_OP_LDXH pc=158 dst=r0 src=r4 offset=8 imm=0 -#line 121 "sample/encap_reflect_packet.c" - r0 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(8)); - // EBPF_OP_LDXH pc=159 dst=r6 src=r4 offset=6 imm=0 -#line 121 "sample/encap_reflect_packet.c" - r6 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(6)); - // EBPF_OP_STXH pc=160 dst=r1 src=r5 offset=4 imm=0 + // EBPF_OP_LDXH pc=173 dst=r7 src=r4 offset=8 imm=0 +#line 130 "sample/encap_reflect_packet.c" + r7 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(8)); + // EBPF_OP_LDXH pc=174 dst=r8 src=r4 offset=6 imm=0 +#line 130 "sample/encap_reflect_packet.c" + r8 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(6)); + // EBPF_OP_STXH pc=175 dst=r1 src=r5 offset=4 imm=0 #line 16 "sample/./xdp_common.h" *(uint16_t*)(uintptr_t)(r1 + OFFSET(4)) = (uint16_t)r5; - // EBPF_OP_STXH pc=161 dst=r1 src=r6 offset=6 imm=0 -#line 121 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r1 + OFFSET(6)) = (uint16_t)r6; - // EBPF_OP_STXH pc=162 dst=r1 src=r6 offset=0 imm=0 + // EBPF_OP_STXH pc=176 dst=r1 src=r8 offset=6 imm=0 +#line 130 "sample/encap_reflect_packet.c" + *(uint16_t*)(uintptr_t)(r1 + OFFSET(6)) = (uint16_t)r8; + // EBPF_OP_STXH pc=177 dst=r1 src=r8 offset=0 imm=0 #line 16 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r1 + OFFSET(0)) = (uint16_t)r6; - // EBPF_OP_STXH pc=163 dst=r1 src=r0 offset=8 imm=0 -#line 121 "sample/encap_reflect_packet.c" - *(uint16_t*)(uintptr_t)(r1 + OFFSET(8)) = (uint16_t)r0; - // EBPF_OP_STXH pc=164 dst=r1 src=r0 offset=2 imm=0 + *(uint16_t*)(uintptr_t)(r1 + OFFSET(0)) = (uint16_t)r8; + // EBPF_OP_STXH pc=178 dst=r1 src=r7 offset=8 imm=0 +#line 130 "sample/encap_reflect_packet.c" + *(uint16_t*)(uintptr_t)(r1 + OFFSET(8)) = (uint16_t)r7; + // EBPF_OP_STXH pc=179 dst=r1 src=r7 offset=2 imm=0 #line 16 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r1 + OFFSET(2)) = (uint16_t)r0; - // EBPF_OP_LDXH pc=165 dst=r5 src=r4 offset=4 imm=0 + *(uint16_t*)(uintptr_t)(r1 + OFFSET(2)) = (uint16_t)r7; + // EBPF_OP_LDXH pc=180 dst=r5 src=r4 offset=4 imm=0 #line 17 "sample/./xdp_common.h" r5 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(4)); - // EBPF_OP_STXH pc=166 dst=r1 src=r5 offset=10 imm=0 + // EBPF_OP_STXH pc=181 dst=r1 src=r5 offset=10 imm=0 #line 17 "sample/./xdp_common.h" *(uint16_t*)(uintptr_t)(r1 + OFFSET(10)) = (uint16_t)r5; - // EBPF_OP_LDXH pc=167 dst=r5 src=r4 offset=0 imm=0 + // EBPF_OP_LDXH pc=182 dst=r5 src=r4 offset=0 imm=0 #line 17 "sample/./xdp_common.h" r5 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(0)); - // EBPF_OP_STXH pc=168 dst=r1 src=r5 offset=6 imm=0 + // EBPF_OP_STXH pc=183 dst=r1 src=r5 offset=6 imm=0 #line 17 "sample/./xdp_common.h" *(uint16_t*)(uintptr_t)(r1 + OFFSET(6)) = (uint16_t)r5; - // EBPF_OP_LDXH pc=169 dst=r4 src=r4 offset=2 imm=0 + // EBPF_OP_LDXH pc=184 dst=r4 src=r4 offset=2 imm=0 #line 17 "sample/./xdp_common.h" r4 = *(uint16_t*)(uintptr_t)(r4 + OFFSET(2)); - // EBPF_OP_STXH pc=170 dst=r1 src=r4 offset=8 imm=0 + // EBPF_OP_STXH pc=185 dst=r1 src=r4 offset=8 imm=0 #line 17 "sample/./xdp_common.h" *(uint16_t*)(uintptr_t)(r1 + OFFSET(8)) = (uint16_t)r4; - // EBPF_OP_LDXB pc=171 dst=r5 src=r1 offset=87 imm=0 + // EBPF_OP_LDXB pc=186 dst=r5 src=r1 offset=87 imm=0 #line 32 "sample/./xdp_common.h" r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(87)); - // EBPF_OP_LSH64_IMM pc=172 dst=r5 src=r0 offset=0 imm=8 + // EBPF_OP_LSH64_IMM pc=187 dst=r5 src=r0 offset=0 imm=8 #line 32 "sample/./xdp_common.h" r5 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=173 dst=r4 src=r1 offset=86 imm=0 + // EBPF_OP_LDXB pc=188 dst=r4 src=r1 offset=86 imm=0 #line 32 "sample/./xdp_common.h" r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(86)); - // EBPF_OP_OR64_REG pc=174 dst=r5 src=r4 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=189 dst=r5 src=r4 offset=0 imm=0 #line 32 "sample/./xdp_common.h" r5 |= r4; - // EBPF_OP_LDXB pc=175 dst=r4 src=r1 offset=89 imm=0 + // EBPF_OP_LDXB pc=190 dst=r4 src=r1 offset=89 imm=0 #line 32 "sample/./xdp_common.h" r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(89)); - // EBPF_OP_LSH64_IMM pc=176 dst=r4 src=r0 offset=0 imm=8 + // EBPF_OP_LSH64_IMM pc=191 dst=r4 src=r0 offset=0 imm=8 #line 32 "sample/./xdp_common.h" r4 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=177 dst=r0 src=r1 offset=88 imm=0 + // EBPF_OP_LDXB pc=192 dst=r7 src=r1 offset=88 imm=0 #line 32 "sample/./xdp_common.h" - r0 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(88)); - // EBPF_OP_OR64_REG pc=178 dst=r4 src=r0 offset=0 imm=0 + r7 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(88)); + // EBPF_OP_OR64_REG pc=193 dst=r4 src=r7 offset=0 imm=0 #line 32 "sample/./xdp_common.h" - r4 |= r0; - // EBPF_OP_LSH64_IMM pc=179 dst=r4 src=r0 offset=0 imm=16 + r4 |= r7; + // EBPF_OP_LSH64_IMM pc=194 dst=r4 src=r0 offset=0 imm=16 #line 32 "sample/./xdp_common.h" r4 <<= (IMMEDIATE(16) & 63); - // EBPF_OP_OR64_REG pc=180 dst=r4 src=r5 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=195 dst=r4 src=r5 offset=0 imm=0 #line 32 "sample/./xdp_common.h" r4 |= r5; - // EBPF_OP_LDXB pc=181 dst=r0 src=r1 offset=91 imm=0 + // EBPF_OP_LDXB pc=196 dst=r7 src=r1 offset=91 imm=0 #line 32 "sample/./xdp_common.h" - r0 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(91)); - // EBPF_OP_LSH64_IMM pc=182 dst=r0 src=r0 offset=0 imm=8 + r7 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(91)); + // EBPF_OP_LSH64_IMM pc=197 dst=r7 src=r0 offset=0 imm=8 #line 32 "sample/./xdp_common.h" - r0 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=183 dst=r5 src=r1 offset=90 imm=0 + r7 <<= (IMMEDIATE(8) & 63); + // EBPF_OP_LDXB pc=198 dst=r5 src=r1 offset=90 imm=0 #line 32 "sample/./xdp_common.h" r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(90)); - // EBPF_OP_OR64_REG pc=184 dst=r0 src=r5 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=199 dst=r7 src=r5 offset=0 imm=0 #line 32 "sample/./xdp_common.h" - r0 |= r5; - // EBPF_OP_LDXB pc=185 dst=r5 src=r1 offset=93 imm=0 + r7 |= r5; + // EBPF_OP_LDXB pc=200 dst=r5 src=r1 offset=93 imm=0 #line 32 "sample/./xdp_common.h" r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(93)); - // EBPF_OP_LSH64_IMM pc=186 dst=r5 src=r0 offset=0 imm=8 + // EBPF_OP_LSH64_IMM pc=201 dst=r5 src=r0 offset=0 imm=8 #line 32 "sample/./xdp_common.h" r5 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=187 dst=r6 src=r1 offset=92 imm=0 + // EBPF_OP_LDXB pc=202 dst=r8 src=r1 offset=92 imm=0 #line 32 "sample/./xdp_common.h" - r6 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(92)); - // EBPF_OP_OR64_REG pc=188 dst=r5 src=r6 offset=0 imm=0 + r8 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(92)); + // EBPF_OP_OR64_REG pc=203 dst=r5 src=r8 offset=0 imm=0 #line 32 "sample/./xdp_common.h" - r5 |= r6; - // EBPF_OP_LSH64_IMM pc=189 dst=r5 src=r0 offset=0 imm=16 + r5 |= r8; + // EBPF_OP_LSH64_IMM pc=204 dst=r5 src=r0 offset=0 imm=16 #line 32 "sample/./xdp_common.h" r5 <<= (IMMEDIATE(16) & 63); - // EBPF_OP_OR64_REG pc=190 dst=r5 src=r0 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=205 dst=r5 src=r7 offset=0 imm=0 #line 32 "sample/./xdp_common.h" - r5 |= r0; - // EBPF_OP_LSH64_IMM pc=191 dst=r5 src=r0 offset=0 imm=32 + r5 |= r7; + // EBPF_OP_LSH64_IMM pc=206 dst=r5 src=r0 offset=0 imm=32 #line 32 "sample/./xdp_common.h" r5 <<= (IMMEDIATE(32) & 63); - // EBPF_OP_OR64_REG pc=192 dst=r5 src=r4 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=207 dst=r5 src=r4 offset=0 imm=0 #line 32 "sample/./xdp_common.h" r5 |= r4; - // EBPF_OP_LDXB pc=193 dst=r0 src=r1 offset=79 imm=0 + // EBPF_OP_LDXB pc=208 dst=r7 src=r1 offset=79 imm=0 #line 32 "sample/./xdp_common.h" - r0 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(79)); - // EBPF_OP_LSH64_IMM pc=194 dst=r0 src=r0 offset=0 imm=8 + r7 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(79)); + // EBPF_OP_LSH64_IMM pc=209 dst=r7 src=r0 offset=0 imm=8 #line 32 "sample/./xdp_common.h" - r0 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=195 dst=r4 src=r1 offset=78 imm=0 + r7 <<= (IMMEDIATE(8) & 63); + // EBPF_OP_LDXB pc=210 dst=r4 src=r1 offset=78 imm=0 #line 32 "sample/./xdp_common.h" r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(78)); - // EBPF_OP_OR64_REG pc=196 dst=r0 src=r4 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=211 dst=r7 src=r4 offset=0 imm=0 #line 32 "sample/./xdp_common.h" - r0 |= r4; - // EBPF_OP_LDXB pc=197 dst=r4 src=r1 offset=81 imm=0 + r7 |= r4; + // EBPF_OP_LDXB pc=212 dst=r4 src=r1 offset=81 imm=0 #line 32 "sample/./xdp_common.h" r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(81)); - // EBPF_OP_LSH64_IMM pc=198 dst=r4 src=r0 offset=0 imm=8 + // EBPF_OP_LSH64_IMM pc=213 dst=r4 src=r0 offset=0 imm=8 #line 32 "sample/./xdp_common.h" r4 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=199 dst=r6 src=r1 offset=80 imm=0 + // EBPF_OP_LDXB pc=214 dst=r8 src=r1 offset=80 imm=0 #line 32 "sample/./xdp_common.h" - r6 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(80)); - // EBPF_OP_OR64_REG pc=200 dst=r4 src=r6 offset=0 imm=0 + r8 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(80)); + // EBPF_OP_OR64_REG pc=215 dst=r4 src=r8 offset=0 imm=0 #line 32 "sample/./xdp_common.h" - r4 |= r6; - // EBPF_OP_STXDW pc=201 dst=r10 src=r5 offset=-8 imm=0 + r4 |= r8; + // EBPF_OP_STXDW pc=216 dst=r10 src=r5 offset=-8 imm=0 #line 32 "sample/./xdp_common.h" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-8)) = (uint64_t)r5; - // EBPF_OP_LSH64_IMM pc=202 dst=r4 src=r0 offset=0 imm=16 + // EBPF_OP_LSH64_IMM pc=217 dst=r4 src=r0 offset=0 imm=16 #line 32 "sample/./xdp_common.h" r4 <<= (IMMEDIATE(16) & 63); - // EBPF_OP_OR64_REG pc=203 dst=r4 src=r0 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=218 dst=r4 src=r7 offset=0 imm=0 #line 32 "sample/./xdp_common.h" - r4 |= r0; - // EBPF_OP_LDXB pc=204 dst=r5 src=r1 offset=83 imm=0 + r4 |= r7; + // EBPF_OP_LDXB pc=219 dst=r5 src=r1 offset=83 imm=0 #line 32 "sample/./xdp_common.h" r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(83)); - // EBPF_OP_LSH64_IMM pc=205 dst=r5 src=r0 offset=0 imm=8 + // EBPF_OP_LSH64_IMM pc=220 dst=r5 src=r0 offset=0 imm=8 #line 32 "sample/./xdp_common.h" r5 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=206 dst=r0 src=r1 offset=82 imm=0 + // EBPF_OP_LDXB pc=221 dst=r7 src=r1 offset=82 imm=0 #line 32 "sample/./xdp_common.h" - r0 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(82)); - // EBPF_OP_OR64_REG pc=207 dst=r5 src=r0 offset=0 imm=0 + r7 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(82)); + // EBPF_OP_OR64_REG pc=222 dst=r5 src=r7 offset=0 imm=0 #line 32 "sample/./xdp_common.h" - r5 |= r0; - // EBPF_OP_LDXB pc=208 dst=r0 src=r1 offset=85 imm=0 + r5 |= r7; + // EBPF_OP_LDXB pc=223 dst=r7 src=r1 offset=85 imm=0 #line 32 "sample/./xdp_common.h" - r0 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(85)); - // EBPF_OP_LSH64_IMM pc=209 dst=r0 src=r0 offset=0 imm=8 + r7 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(85)); + // EBPF_OP_LSH64_IMM pc=224 dst=r7 src=r0 offset=0 imm=8 #line 32 "sample/./xdp_common.h" - r0 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=210 dst=r6 src=r1 offset=84 imm=0 + r7 <<= (IMMEDIATE(8) & 63); + // EBPF_OP_LDXB pc=225 dst=r8 src=r1 offset=84 imm=0 #line 32 "sample/./xdp_common.h" - r6 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(84)); - // EBPF_OP_OR64_REG pc=211 dst=r0 src=r6 offset=0 imm=0 + r8 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(84)); + // EBPF_OP_OR64_REG pc=226 dst=r7 src=r8 offset=0 imm=0 #line 32 "sample/./xdp_common.h" - r0 |= r6; - // EBPF_OP_LSH64_IMM pc=212 dst=r0 src=r0 offset=0 imm=16 + r7 |= r8; + // EBPF_OP_LSH64_IMM pc=227 dst=r7 src=r0 offset=0 imm=16 #line 32 "sample/./xdp_common.h" - r0 <<= (IMMEDIATE(16) & 63); - // EBPF_OP_OR64_REG pc=213 dst=r0 src=r5 offset=0 imm=0 + r7 <<= (IMMEDIATE(16) & 63); + // EBPF_OP_OR64_REG pc=228 dst=r7 src=r5 offset=0 imm=0 #line 32 "sample/./xdp_common.h" - r0 |= r5; - // EBPF_OP_LSH64_IMM pc=214 dst=r0 src=r0 offset=0 imm=32 + r7 |= r5; + // EBPF_OP_LSH64_IMM pc=229 dst=r7 src=r0 offset=0 imm=32 #line 32 "sample/./xdp_common.h" - r0 <<= (IMMEDIATE(32) & 63); - // EBPF_OP_OR64_REG pc=215 dst=r0 src=r4 offset=0 imm=0 + r7 <<= (IMMEDIATE(32) & 63); + // EBPF_OP_OR64_REG pc=230 dst=r7 src=r4 offset=0 imm=0 #line 32 "sample/./xdp_common.h" - r0 |= r4; - // EBPF_OP_STXDW pc=216 dst=r10 src=r0 offset=-16 imm=0 + r7 |= r4; + // EBPF_OP_STXDW pc=231 dst=r10 src=r7 offset=-16 imm=0 #line 32 "sample/./xdp_common.h" - *(uint64_t*)(uintptr_t)(r10 + OFFSET(-16)) = (uint64_t)r0; - // EBPF_OP_LDXW pc=217 dst=r4 src=r1 offset=62 imm=0 + *(uint64_t*)(uintptr_t)(r10 + OFFSET(-16)) = (uint64_t)r7; + // EBPF_OP_LDXW pc=232 dst=r4 src=r1 offset=62 imm=0 #line 33 "sample/./xdp_common.h" r4 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(62)); - // EBPF_OP_STXW pc=218 dst=r1 src=r4 offset=78 imm=0 + // EBPF_OP_STXW pc=233 dst=r1 src=r4 offset=78 imm=0 #line 33 "sample/./xdp_common.h" *(uint32_t*)(uintptr_t)(r1 + OFFSET(78)) = (uint32_t)r4; - // EBPF_OP_LDXW pc=219 dst=r4 src=r1 offset=66 imm=0 + // EBPF_OP_LDXW pc=234 dst=r4 src=r1 offset=66 imm=0 #line 33 "sample/./xdp_common.h" r4 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(66)); - // EBPF_OP_STXW pc=220 dst=r1 src=r4 offset=82 imm=0 + // EBPF_OP_STXW pc=235 dst=r1 src=r4 offset=82 imm=0 #line 33 "sample/./xdp_common.h" *(uint32_t*)(uintptr_t)(r1 + OFFSET(82)) = (uint32_t)r4; - // EBPF_OP_LDXW pc=221 dst=r4 src=r1 offset=70 imm=0 + // EBPF_OP_LDXW pc=236 dst=r4 src=r1 offset=70 imm=0 #line 33 "sample/./xdp_common.h" r4 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(70)); - // EBPF_OP_STXW pc=222 dst=r1 src=r4 offset=86 imm=0 + // EBPF_OP_STXW pc=237 dst=r1 src=r4 offset=86 imm=0 #line 33 "sample/./xdp_common.h" *(uint32_t*)(uintptr_t)(r1 + OFFSET(86)) = (uint32_t)r4; - // EBPF_OP_LDXW pc=223 dst=r4 src=r1 offset=74 imm=0 + // EBPF_OP_LDXW pc=238 dst=r4 src=r1 offset=74 imm=0 #line 33 "sample/./xdp_common.h" r4 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(74)); - // EBPF_OP_STXW pc=224 dst=r1 src=r4 offset=90 imm=0 + // EBPF_OP_STXW pc=239 dst=r1 src=r4 offset=90 imm=0 #line 33 "sample/./xdp_common.h" *(uint32_t*)(uintptr_t)(r1 + OFFSET(90)) = (uint32_t)r4; - // EBPF_OP_LDXDW pc=225 dst=r4 src=r10 offset=-16 imm=0 + // EBPF_OP_LDXDW pc=240 dst=r4 src=r10 offset=-16 imm=0 #line 34 "sample/./xdp_common.h" r4 = *(uint64_t*)(uintptr_t)(r10 + OFFSET(-16)); - // EBPF_OP_MOV64_REG pc=226 dst=r5 src=r4 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=241 dst=r5 src=r4 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r5 = r4; - // EBPF_OP_RSH64_IMM pc=227 dst=r5 src=r0 offset=0 imm=48 + // EBPF_OP_RSH64_IMM pc=242 dst=r5 src=r0 offset=0 imm=48 #line 34 "sample/./xdp_common.h" r5 >>= (IMMEDIATE(48) & 63); - // EBPF_OP_STXB pc=228 dst=r1 src=r5 offset=68 imm=0 + // EBPF_OP_STXB pc=243 dst=r1 src=r5 offset=68 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(68)) = (uint8_t)r5; - // EBPF_OP_MOV64_REG pc=229 dst=r5 src=r4 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=244 dst=r5 src=r4 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r5 = r4; - // EBPF_OP_RSH64_IMM pc=230 dst=r5 src=r0 offset=0 imm=56 + // EBPF_OP_RSH64_IMM pc=245 dst=r5 src=r0 offset=0 imm=56 #line 34 "sample/./xdp_common.h" r5 >>= (IMMEDIATE(56) & 63); - // EBPF_OP_STXB pc=231 dst=r1 src=r5 offset=69 imm=0 + // EBPF_OP_STXB pc=246 dst=r1 src=r5 offset=69 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(69)) = (uint8_t)r5; - // EBPF_OP_MOV64_REG pc=232 dst=r5 src=r4 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=247 dst=r5 src=r4 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r5 = r4; - // EBPF_OP_RSH64_IMM pc=233 dst=r5 src=r0 offset=0 imm=32 + // EBPF_OP_RSH64_IMM pc=248 dst=r5 src=r0 offset=0 imm=32 #line 34 "sample/./xdp_common.h" r5 >>= (IMMEDIATE(32) & 63); - // EBPF_OP_STXB pc=234 dst=r1 src=r5 offset=66 imm=0 + // EBPF_OP_STXB pc=249 dst=r1 src=r5 offset=66 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(66)) = (uint8_t)r5; - // EBPF_OP_MOV64_REG pc=235 dst=r5 src=r4 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=250 dst=r5 src=r4 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r5 = r4; - // EBPF_OP_RSH64_IMM pc=236 dst=r5 src=r0 offset=0 imm=40 + // EBPF_OP_RSH64_IMM pc=251 dst=r5 src=r0 offset=0 imm=40 #line 34 "sample/./xdp_common.h" r5 >>= (IMMEDIATE(40) & 63); - // EBPF_OP_STXB pc=237 dst=r1 src=r5 offset=67 imm=0 + // EBPF_OP_STXB pc=252 dst=r1 src=r5 offset=67 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(67)) = (uint8_t)r5; - // EBPF_OP_MOV64_REG pc=238 dst=r5 src=r4 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=253 dst=r5 src=r4 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r5 = r4; - // EBPF_OP_RSH64_IMM pc=239 dst=r5 src=r0 offset=0 imm=16 + // EBPF_OP_RSH64_IMM pc=254 dst=r5 src=r0 offset=0 imm=16 #line 34 "sample/./xdp_common.h" r5 >>= (IMMEDIATE(16) & 63); - // EBPF_OP_STXB pc=240 dst=r1 src=r5 offset=64 imm=0 + // EBPF_OP_STXB pc=255 dst=r1 src=r5 offset=64 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(64)) = (uint8_t)r5; - // EBPF_OP_MOV64_REG pc=241 dst=r5 src=r4 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=256 dst=r5 src=r4 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r5 = r4; - // EBPF_OP_RSH64_IMM pc=242 dst=r5 src=r0 offset=0 imm=24 + // EBPF_OP_RSH64_IMM pc=257 dst=r5 src=r0 offset=0 imm=24 #line 34 "sample/./xdp_common.h" r5 >>= (IMMEDIATE(24) & 63); - // EBPF_OP_STXB pc=243 dst=r1 src=r5 offset=65 imm=0 + // EBPF_OP_STXB pc=258 dst=r1 src=r5 offset=65 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(65)) = (uint8_t)r5; - // EBPF_OP_STXB pc=244 dst=r1 src=r4 offset=62 imm=0 + // EBPF_OP_STXB pc=259 dst=r1 src=r4 offset=62 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(62)) = (uint8_t)r4; - // EBPF_OP_RSH64_IMM pc=245 dst=r4 src=r0 offset=0 imm=8 + // EBPF_OP_RSH64_IMM pc=260 dst=r4 src=r0 offset=0 imm=8 #line 34 "sample/./xdp_common.h" r4 >>= (IMMEDIATE(8) & 63); - // EBPF_OP_STXB pc=246 dst=r1 src=r4 offset=63 imm=0 + // EBPF_OP_STXB pc=261 dst=r1 src=r4 offset=63 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(63)) = (uint8_t)r4; - // EBPF_OP_LDXDW pc=247 dst=r4 src=r10 offset=-8 imm=0 + // EBPF_OP_LDXDW pc=262 dst=r4 src=r10 offset=-8 imm=0 #line 34 "sample/./xdp_common.h" r4 = *(uint64_t*)(uintptr_t)(r10 + OFFSET(-8)); - // EBPF_OP_MOV64_REG pc=248 dst=r5 src=r4 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=263 dst=r5 src=r4 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r5 = r4; - // EBPF_OP_RSH64_IMM pc=249 dst=r5 src=r0 offset=0 imm=48 + // EBPF_OP_RSH64_IMM pc=264 dst=r5 src=r0 offset=0 imm=48 #line 34 "sample/./xdp_common.h" r5 >>= (IMMEDIATE(48) & 63); - // EBPF_OP_STXB pc=250 dst=r1 src=r5 offset=76 imm=0 + // EBPF_OP_STXB pc=265 dst=r1 src=r5 offset=76 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(76)) = (uint8_t)r5; - // EBPF_OP_MOV64_REG pc=251 dst=r5 src=r4 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=266 dst=r5 src=r4 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r5 = r4; - // EBPF_OP_RSH64_IMM pc=252 dst=r5 src=r0 offset=0 imm=56 + // EBPF_OP_RSH64_IMM pc=267 dst=r5 src=r0 offset=0 imm=56 #line 34 "sample/./xdp_common.h" r5 >>= (IMMEDIATE(56) & 63); - // EBPF_OP_STXB pc=253 dst=r1 src=r5 offset=77 imm=0 + // EBPF_OP_STXB pc=268 dst=r1 src=r5 offset=77 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(77)) = (uint8_t)r5; - // EBPF_OP_MOV64_REG pc=254 dst=r5 src=r4 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=269 dst=r5 src=r4 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r5 = r4; - // EBPF_OP_RSH64_IMM pc=255 dst=r5 src=r0 offset=0 imm=32 + // EBPF_OP_RSH64_IMM pc=270 dst=r5 src=r0 offset=0 imm=32 #line 34 "sample/./xdp_common.h" r5 >>= (IMMEDIATE(32) & 63); - // EBPF_OP_STXB pc=256 dst=r1 src=r5 offset=74 imm=0 + // EBPF_OP_STXB pc=271 dst=r1 src=r5 offset=74 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(74)) = (uint8_t)r5; - // EBPF_OP_MOV64_REG pc=257 dst=r5 src=r4 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=272 dst=r5 src=r4 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r5 = r4; - // EBPF_OP_RSH64_IMM pc=258 dst=r5 src=r0 offset=0 imm=40 + // EBPF_OP_RSH64_IMM pc=273 dst=r5 src=r0 offset=0 imm=40 #line 34 "sample/./xdp_common.h" r5 >>= (IMMEDIATE(40) & 63); - // EBPF_OP_STXB pc=259 dst=r1 src=r5 offset=75 imm=0 + // EBPF_OP_STXB pc=274 dst=r1 src=r5 offset=75 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(75)) = (uint8_t)r5; - // EBPF_OP_MOV64_REG pc=260 dst=r5 src=r4 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=275 dst=r5 src=r4 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r5 = r4; - // EBPF_OP_RSH64_IMM pc=261 dst=r5 src=r0 offset=0 imm=16 + // EBPF_OP_RSH64_IMM pc=276 dst=r5 src=r0 offset=0 imm=16 #line 34 "sample/./xdp_common.h" r5 >>= (IMMEDIATE(16) & 63); - // EBPF_OP_STXB pc=262 dst=r1 src=r5 offset=72 imm=0 + // EBPF_OP_STXB pc=277 dst=r1 src=r5 offset=72 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(72)) = (uint8_t)r5; - // EBPF_OP_MOV64_REG pc=263 dst=r5 src=r4 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=278 dst=r5 src=r4 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r5 = r4; - // EBPF_OP_RSH64_IMM pc=264 dst=r5 src=r0 offset=0 imm=24 + // EBPF_OP_RSH64_IMM pc=279 dst=r5 src=r0 offset=0 imm=24 #line 34 "sample/./xdp_common.h" r5 >>= (IMMEDIATE(24) & 63); - // EBPF_OP_STXB pc=265 dst=r1 src=r5 offset=73 imm=0 + // EBPF_OP_STXB pc=280 dst=r1 src=r5 offset=73 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(73)) = (uint8_t)r5; - // EBPF_OP_STXB pc=266 dst=r1 src=r4 offset=70 imm=0 + // EBPF_OP_STXB pc=281 dst=r1 src=r4 offset=70 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(70)) = (uint8_t)r4; - // EBPF_OP_RSH64_IMM pc=267 dst=r4 src=r0 offset=0 imm=8 + // EBPF_OP_RSH64_IMM pc=282 dst=r4 src=r0 offset=0 imm=8 #line 34 "sample/./xdp_common.h" r4 >>= (IMMEDIATE(8) & 63); - // EBPF_OP_STXB pc=268 dst=r1 src=r4 offset=71 imm=0 + // EBPF_OP_STXB pc=283 dst=r1 src=r4 offset=71 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(71)) = (uint8_t)r4; - // EBPF_OP_LDXW pc=269 dst=r4 src=r3 offset=36 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_MOV64_REG pc=284 dst=r4 src=r1 offset=0 imm=0 +#line 138 "sample/encap_reflect_packet.c" + r4 = r1; + // EBPF_OP_ADD64_IMM pc=285 dst=r4 src=r0 offset=0 imm=102 +#line 138 "sample/encap_reflect_packet.c" + r4 += IMMEDIATE(102); + // EBPF_OP_LDXDW pc=286 dst=r5 src=r6 offset=8 imm=0 +#line 138 "sample/encap_reflect_packet.c" + r5 = *(uint64_t*)(uintptr_t)(r6 + OFFSET(8)); + // EBPF_OP_JGT_REG pc=287 dst=r4 src=r5 offset=34 imm=0 +#line 138 "sample/encap_reflect_packet.c" + if (r4 > r5) +#line 138 "sample/encap_reflect_packet.c" + goto label_5; + // EBPF_OP_LDXH pc=288 dst=r4 src=r1 offset=96 imm=0 +#line 142 "sample/encap_reflect_packet.c" + r4 = *(uint16_t*)(uintptr_t)(r1 + OFFSET(96)); + // EBPF_OP_JNE_IMM pc=289 dst=r4 src=r0 offset=4 imm=7459 +#line 142 "sample/encap_reflect_packet.c" + if (r4 != IMMEDIATE(7459)) +#line 142 "sample/encap_reflect_packet.c" + goto label_3; + // EBPF_OP_LDXH pc=290 dst=r4 src=r1 offset=94 imm=0 +#line 40 "sample/./xdp_common.h" + r4 = *(uint16_t*)(uintptr_t)(r1 + OFFSET(94)); + // EBPF_OP_STXH pc=291 dst=r1 src=r4 offset=96 imm=0 +#line 42 "sample/./xdp_common.h" + *(uint16_t*)(uintptr_t)(r1 + OFFSET(96)) = (uint16_t)r4; + // EBPF_OP_MOV64_IMM pc=292 dst=r4 src=r0 offset=0 imm=7459 +#line 42 "sample/./xdp_common.h" + r4 = IMMEDIATE(7459); + // EBPF_OP_STXH pc=293 dst=r1 src=r4 offset=94 imm=0 +#line 41 "sample/./xdp_common.h" + *(uint16_t*)(uintptr_t)(r1 + OFFSET(94)) = (uint16_t)r4; +label_3: + // EBPF_OP_LDXW pc=294 dst=r4 src=r3 offset=36 imm=0 +#line 147 "sample/encap_reflect_packet.c" r4 = *(uint32_t*)(uintptr_t)(r3 + OFFSET(36)); - // EBPF_OP_STXW pc=270 dst=r2 src=r4 offset=36 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_STXW pc=295 dst=r2 src=r4 offset=36 imm=0 +#line 147 "sample/encap_reflect_packet.c" *(uint32_t*)(uintptr_t)(r2 + OFFSET(36)) = (uint32_t)r4; - // EBPF_OP_LDXW pc=271 dst=r4 src=r3 offset=32 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_LDXW pc=296 dst=r4 src=r3 offset=32 imm=0 +#line 147 "sample/encap_reflect_packet.c" r4 = *(uint32_t*)(uintptr_t)(r3 + OFFSET(32)); - // EBPF_OP_STXW pc=272 dst=r2 src=r4 offset=32 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_STXW pc=297 dst=r2 src=r4 offset=32 imm=0 +#line 147 "sample/encap_reflect_packet.c" *(uint32_t*)(uintptr_t)(r2 + OFFSET(32)) = (uint32_t)r4; - // EBPF_OP_LDXW pc=273 dst=r4 src=r3 offset=28 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_LDXW pc=298 dst=r4 src=r3 offset=28 imm=0 +#line 147 "sample/encap_reflect_packet.c" r4 = *(uint32_t*)(uintptr_t)(r3 + OFFSET(28)); - // EBPF_OP_STXW pc=274 dst=r2 src=r4 offset=28 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_STXW pc=299 dst=r2 src=r4 offset=28 imm=0 +#line 147 "sample/encap_reflect_packet.c" *(uint32_t*)(uintptr_t)(r2 + OFFSET(28)) = (uint32_t)r4; - // EBPF_OP_LDXW pc=275 dst=r4 src=r3 offset=24 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_LDXW pc=300 dst=r4 src=r3 offset=24 imm=0 +#line 147 "sample/encap_reflect_packet.c" r4 = *(uint32_t*)(uintptr_t)(r3 + OFFSET(24)); - // EBPF_OP_STXW pc=276 dst=r2 src=r4 offset=24 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_STXW pc=301 dst=r2 src=r4 offset=24 imm=0 +#line 147 "sample/encap_reflect_packet.c" *(uint32_t*)(uintptr_t)(r2 + OFFSET(24)) = (uint32_t)r4; - // EBPF_OP_LDXW pc=277 dst=r4 src=r3 offset=20 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_LDXW pc=302 dst=r4 src=r3 offset=20 imm=0 +#line 147 "sample/encap_reflect_packet.c" r4 = *(uint32_t*)(uintptr_t)(r3 + OFFSET(20)); - // EBPF_OP_STXW pc=278 dst=r2 src=r4 offset=20 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_STXW pc=303 dst=r2 src=r4 offset=20 imm=0 +#line 147 "sample/encap_reflect_packet.c" *(uint32_t*)(uintptr_t)(r2 + OFFSET(20)) = (uint32_t)r4; - // EBPF_OP_LDXW pc=279 dst=r4 src=r3 offset=16 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_LDXW pc=304 dst=r4 src=r3 offset=16 imm=0 +#line 147 "sample/encap_reflect_packet.c" r4 = *(uint32_t*)(uintptr_t)(r3 + OFFSET(16)); - // EBPF_OP_STXW pc=280 dst=r2 src=r4 offset=16 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_STXW pc=305 dst=r2 src=r4 offset=16 imm=0 +#line 147 "sample/encap_reflect_packet.c" *(uint32_t*)(uintptr_t)(r2 + OFFSET(16)) = (uint32_t)r4; - // EBPF_OP_LDXW pc=281 dst=r4 src=r3 offset=12 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_LDXW pc=306 dst=r4 src=r3 offset=12 imm=0 +#line 147 "sample/encap_reflect_packet.c" r4 = *(uint32_t*)(uintptr_t)(r3 + OFFSET(12)); - // EBPF_OP_STXW pc=282 dst=r2 src=r4 offset=12 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_STXW pc=307 dst=r2 src=r4 offset=12 imm=0 +#line 147 "sample/encap_reflect_packet.c" *(uint32_t*)(uintptr_t)(r2 + OFFSET(12)) = (uint32_t)r4; - // EBPF_OP_LDXW pc=283 dst=r4 src=r3 offset=8 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_LDXW pc=308 dst=r4 src=r3 offset=8 imm=0 +#line 147 "sample/encap_reflect_packet.c" r4 = *(uint32_t*)(uintptr_t)(r3 + OFFSET(8)); - // EBPF_OP_STXW pc=284 dst=r2 src=r4 offset=8 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_STXW pc=309 dst=r2 src=r4 offset=8 imm=0 +#line 147 "sample/encap_reflect_packet.c" *(uint32_t*)(uintptr_t)(r2 + OFFSET(8)) = (uint32_t)r4; - // EBPF_OP_LDXW pc=285 dst=r4 src=r3 offset=4 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_LDXW pc=310 dst=r4 src=r3 offset=4 imm=0 +#line 147 "sample/encap_reflect_packet.c" r4 = *(uint32_t*)(uintptr_t)(r3 + OFFSET(4)); - // EBPF_OP_STXW pc=286 dst=r2 src=r4 offset=4 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_STXW pc=311 dst=r2 src=r4 offset=4 imm=0 +#line 147 "sample/encap_reflect_packet.c" *(uint32_t*)(uintptr_t)(r2 + OFFSET(4)) = (uint32_t)r4; - // EBPF_OP_LDXW pc=287 dst=r3 src=r3 offset=0 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_LDXW pc=312 dst=r3 src=r3 offset=0 imm=0 +#line 147 "sample/encap_reflect_packet.c" r3 = *(uint32_t*)(uintptr_t)(r3 + OFFSET(0)); - // EBPF_OP_STXW pc=288 dst=r2 src=r3 offset=0 imm=0 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_STXW pc=313 dst=r2 src=r3 offset=0 imm=0 +#line 147 "sample/encap_reflect_packet.c" *(uint32_t*)(uintptr_t)(r2 + OFFSET(0)) = (uint32_t)r3; - // EBPF_OP_MOV64_IMM pc=289 dst=r2 src=r0 offset=0 imm=41 -#line 129 "sample/encap_reflect_packet.c" + // EBPF_OP_MOV64_IMM pc=314 dst=r2 src=r0 offset=0 imm=41 +#line 147 "sample/encap_reflect_packet.c" r2 = IMMEDIATE(41); - // EBPF_OP_STXB pc=290 dst=r1 src=r2 offset=20 imm=0 -#line 132 "sample/encap_reflect_packet.c" + // EBPF_OP_STXB pc=315 dst=r1 src=r2 offset=20 imm=0 +#line 150 "sample/encap_reflect_packet.c" *(uint8_t*)(uintptr_t)(r1 + OFFSET(20)) = (uint8_t)r2; - // EBPF_OP_LDXH pc=291 dst=r2 src=r1 offset=58 imm=0 -#line 133 "sample/encap_reflect_packet.c" + // EBPF_OP_LDXH pc=316 dst=r2 src=r1 offset=58 imm=0 +#line 151 "sample/encap_reflect_packet.c" r2 = *(uint16_t*)(uintptr_t)(r1 + OFFSET(58)); - // EBPF_OP_BE pc=292 dst=r2 src=r0 offset=0 imm=16 -#line 133 "sample/encap_reflect_packet.c" + // EBPF_OP_BE pc=317 dst=r2 src=r0 offset=0 imm=16 +#line 151 "sample/encap_reflect_packet.c" r2 = htobe16((uint16_t)r2); -#line 133 "sample/encap_reflect_packet.c" +#line 151 "sample/encap_reflect_packet.c" r2 &= UINT32_MAX; - // EBPF_OP_ADD64_IMM pc=293 dst=r2 src=r0 offset=0 imm=40 -#line 133 "sample/encap_reflect_packet.c" + // EBPF_OP_ADD64_IMM pc=318 dst=r2 src=r0 offset=0 imm=40 +#line 151 "sample/encap_reflect_packet.c" r2 += IMMEDIATE(40); - // EBPF_OP_BE pc=294 dst=r2 src=r0 offset=0 imm=16 -#line 133 "sample/encap_reflect_packet.c" + // EBPF_OP_BE pc=319 dst=r2 src=r0 offset=0 imm=16 +#line 151 "sample/encap_reflect_packet.c" r2 = htobe16((uint16_t)r2); -#line 133 "sample/encap_reflect_packet.c" +#line 151 "sample/encap_reflect_packet.c" r2 &= UINT32_MAX; - // EBPF_OP_STXH pc=295 dst=r1 src=r2 offset=18 imm=0 -#line 133 "sample/encap_reflect_packet.c" + // EBPF_OP_STXH pc=320 dst=r1 src=r2 offset=18 imm=0 +#line 151 "sample/encap_reflect_packet.c" *(uint16_t*)(uintptr_t)(r1 + OFFSET(18)) = (uint16_t)r2; -label_2: - // EBPF_OP_MOV64_IMM pc=296 dst=r0 src=r0 offset=0 imm=3 -#line 133 "sample/encap_reflect_packet.c" +label_4: + // EBPF_OP_MOV64_IMM pc=321 dst=r0 src=r0 offset=0 imm=3 +#line 151 "sample/encap_reflect_packet.c" r0 = IMMEDIATE(3); -label_3: - // EBPF_OP_EXIT pc=297 dst=r0 src=r0 offset=0 imm=0 -#line 198 "sample/encap_reflect_packet.c" +label_5: + // EBPF_OP_EXIT pc=322 dst=r0 src=r0 offset=0 imm=0 +#line 216 "sample/encap_reflect_packet.c" return r0; -#line 198 "sample/encap_reflect_packet.c" +#line 216 "sample/encap_reflect_packet.c" } #pragma code_seg(pop) #line __LINE__ __FILE__ @@ -1196,7 +1285,7 @@ static program_entry_t _programs[] = { 0, encap_reflect_packet_helpers, 2, - 298, + 323, &encap_reflect_packet_program_type_guid, &encap_reflect_packet_attach_type_guid, }, diff --git a/tests/bpf2c_tests/expected/reflect_packet_dll.c b/tests/bpf2c_tests/expected/reflect_packet_dll.c index 8b53591ba7..f0f24528cc 100644 --- a/tests/bpf2c_tests/expected/reflect_packet_dll.c +++ b/tests/bpf2c_tests/expected/reflect_packet_dll.c @@ -81,32 +81,32 @@ reflect_packet(void* context) // EBPF_OP_MOV64_IMM pc=0 dst=r0 src=r0 offset=0 imm=1 #line 23 "sample/reflect_packet.c" r0 = IMMEDIATE(1); - // EBPF_OP_LDXDW pc=1 dst=r2 src=r1 offset=8 imm=0 + // EBPF_OP_LDXDW pc=1 dst=r3 src=r1 offset=8 imm=0 #line 29 "sample/reflect_packet.c" - r2 = *(uint64_t*)(uintptr_t)(r1 + OFFSET(8)); + r3 = *(uint64_t*)(uintptr_t)(r1 + OFFSET(8)); // EBPF_OP_LDXDW pc=2 dst=r1 src=r1 offset=0 imm=0 #line 28 "sample/reflect_packet.c" r1 = *(uint64_t*)(uintptr_t)(r1 + OFFSET(0)); - // EBPF_OP_MOV64_REG pc=3 dst=r3 src=r1 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=3 dst=r2 src=r1 offset=0 imm=0 #line 29 "sample/reflect_packet.c" - r3 = r1; - // EBPF_OP_ADD64_IMM pc=4 dst=r3 src=r0 offset=0 imm=14 + r2 = r1; + // EBPF_OP_ADD64_IMM pc=4 dst=r2 src=r0 offset=0 imm=14 #line 29 "sample/reflect_packet.c" - r3 += IMMEDIATE(14); - // EBPF_OP_JGT_REG pc=5 dst=r3 src=r2 offset=203 imm=0 + r2 += IMMEDIATE(14); + // EBPF_OP_JGT_REG pc=5 dst=r2 src=r3 offset=211 imm=0 #line 29 "sample/reflect_packet.c" - if (r3 > r2) + if (r2 > r3) #line 29 "sample/reflect_packet.c" goto label_3; // EBPF_OP_LDXH pc=6 dst=r4 src=r1 offset=12 imm=0 #line 34 "sample/reflect_packet.c" r4 = *(uint16_t*)(uintptr_t)(r1 + OFFSET(12)); - // EBPF_OP_JEQ_IMM pc=7 dst=r4 src=r0 offset=56 imm=56710 + // EBPF_OP_JEQ_IMM pc=7 dst=r4 src=r0 offset=60 imm=56710 #line 34 "sample/reflect_packet.c" if (r4 == IMMEDIATE(56710)) #line 34 "sample/reflect_packet.c" goto label_1; - // EBPF_OP_JNE_IMM pc=8 dst=r4 src=r0 offset=200 imm=8 + // EBPF_OP_JNE_IMM pc=8 dst=r4 src=r0 offset=208 imm=8 #line 34 "sample/reflect_packet.c" if (r4 != IMMEDIATE(8)) #line 34 "sample/reflect_packet.c" @@ -117,15 +117,15 @@ reflect_packet(void* context) // EBPF_OP_ADD64_IMM pc=10 dst=r4 src=r0 offset=0 imm=34 #line 35 "sample/reflect_packet.c" r4 += IMMEDIATE(34); - // EBPF_OP_JGT_REG pc=11 dst=r4 src=r2 offset=197 imm=0 + // EBPF_OP_JGT_REG pc=11 dst=r4 src=r3 offset=205 imm=0 #line 35 "sample/reflect_packet.c" - if (r4 > r2) + if (r4 > r3) #line 35 "sample/reflect_packet.c" goto label_3; // EBPF_OP_LDXB pc=12 dst=r4 src=r1 offset=23 imm=0 #line 41 "sample/reflect_packet.c" r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(23)); - // EBPF_OP_JNE_IMM pc=13 dst=r4 src=r0 offset=195 imm=17 + // EBPF_OP_JNE_IMM pc=13 dst=r4 src=r0 offset=203 imm=17 #line 41 "sample/reflect_packet.c" if (r4 != IMMEDIATE(17)) #line 41 "sample/reflect_packet.c" @@ -139,601 +139,625 @@ reflect_packet(void* context) // EBPF_OP_AND64_IMM pc=16 dst=r4 src=r0 offset=0 imm=60 #line 41 "sample/reflect_packet.c" r4 &= IMMEDIATE(60); - // EBPF_OP_ADD64_REG pc=17 dst=r3 src=r4 offset=0 imm=0 + // EBPF_OP_ADD64_REG pc=17 dst=r2 src=r4 offset=0 imm=0 #line 41 "sample/reflect_packet.c" - r3 += r4; - // EBPF_OP_MOV64_REG pc=18 dst=r4 src=r3 offset=0 imm=0 + r2 += r4; + // EBPF_OP_MOV64_REG pc=18 dst=r4 src=r2 offset=0 imm=0 #line 41 "sample/reflect_packet.c" - r4 = r3; + r4 = r2; // EBPF_OP_ADD64_IMM pc=19 dst=r4 src=r0 offset=0 imm=8 #line 41 "sample/reflect_packet.c" r4 += IMMEDIATE(8); - // EBPF_OP_JGT_REG pc=20 dst=r4 src=r2 offset=188 imm=0 + // EBPF_OP_JGT_REG pc=20 dst=r4 src=r3 offset=196 imm=0 #line 41 "sample/reflect_packet.c" - if (r4 > r2) + if (r4 > r3) #line 41 "sample/reflect_packet.c" goto label_3; - // EBPF_OP_LDXH pc=21 dst=r2 src=r3 offset=2 imm=0 + // EBPF_OP_LDXH pc=21 dst=r3 src=r2 offset=2 imm=0 #line 47 "sample/reflect_packet.c" - r2 = *(uint16_t*)(uintptr_t)(r3 + OFFSET(2)); - // EBPF_OP_JNE_IMM pc=22 dst=r2 src=r0 offset=186 imm=7459 + r3 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(2)); + // EBPF_OP_JNE_IMM pc=22 dst=r3 src=r0 offset=194 imm=7459 #line 47 "sample/reflect_packet.c" - if (r2 != IMMEDIATE(7459)) + if (r3 != IMMEDIATE(7459)) #line 47 "sample/reflect_packet.c" goto label_3; - // EBPF_OP_LDXB pc=23 dst=r2 src=r1 offset=5 imm=0 + // EBPF_OP_LDXB pc=23 dst=r3 src=r1 offset=5 imm=0 #line 15 "sample/./xdp_common.h" - r2 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(5)); - // EBPF_OP_LSH64_IMM pc=24 dst=r2 src=r0 offset=0 imm=8 + r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(5)); + // EBPF_OP_LSH64_IMM pc=24 dst=r3 src=r0 offset=0 imm=8 #line 15 "sample/./xdp_common.h" - r2 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=25 dst=r3 src=r1 offset=4 imm=0 + r3 <<= (IMMEDIATE(8) & 63); + // EBPF_OP_LDXB pc=25 dst=r4 src=r1 offset=4 imm=0 #line 15 "sample/./xdp_common.h" - r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(4)); - // EBPF_OP_OR64_REG pc=26 dst=r2 src=r3 offset=0 imm=0 + r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(4)); + // EBPF_OP_OR64_REG pc=26 dst=r3 src=r4 offset=0 imm=0 #line 15 "sample/./xdp_common.h" - r2 |= r3; - // EBPF_OP_STXH pc=27 dst=r10 src=r2 offset=-12 imm=0 + r3 |= r4; + // EBPF_OP_STXH pc=27 dst=r10 src=r3 offset=-12 imm=0 #line 15 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r10 + OFFSET(-12)) = (uint16_t)r2; - // EBPF_OP_LDXB pc=28 dst=r2 src=r1 offset=1 imm=0 + *(uint16_t*)(uintptr_t)(r10 + OFFSET(-12)) = (uint16_t)r3; + // EBPF_OP_LDXB pc=28 dst=r3 src=r1 offset=1 imm=0 #line 15 "sample/./xdp_common.h" - r2 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(1)); - // EBPF_OP_LSH64_IMM pc=29 dst=r2 src=r0 offset=0 imm=8 + r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(1)); + // EBPF_OP_LSH64_IMM pc=29 dst=r3 src=r0 offset=0 imm=8 #line 15 "sample/./xdp_common.h" - r2 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=30 dst=r3 src=r1 offset=0 imm=0 + r3 <<= (IMMEDIATE(8) & 63); + // EBPF_OP_LDXB pc=30 dst=r4 src=r1 offset=0 imm=0 #line 15 "sample/./xdp_common.h" - r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(0)); - // EBPF_OP_OR64_REG pc=31 dst=r2 src=r3 offset=0 imm=0 + r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(0)); + // EBPF_OP_OR64_REG pc=31 dst=r3 src=r4 offset=0 imm=0 #line 15 "sample/./xdp_common.h" - r2 |= r3; - // EBPF_OP_LDXB pc=32 dst=r3 src=r1 offset=3 imm=0 + r3 |= r4; + // EBPF_OP_LDXB pc=32 dst=r4 src=r1 offset=3 imm=0 #line 15 "sample/./xdp_common.h" - r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(3)); - // EBPF_OP_LSH64_IMM pc=33 dst=r3 src=r0 offset=0 imm=8 + r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(3)); + // EBPF_OP_LSH64_IMM pc=33 dst=r4 src=r0 offset=0 imm=8 #line 15 "sample/./xdp_common.h" - r3 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=34 dst=r4 src=r1 offset=2 imm=0 + r4 <<= (IMMEDIATE(8) & 63); + // EBPF_OP_LDXB pc=34 dst=r5 src=r1 offset=2 imm=0 #line 15 "sample/./xdp_common.h" - r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(2)); - // EBPF_OP_OR64_REG pc=35 dst=r3 src=r4 offset=0 imm=0 + r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(2)); + // EBPF_OP_OR64_REG pc=35 dst=r4 src=r5 offset=0 imm=0 #line 15 "sample/./xdp_common.h" - r3 |= r4; - // EBPF_OP_LSH64_IMM pc=36 dst=r3 src=r0 offset=0 imm=16 + r4 |= r5; + // EBPF_OP_LSH64_IMM pc=36 dst=r4 src=r0 offset=0 imm=16 #line 15 "sample/./xdp_common.h" - r3 <<= (IMMEDIATE(16) & 63); - // EBPF_OP_OR64_REG pc=37 dst=r3 src=r2 offset=0 imm=0 + r4 <<= (IMMEDIATE(16) & 63); + // EBPF_OP_OR64_REG pc=37 dst=r4 src=r3 offset=0 imm=0 #line 15 "sample/./xdp_common.h" - r3 |= r2; - // EBPF_OP_STXW pc=38 dst=r10 src=r3 offset=-16 imm=0 + r4 |= r3; + // EBPF_OP_STXW pc=38 dst=r10 src=r4 offset=-16 imm=0 #line 15 "sample/./xdp_common.h" - *(uint32_t*)(uintptr_t)(r10 + OFFSET(-16)) = (uint32_t)r3; - // EBPF_OP_LDXH pc=39 dst=r2 src=r1 offset=6 imm=0 + *(uint32_t*)(uintptr_t)(r10 + OFFSET(-16)) = (uint32_t)r4; + // EBPF_OP_LDXH pc=39 dst=r3 src=r1 offset=6 imm=0 #line 16 "sample/./xdp_common.h" - r2 = *(uint16_t*)(uintptr_t)(r1 + OFFSET(6)); - // EBPF_OP_STXH pc=40 dst=r1 src=r2 offset=0 imm=0 + r3 = *(uint16_t*)(uintptr_t)(r1 + OFFSET(6)); + // EBPF_OP_STXH pc=40 dst=r1 src=r3 offset=0 imm=0 #line 16 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r1 + OFFSET(0)) = (uint16_t)r2; - // EBPF_OP_LDXH pc=41 dst=r2 src=r1 offset=8 imm=0 + *(uint16_t*)(uintptr_t)(r1 + OFFSET(0)) = (uint16_t)r3; + // EBPF_OP_LDXH pc=41 dst=r3 src=r1 offset=8 imm=0 #line 16 "sample/./xdp_common.h" - r2 = *(uint16_t*)(uintptr_t)(r1 + OFFSET(8)); - // EBPF_OP_STXH pc=42 dst=r1 src=r2 offset=2 imm=0 + r3 = *(uint16_t*)(uintptr_t)(r1 + OFFSET(8)); + // EBPF_OP_STXH pc=42 dst=r1 src=r3 offset=2 imm=0 #line 16 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r1 + OFFSET(2)) = (uint16_t)r2; - // EBPF_OP_LDXH pc=43 dst=r2 src=r1 offset=10 imm=0 + *(uint16_t*)(uintptr_t)(r1 + OFFSET(2)) = (uint16_t)r3; + // EBPF_OP_LDXH pc=43 dst=r3 src=r1 offset=10 imm=0 #line 16 "sample/./xdp_common.h" - r2 = *(uint16_t*)(uintptr_t)(r1 + OFFSET(10)); - // EBPF_OP_STXH pc=44 dst=r1 src=r2 offset=4 imm=0 + r3 = *(uint16_t*)(uintptr_t)(r1 + OFFSET(10)); + // EBPF_OP_STXH pc=44 dst=r1 src=r3 offset=4 imm=0 #line 16 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r1 + OFFSET(4)) = (uint16_t)r2; - // EBPF_OP_LDXW pc=45 dst=r2 src=r10 offset=-16 imm=0 + *(uint16_t*)(uintptr_t)(r1 + OFFSET(4)) = (uint16_t)r3; + // EBPF_OP_LDXW pc=45 dst=r3 src=r10 offset=-16 imm=0 #line 17 "sample/./xdp_common.h" - r2 = *(uint32_t*)(uintptr_t)(r10 + OFFSET(-16)); - // EBPF_OP_MOV64_REG pc=46 dst=r3 src=r2 offset=0 imm=0 + r3 = *(uint32_t*)(uintptr_t)(r10 + OFFSET(-16)); + // EBPF_OP_MOV64_REG pc=46 dst=r4 src=r3 offset=0 imm=0 #line 17 "sample/./xdp_common.h" - r3 = r2; - // EBPF_OP_RSH64_IMM pc=47 dst=r3 src=r0 offset=0 imm=16 + r4 = r3; + // EBPF_OP_RSH64_IMM pc=47 dst=r4 src=r0 offset=0 imm=16 #line 17 "sample/./xdp_common.h" - r3 >>= (IMMEDIATE(16) & 63); - // EBPF_OP_STXB pc=48 dst=r1 src=r3 offset=8 imm=0 + r4 >>= (IMMEDIATE(16) & 63); + // EBPF_OP_STXB pc=48 dst=r1 src=r4 offset=8 imm=0 #line 17 "sample/./xdp_common.h" - *(uint8_t*)(uintptr_t)(r1 + OFFSET(8)) = (uint8_t)r3; - // EBPF_OP_MOV64_REG pc=49 dst=r3 src=r2 offset=0 imm=0 + *(uint8_t*)(uintptr_t)(r1 + OFFSET(8)) = (uint8_t)r4; + // EBPF_OP_MOV64_REG pc=49 dst=r4 src=r3 offset=0 imm=0 #line 17 "sample/./xdp_common.h" - r3 = r2; - // EBPF_OP_RSH64_IMM pc=50 dst=r3 src=r0 offset=0 imm=24 + r4 = r3; + // EBPF_OP_RSH64_IMM pc=50 dst=r4 src=r0 offset=0 imm=24 #line 17 "sample/./xdp_common.h" - r3 >>= (IMMEDIATE(24) & 63); - // EBPF_OP_STXB pc=51 dst=r1 src=r3 offset=9 imm=0 + r4 >>= (IMMEDIATE(24) & 63); + // EBPF_OP_STXB pc=51 dst=r1 src=r4 offset=9 imm=0 #line 17 "sample/./xdp_common.h" - *(uint8_t*)(uintptr_t)(r1 + OFFSET(9)) = (uint8_t)r3; - // EBPF_OP_STXB pc=52 dst=r1 src=r2 offset=6 imm=0 + *(uint8_t*)(uintptr_t)(r1 + OFFSET(9)) = (uint8_t)r4; + // EBPF_OP_STXB pc=52 dst=r1 src=r3 offset=6 imm=0 #line 17 "sample/./xdp_common.h" - *(uint8_t*)(uintptr_t)(r1 + OFFSET(6)) = (uint8_t)r2; - // EBPF_OP_RSH64_IMM pc=53 dst=r2 src=r0 offset=0 imm=8 + *(uint8_t*)(uintptr_t)(r1 + OFFSET(6)) = (uint8_t)r3; + // EBPF_OP_RSH64_IMM pc=53 dst=r3 src=r0 offset=0 imm=8 #line 17 "sample/./xdp_common.h" - r2 >>= (IMMEDIATE(8) & 63); - // EBPF_OP_STXB pc=54 dst=r1 src=r2 offset=7 imm=0 + r3 >>= (IMMEDIATE(8) & 63); + // EBPF_OP_STXB pc=54 dst=r1 src=r3 offset=7 imm=0 #line 17 "sample/./xdp_common.h" - *(uint8_t*)(uintptr_t)(r1 + OFFSET(7)) = (uint8_t)r2; - // EBPF_OP_LDXH pc=55 dst=r2 src=r10 offset=-12 imm=0 + *(uint8_t*)(uintptr_t)(r1 + OFFSET(7)) = (uint8_t)r3; + // EBPF_OP_LDXH pc=55 dst=r3 src=r10 offset=-12 imm=0 #line 17 "sample/./xdp_common.h" - r2 = *(uint16_t*)(uintptr_t)(r10 + OFFSET(-12)); - // EBPF_OP_STXB pc=56 dst=r1 src=r2 offset=10 imm=0 + r3 = *(uint16_t*)(uintptr_t)(r10 + OFFSET(-12)); + // EBPF_OP_STXB pc=56 dst=r1 src=r3 offset=10 imm=0 #line 17 "sample/./xdp_common.h" - *(uint8_t*)(uintptr_t)(r1 + OFFSET(10)) = (uint8_t)r2; - // EBPF_OP_RSH64_IMM pc=57 dst=r2 src=r0 offset=0 imm=8 + *(uint8_t*)(uintptr_t)(r1 + OFFSET(10)) = (uint8_t)r3; + // EBPF_OP_RSH64_IMM pc=57 dst=r3 src=r0 offset=0 imm=8 #line 17 "sample/./xdp_common.h" - r2 >>= (IMMEDIATE(8) & 63); - // EBPF_OP_STXB pc=58 dst=r1 src=r2 offset=11 imm=0 + r3 >>= (IMMEDIATE(8) & 63); + // EBPF_OP_STXB pc=58 dst=r1 src=r3 offset=11 imm=0 #line 17 "sample/./xdp_common.h" - *(uint8_t*)(uintptr_t)(r1 + OFFSET(11)) = (uint8_t)r2; - // EBPF_OP_LDXW pc=59 dst=r2 src=r1 offset=30 imm=0 + *(uint8_t*)(uintptr_t)(r1 + OFFSET(11)) = (uint8_t)r3; + // EBPF_OP_LDXW pc=59 dst=r3 src=r1 offset=30 imm=0 #line 23 "sample/./xdp_common.h" - r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(30)); - // EBPF_OP_LDXW pc=60 dst=r3 src=r1 offset=26 imm=0 + r3 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(30)); + // EBPF_OP_LDXW pc=60 dst=r4 src=r1 offset=26 imm=0 #line 24 "sample/./xdp_common.h" - r3 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(26)); - // EBPF_OP_STXW pc=61 dst=r1 src=r3 offset=30 imm=0 + r4 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(26)); + // EBPF_OP_STXW pc=61 dst=r1 src=r4 offset=30 imm=0 #line 24 "sample/./xdp_common.h" - *(uint32_t*)(uintptr_t)(r1 + OFFSET(30)) = (uint32_t)r3; - // EBPF_OP_STXW pc=62 dst=r1 src=r2 offset=26 imm=0 -#line 25 "sample/./xdp_common.h" - *(uint32_t*)(uintptr_t)(r1 + OFFSET(26)) = (uint32_t)r2; - // EBPF_OP_JA pc=63 dst=r0 src=r0 offset=144 imm=0 + *(uint32_t*)(uintptr_t)(r1 + OFFSET(30)) = (uint32_t)r4; + // EBPF_OP_STXW pc=62 dst=r1 src=r3 offset=26 imm=0 #line 25 "sample/./xdp_common.h" + *(uint32_t*)(uintptr_t)(r1 + OFFSET(26)) = (uint32_t)r3; + // EBPF_OP_LDXH pc=63 dst=r1 src=r2 offset=2 imm=0 +#line 41 "sample/./xdp_common.h" + r1 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(2)); + // EBPF_OP_LDXH pc=64 dst=r3 src=r2 offset=0 imm=0 +#line 40 "sample/./xdp_common.h" + r3 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(0)); + // EBPF_OP_STXH pc=65 dst=r2 src=r3 offset=2 imm=0 +#line 42 "sample/./xdp_common.h" + *(uint16_t*)(uintptr_t)(r2 + OFFSET(2)) = (uint16_t)r3; + // EBPF_OP_STXH pc=66 dst=r2 src=r1 offset=0 imm=0 +#line 41 "sample/./xdp_common.h" + *(uint16_t*)(uintptr_t)(r2 + OFFSET(0)) = (uint16_t)r1; + // EBPF_OP_JA pc=67 dst=r0 src=r0 offset=148 imm=0 +#line 41 "sample/./xdp_common.h" goto label_2; label_1: - // EBPF_OP_MOV64_REG pc=64 dst=r3 src=r1 offset=0 imm=0 -#line 55 "sample/reflect_packet.c" - r3 = r1; - // EBPF_OP_ADD64_IMM pc=65 dst=r3 src=r0 offset=0 imm=54 -#line 55 "sample/reflect_packet.c" - r3 += IMMEDIATE(54); - // EBPF_OP_JGT_REG pc=66 dst=r3 src=r2 offset=142 imm=0 -#line 55 "sample/reflect_packet.c" - if (r3 > r2) -#line 55 "sample/reflect_packet.c" + // EBPF_OP_MOV64_REG pc=68 dst=r2 src=r1 offset=0 imm=0 +#line 56 "sample/reflect_packet.c" + r2 = r1; + // EBPF_OP_ADD64_IMM pc=69 dst=r2 src=r0 offset=0 imm=54 +#line 56 "sample/reflect_packet.c" + r2 += IMMEDIATE(54); + // EBPF_OP_JGT_REG pc=70 dst=r2 src=r3 offset=146 imm=0 +#line 56 "sample/reflect_packet.c" + if (r2 > r3) +#line 56 "sample/reflect_packet.c" goto label_3; - // EBPF_OP_MOV64_REG pc=67 dst=r3 src=r1 offset=0 imm=0 -#line 55 "sample/reflect_packet.c" - r3 = r1; - // EBPF_OP_ADD64_IMM pc=68 dst=r3 src=r0 offset=0 imm=62 -#line 55 "sample/reflect_packet.c" - r3 += IMMEDIATE(62); - // EBPF_OP_JGT_REG pc=69 dst=r3 src=r2 offset=139 imm=0 -#line 61 "sample/reflect_packet.c" - if (r3 > r2) -#line 61 "sample/reflect_packet.c" + // EBPF_OP_MOV64_REG pc=71 dst=r2 src=r1 offset=0 imm=0 +#line 56 "sample/reflect_packet.c" + r2 = r1; + // EBPF_OP_ADD64_IMM pc=72 dst=r2 src=r0 offset=0 imm=62 +#line 56 "sample/reflect_packet.c" + r2 += IMMEDIATE(62); + // EBPF_OP_JGT_REG pc=73 dst=r2 src=r3 offset=143 imm=0 +#line 62 "sample/reflect_packet.c" + if (r2 > r3) +#line 62 "sample/reflect_packet.c" goto label_3; - // EBPF_OP_LDXB pc=70 dst=r2 src=r1 offset=20 imm=0 -#line 61 "sample/reflect_packet.c" + // EBPF_OP_LDXB pc=74 dst=r2 src=r1 offset=20 imm=0 +#line 62 "sample/reflect_packet.c" r2 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(20)); - // EBPF_OP_JNE_IMM pc=71 dst=r2 src=r0 offset=137 imm=17 -#line 61 "sample/reflect_packet.c" + // EBPF_OP_JNE_IMM pc=75 dst=r2 src=r0 offset=141 imm=17 +#line 62 "sample/reflect_packet.c" if (r2 != IMMEDIATE(17)) -#line 61 "sample/reflect_packet.c" +#line 62 "sample/reflect_packet.c" goto label_3; - // EBPF_OP_LDXH pc=72 dst=r2 src=r1 offset=56 imm=0 -#line 67 "sample/reflect_packet.c" + // EBPF_OP_LDXH pc=76 dst=r2 src=r1 offset=56 imm=0 +#line 68 "sample/reflect_packet.c" r2 = *(uint16_t*)(uintptr_t)(r1 + OFFSET(56)); - // EBPF_OP_JNE_IMM pc=73 dst=r2 src=r0 offset=135 imm=7459 -#line 67 "sample/reflect_packet.c" + // EBPF_OP_JNE_IMM pc=77 dst=r2 src=r0 offset=139 imm=7459 +#line 68 "sample/reflect_packet.c" if (r2 != IMMEDIATE(7459)) -#line 67 "sample/reflect_packet.c" +#line 68 "sample/reflect_packet.c" goto label_3; - // EBPF_OP_LDXB pc=74 dst=r2 src=r1 offset=5 imm=0 + // EBPF_OP_LDXB pc=78 dst=r2 src=r1 offset=5 imm=0 #line 15 "sample/./xdp_common.h" r2 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(5)); - // EBPF_OP_LSH64_IMM pc=75 dst=r2 src=r0 offset=0 imm=8 + // EBPF_OP_LSH64_IMM pc=79 dst=r2 src=r0 offset=0 imm=8 #line 15 "sample/./xdp_common.h" r2 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=76 dst=r3 src=r1 offset=4 imm=0 + // EBPF_OP_LDXB pc=80 dst=r3 src=r1 offset=4 imm=0 #line 15 "sample/./xdp_common.h" r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(4)); - // EBPF_OP_OR64_REG pc=77 dst=r2 src=r3 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=81 dst=r2 src=r3 offset=0 imm=0 #line 15 "sample/./xdp_common.h" r2 |= r3; - // EBPF_OP_STXH pc=78 dst=r10 src=r2 offset=-12 imm=0 + // EBPF_OP_STXH pc=82 dst=r10 src=r2 offset=-12 imm=0 #line 15 "sample/./xdp_common.h" *(uint16_t*)(uintptr_t)(r10 + OFFSET(-12)) = (uint16_t)r2; - // EBPF_OP_LDXB pc=79 dst=r2 src=r1 offset=1 imm=0 + // EBPF_OP_LDXB pc=83 dst=r2 src=r1 offset=1 imm=0 #line 15 "sample/./xdp_common.h" r2 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(1)); - // EBPF_OP_LSH64_IMM pc=80 dst=r2 src=r0 offset=0 imm=8 + // EBPF_OP_LSH64_IMM pc=84 dst=r2 src=r0 offset=0 imm=8 #line 15 "sample/./xdp_common.h" r2 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=81 dst=r3 src=r1 offset=0 imm=0 + // EBPF_OP_LDXB pc=85 dst=r3 src=r1 offset=0 imm=0 #line 15 "sample/./xdp_common.h" r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(0)); - // EBPF_OP_OR64_REG pc=82 dst=r2 src=r3 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=86 dst=r2 src=r3 offset=0 imm=0 #line 15 "sample/./xdp_common.h" r2 |= r3; - // EBPF_OP_LDXB pc=83 dst=r3 src=r1 offset=3 imm=0 + // EBPF_OP_LDXB pc=87 dst=r3 src=r1 offset=3 imm=0 #line 15 "sample/./xdp_common.h" r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(3)); - // EBPF_OP_LSH64_IMM pc=84 dst=r3 src=r0 offset=0 imm=8 + // EBPF_OP_LSH64_IMM pc=88 dst=r3 src=r0 offset=0 imm=8 #line 15 "sample/./xdp_common.h" r3 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=85 dst=r4 src=r1 offset=2 imm=0 + // EBPF_OP_LDXB pc=89 dst=r4 src=r1 offset=2 imm=0 #line 15 "sample/./xdp_common.h" r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(2)); - // EBPF_OP_OR64_REG pc=86 dst=r3 src=r4 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=90 dst=r3 src=r4 offset=0 imm=0 #line 15 "sample/./xdp_common.h" r3 |= r4; - // EBPF_OP_LSH64_IMM pc=87 dst=r3 src=r0 offset=0 imm=16 + // EBPF_OP_LSH64_IMM pc=91 dst=r3 src=r0 offset=0 imm=16 #line 15 "sample/./xdp_common.h" r3 <<= (IMMEDIATE(16) & 63); - // EBPF_OP_OR64_REG pc=88 dst=r3 src=r2 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=92 dst=r3 src=r2 offset=0 imm=0 #line 15 "sample/./xdp_common.h" r3 |= r2; - // EBPF_OP_STXW pc=89 dst=r10 src=r3 offset=-16 imm=0 + // EBPF_OP_STXW pc=93 dst=r10 src=r3 offset=-16 imm=0 #line 15 "sample/./xdp_common.h" *(uint32_t*)(uintptr_t)(r10 + OFFSET(-16)) = (uint32_t)r3; - // EBPF_OP_LDXH pc=90 dst=r2 src=r1 offset=6 imm=0 + // EBPF_OP_LDXH pc=94 dst=r2 src=r1 offset=6 imm=0 #line 16 "sample/./xdp_common.h" r2 = *(uint16_t*)(uintptr_t)(r1 + OFFSET(6)); - // EBPF_OP_STXH pc=91 dst=r1 src=r2 offset=0 imm=0 + // EBPF_OP_STXH pc=95 dst=r1 src=r2 offset=0 imm=0 #line 16 "sample/./xdp_common.h" *(uint16_t*)(uintptr_t)(r1 + OFFSET(0)) = (uint16_t)r2; - // EBPF_OP_LDXH pc=92 dst=r2 src=r1 offset=8 imm=0 + // EBPF_OP_LDXH pc=96 dst=r2 src=r1 offset=8 imm=0 #line 16 "sample/./xdp_common.h" r2 = *(uint16_t*)(uintptr_t)(r1 + OFFSET(8)); - // EBPF_OP_STXH pc=93 dst=r1 src=r2 offset=2 imm=0 + // EBPF_OP_STXH pc=97 dst=r1 src=r2 offset=2 imm=0 #line 16 "sample/./xdp_common.h" *(uint16_t*)(uintptr_t)(r1 + OFFSET(2)) = (uint16_t)r2; - // EBPF_OP_LDXH pc=94 dst=r2 src=r1 offset=10 imm=0 + // EBPF_OP_LDXH pc=98 dst=r2 src=r1 offset=10 imm=0 #line 16 "sample/./xdp_common.h" r2 = *(uint16_t*)(uintptr_t)(r1 + OFFSET(10)); - // EBPF_OP_STXH pc=95 dst=r1 src=r2 offset=4 imm=0 + // EBPF_OP_STXH pc=99 dst=r1 src=r2 offset=4 imm=0 #line 16 "sample/./xdp_common.h" *(uint16_t*)(uintptr_t)(r1 + OFFSET(4)) = (uint16_t)r2; - // EBPF_OP_LDXW pc=96 dst=r2 src=r10 offset=-16 imm=0 + // EBPF_OP_LDXW pc=100 dst=r2 src=r10 offset=-16 imm=0 #line 17 "sample/./xdp_common.h" r2 = *(uint32_t*)(uintptr_t)(r10 + OFFSET(-16)); - // EBPF_OP_MOV64_REG pc=97 dst=r3 src=r2 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=101 dst=r3 src=r2 offset=0 imm=0 #line 17 "sample/./xdp_common.h" r3 = r2; - // EBPF_OP_RSH64_IMM pc=98 dst=r3 src=r0 offset=0 imm=16 + // EBPF_OP_RSH64_IMM pc=102 dst=r3 src=r0 offset=0 imm=16 #line 17 "sample/./xdp_common.h" r3 >>= (IMMEDIATE(16) & 63); - // EBPF_OP_STXB pc=99 dst=r1 src=r3 offset=8 imm=0 + // EBPF_OP_STXB pc=103 dst=r1 src=r3 offset=8 imm=0 #line 17 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(8)) = (uint8_t)r3; - // EBPF_OP_MOV64_REG pc=100 dst=r3 src=r2 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=104 dst=r3 src=r2 offset=0 imm=0 #line 17 "sample/./xdp_common.h" r3 = r2; - // EBPF_OP_RSH64_IMM pc=101 dst=r3 src=r0 offset=0 imm=24 + // EBPF_OP_RSH64_IMM pc=105 dst=r3 src=r0 offset=0 imm=24 #line 17 "sample/./xdp_common.h" r3 >>= (IMMEDIATE(24) & 63); - // EBPF_OP_STXB pc=102 dst=r1 src=r3 offset=9 imm=0 + // EBPF_OP_STXB pc=106 dst=r1 src=r3 offset=9 imm=0 #line 17 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(9)) = (uint8_t)r3; - // EBPF_OP_STXB pc=103 dst=r1 src=r2 offset=6 imm=0 + // EBPF_OP_STXB pc=107 dst=r1 src=r2 offset=6 imm=0 #line 17 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(6)) = (uint8_t)r2; - // EBPF_OP_RSH64_IMM pc=104 dst=r2 src=r0 offset=0 imm=8 + // EBPF_OP_RSH64_IMM pc=108 dst=r2 src=r0 offset=0 imm=8 #line 17 "sample/./xdp_common.h" r2 >>= (IMMEDIATE(8) & 63); - // EBPF_OP_STXB pc=105 dst=r1 src=r2 offset=7 imm=0 + // EBPF_OP_STXB pc=109 dst=r1 src=r2 offset=7 imm=0 #line 17 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(7)) = (uint8_t)r2; - // EBPF_OP_LDXH pc=106 dst=r2 src=r10 offset=-12 imm=0 + // EBPF_OP_LDXH pc=110 dst=r2 src=r10 offset=-12 imm=0 #line 17 "sample/./xdp_common.h" r2 = *(uint16_t*)(uintptr_t)(r10 + OFFSET(-12)); - // EBPF_OP_STXB pc=107 dst=r1 src=r2 offset=10 imm=0 + // EBPF_OP_STXB pc=111 dst=r1 src=r2 offset=10 imm=0 #line 17 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(10)) = (uint8_t)r2; - // EBPF_OP_RSH64_IMM pc=108 dst=r2 src=r0 offset=0 imm=8 + // EBPF_OP_RSH64_IMM pc=112 dst=r2 src=r0 offset=0 imm=8 #line 17 "sample/./xdp_common.h" r2 >>= (IMMEDIATE(8) & 63); - // EBPF_OP_STXB pc=109 dst=r1 src=r2 offset=11 imm=0 + // EBPF_OP_STXB pc=113 dst=r1 src=r2 offset=11 imm=0 #line 17 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(11)) = (uint8_t)r2; - // EBPF_OP_LDXB pc=110 dst=r3 src=r1 offset=47 imm=0 + // EBPF_OP_LDXB pc=114 dst=r3 src=r1 offset=47 imm=0 #line 32 "sample/./xdp_common.h" r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(47)); - // EBPF_OP_LSH64_IMM pc=111 dst=r3 src=r0 offset=0 imm=8 + // EBPF_OP_LSH64_IMM pc=115 dst=r3 src=r0 offset=0 imm=8 #line 32 "sample/./xdp_common.h" r3 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=112 dst=r2 src=r1 offset=46 imm=0 + // EBPF_OP_LDXB pc=116 dst=r2 src=r1 offset=46 imm=0 #line 32 "sample/./xdp_common.h" r2 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(46)); - // EBPF_OP_OR64_REG pc=113 dst=r3 src=r2 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=117 dst=r3 src=r2 offset=0 imm=0 #line 32 "sample/./xdp_common.h" r3 |= r2; - // EBPF_OP_LDXB pc=114 dst=r2 src=r1 offset=49 imm=0 + // EBPF_OP_LDXB pc=118 dst=r2 src=r1 offset=49 imm=0 #line 32 "sample/./xdp_common.h" r2 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(49)); - // EBPF_OP_LSH64_IMM pc=115 dst=r2 src=r0 offset=0 imm=8 + // EBPF_OP_LSH64_IMM pc=119 dst=r2 src=r0 offset=0 imm=8 #line 32 "sample/./xdp_common.h" r2 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=116 dst=r4 src=r1 offset=48 imm=0 + // EBPF_OP_LDXB pc=120 dst=r4 src=r1 offset=48 imm=0 #line 32 "sample/./xdp_common.h" r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(48)); - // EBPF_OP_OR64_REG pc=117 dst=r2 src=r4 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=121 dst=r2 src=r4 offset=0 imm=0 #line 32 "sample/./xdp_common.h" r2 |= r4; - // EBPF_OP_LSH64_IMM pc=118 dst=r2 src=r0 offset=0 imm=16 + // EBPF_OP_LSH64_IMM pc=122 dst=r2 src=r0 offset=0 imm=16 #line 32 "sample/./xdp_common.h" r2 <<= (IMMEDIATE(16) & 63); - // EBPF_OP_OR64_REG pc=119 dst=r2 src=r3 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=123 dst=r2 src=r3 offset=0 imm=0 #line 32 "sample/./xdp_common.h" r2 |= r3; - // EBPF_OP_LDXB pc=120 dst=r4 src=r1 offset=51 imm=0 + // EBPF_OP_LDXB pc=124 dst=r4 src=r1 offset=51 imm=0 #line 32 "sample/./xdp_common.h" r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(51)); - // EBPF_OP_LSH64_IMM pc=121 dst=r4 src=r0 offset=0 imm=8 + // EBPF_OP_LSH64_IMM pc=125 dst=r4 src=r0 offset=0 imm=8 #line 32 "sample/./xdp_common.h" r4 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=122 dst=r3 src=r1 offset=50 imm=0 + // EBPF_OP_LDXB pc=126 dst=r3 src=r1 offset=50 imm=0 #line 32 "sample/./xdp_common.h" r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(50)); - // EBPF_OP_OR64_REG pc=123 dst=r4 src=r3 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=127 dst=r4 src=r3 offset=0 imm=0 #line 32 "sample/./xdp_common.h" r4 |= r3; - // EBPF_OP_LDXB pc=124 dst=r3 src=r1 offset=53 imm=0 + // EBPF_OP_LDXB pc=128 dst=r3 src=r1 offset=53 imm=0 #line 32 "sample/./xdp_common.h" r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(53)); - // EBPF_OP_LSH64_IMM pc=125 dst=r3 src=r0 offset=0 imm=8 + // EBPF_OP_LSH64_IMM pc=129 dst=r3 src=r0 offset=0 imm=8 #line 32 "sample/./xdp_common.h" r3 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=126 dst=r5 src=r1 offset=52 imm=0 + // EBPF_OP_LDXB pc=130 dst=r5 src=r1 offset=52 imm=0 #line 32 "sample/./xdp_common.h" r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(52)); - // EBPF_OP_OR64_REG pc=127 dst=r3 src=r5 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=131 dst=r3 src=r5 offset=0 imm=0 #line 32 "sample/./xdp_common.h" r3 |= r5; - // EBPF_OP_LSH64_IMM pc=128 dst=r3 src=r0 offset=0 imm=16 + // EBPF_OP_LSH64_IMM pc=132 dst=r3 src=r0 offset=0 imm=16 #line 32 "sample/./xdp_common.h" r3 <<= (IMMEDIATE(16) & 63); - // EBPF_OP_OR64_REG pc=129 dst=r3 src=r4 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=133 dst=r3 src=r4 offset=0 imm=0 #line 32 "sample/./xdp_common.h" r3 |= r4; - // EBPF_OP_LSH64_IMM pc=130 dst=r3 src=r0 offset=0 imm=32 + // EBPF_OP_LSH64_IMM pc=134 dst=r3 src=r0 offset=0 imm=32 #line 32 "sample/./xdp_common.h" r3 <<= (IMMEDIATE(32) & 63); - // EBPF_OP_OR64_REG pc=131 dst=r3 src=r2 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=135 dst=r3 src=r2 offset=0 imm=0 #line 32 "sample/./xdp_common.h" r3 |= r2; - // EBPF_OP_LDXB pc=132 dst=r4 src=r1 offset=39 imm=0 + // EBPF_OP_LDXB pc=136 dst=r4 src=r1 offset=39 imm=0 #line 32 "sample/./xdp_common.h" r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(39)); - // EBPF_OP_LSH64_IMM pc=133 dst=r4 src=r0 offset=0 imm=8 + // EBPF_OP_LSH64_IMM pc=137 dst=r4 src=r0 offset=0 imm=8 #line 32 "sample/./xdp_common.h" r4 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=134 dst=r2 src=r1 offset=38 imm=0 + // EBPF_OP_LDXB pc=138 dst=r2 src=r1 offset=38 imm=0 #line 32 "sample/./xdp_common.h" r2 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(38)); - // EBPF_OP_OR64_REG pc=135 dst=r4 src=r2 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=139 dst=r4 src=r2 offset=0 imm=0 #line 32 "sample/./xdp_common.h" r4 |= r2; - // EBPF_OP_LDXB pc=136 dst=r2 src=r1 offset=41 imm=0 + // EBPF_OP_LDXB pc=140 dst=r2 src=r1 offset=41 imm=0 #line 32 "sample/./xdp_common.h" r2 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(41)); - // EBPF_OP_LSH64_IMM pc=137 dst=r2 src=r0 offset=0 imm=8 + // EBPF_OP_LSH64_IMM pc=141 dst=r2 src=r0 offset=0 imm=8 #line 32 "sample/./xdp_common.h" r2 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=138 dst=r5 src=r1 offset=40 imm=0 + // EBPF_OP_LDXB pc=142 dst=r5 src=r1 offset=40 imm=0 #line 32 "sample/./xdp_common.h" r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(40)); - // EBPF_OP_OR64_REG pc=139 dst=r2 src=r5 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=143 dst=r2 src=r5 offset=0 imm=0 #line 32 "sample/./xdp_common.h" r2 |= r5; - // EBPF_OP_STXDW pc=140 dst=r10 src=r3 offset=-8 imm=0 + // EBPF_OP_STXDW pc=144 dst=r10 src=r3 offset=-8 imm=0 #line 32 "sample/./xdp_common.h" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-8)) = (uint64_t)r3; - // EBPF_OP_LSH64_IMM pc=141 dst=r2 src=r0 offset=0 imm=16 + // EBPF_OP_LSH64_IMM pc=145 dst=r2 src=r0 offset=0 imm=16 #line 32 "sample/./xdp_common.h" r2 <<= (IMMEDIATE(16) & 63); - // EBPF_OP_OR64_REG pc=142 dst=r2 src=r4 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=146 dst=r2 src=r4 offset=0 imm=0 #line 32 "sample/./xdp_common.h" r2 |= r4; - // EBPF_OP_LDXB pc=143 dst=r3 src=r1 offset=43 imm=0 + // EBPF_OP_LDXB pc=147 dst=r3 src=r1 offset=43 imm=0 #line 32 "sample/./xdp_common.h" r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(43)); - // EBPF_OP_LSH64_IMM pc=144 dst=r3 src=r0 offset=0 imm=8 + // EBPF_OP_LSH64_IMM pc=148 dst=r3 src=r0 offset=0 imm=8 #line 32 "sample/./xdp_common.h" r3 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=145 dst=r4 src=r1 offset=42 imm=0 + // EBPF_OP_LDXB pc=149 dst=r4 src=r1 offset=42 imm=0 #line 32 "sample/./xdp_common.h" r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(42)); - // EBPF_OP_OR64_REG pc=146 dst=r3 src=r4 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=150 dst=r3 src=r4 offset=0 imm=0 #line 32 "sample/./xdp_common.h" r3 |= r4; - // EBPF_OP_LDXB pc=147 dst=r4 src=r1 offset=45 imm=0 + // EBPF_OP_LDXB pc=151 dst=r4 src=r1 offset=45 imm=0 #line 32 "sample/./xdp_common.h" r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(45)); - // EBPF_OP_LSH64_IMM pc=148 dst=r4 src=r0 offset=0 imm=8 + // EBPF_OP_LSH64_IMM pc=152 dst=r4 src=r0 offset=0 imm=8 #line 32 "sample/./xdp_common.h" r4 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=149 dst=r5 src=r1 offset=44 imm=0 + // EBPF_OP_LDXB pc=153 dst=r5 src=r1 offset=44 imm=0 #line 32 "sample/./xdp_common.h" r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(44)); - // EBPF_OP_OR64_REG pc=150 dst=r4 src=r5 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=154 dst=r4 src=r5 offset=0 imm=0 #line 32 "sample/./xdp_common.h" r4 |= r5; - // EBPF_OP_LSH64_IMM pc=151 dst=r4 src=r0 offset=0 imm=16 + // EBPF_OP_LSH64_IMM pc=155 dst=r4 src=r0 offset=0 imm=16 #line 32 "sample/./xdp_common.h" r4 <<= (IMMEDIATE(16) & 63); - // EBPF_OP_OR64_REG pc=152 dst=r4 src=r3 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=156 dst=r4 src=r3 offset=0 imm=0 #line 32 "sample/./xdp_common.h" r4 |= r3; - // EBPF_OP_LSH64_IMM pc=153 dst=r4 src=r0 offset=0 imm=32 + // EBPF_OP_LSH64_IMM pc=157 dst=r4 src=r0 offset=0 imm=32 #line 32 "sample/./xdp_common.h" r4 <<= (IMMEDIATE(32) & 63); - // EBPF_OP_OR64_REG pc=154 dst=r4 src=r2 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=158 dst=r4 src=r2 offset=0 imm=0 #line 32 "sample/./xdp_common.h" r4 |= r2; - // EBPF_OP_STXDW pc=155 dst=r10 src=r4 offset=-16 imm=0 + // EBPF_OP_STXDW pc=159 dst=r10 src=r4 offset=-16 imm=0 #line 32 "sample/./xdp_common.h" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-16)) = (uint64_t)r4; - // EBPF_OP_LDXW pc=156 dst=r2 src=r1 offset=22 imm=0 + // EBPF_OP_LDXW pc=160 dst=r2 src=r1 offset=22 imm=0 #line 33 "sample/./xdp_common.h" r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(22)); - // EBPF_OP_STXW pc=157 dst=r1 src=r2 offset=38 imm=0 + // EBPF_OP_STXW pc=161 dst=r1 src=r2 offset=38 imm=0 #line 33 "sample/./xdp_common.h" *(uint32_t*)(uintptr_t)(r1 + OFFSET(38)) = (uint32_t)r2; - // EBPF_OP_LDXW pc=158 dst=r2 src=r1 offset=26 imm=0 + // EBPF_OP_LDXW pc=162 dst=r2 src=r1 offset=26 imm=0 #line 33 "sample/./xdp_common.h" r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(26)); - // EBPF_OP_STXW pc=159 dst=r1 src=r2 offset=42 imm=0 + // EBPF_OP_STXW pc=163 dst=r1 src=r2 offset=42 imm=0 #line 33 "sample/./xdp_common.h" *(uint32_t*)(uintptr_t)(r1 + OFFSET(42)) = (uint32_t)r2; - // EBPF_OP_LDXW pc=160 dst=r2 src=r1 offset=30 imm=0 + // EBPF_OP_LDXW pc=164 dst=r2 src=r1 offset=30 imm=0 #line 33 "sample/./xdp_common.h" r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(30)); - // EBPF_OP_STXW pc=161 dst=r1 src=r2 offset=46 imm=0 + // EBPF_OP_STXW pc=165 dst=r1 src=r2 offset=46 imm=0 #line 33 "sample/./xdp_common.h" *(uint32_t*)(uintptr_t)(r1 + OFFSET(46)) = (uint32_t)r2; - // EBPF_OP_LDXW pc=162 dst=r2 src=r1 offset=34 imm=0 + // EBPF_OP_LDXW pc=166 dst=r2 src=r1 offset=34 imm=0 #line 33 "sample/./xdp_common.h" r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(34)); - // EBPF_OP_STXW pc=163 dst=r1 src=r2 offset=50 imm=0 + // EBPF_OP_STXW pc=167 dst=r1 src=r2 offset=50 imm=0 #line 33 "sample/./xdp_common.h" *(uint32_t*)(uintptr_t)(r1 + OFFSET(50)) = (uint32_t)r2; - // EBPF_OP_LDXDW pc=164 dst=r2 src=r10 offset=-16 imm=0 + // EBPF_OP_LDXDW pc=168 dst=r2 src=r10 offset=-16 imm=0 #line 34 "sample/./xdp_common.h" r2 = *(uint64_t*)(uintptr_t)(r10 + OFFSET(-16)); - // EBPF_OP_MOV64_REG pc=165 dst=r3 src=r2 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=169 dst=r3 src=r2 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r3 = r2; - // EBPF_OP_RSH64_IMM pc=166 dst=r3 src=r0 offset=0 imm=48 + // EBPF_OP_RSH64_IMM pc=170 dst=r3 src=r0 offset=0 imm=48 #line 34 "sample/./xdp_common.h" r3 >>= (IMMEDIATE(48) & 63); - // EBPF_OP_STXB pc=167 dst=r1 src=r3 offset=28 imm=0 + // EBPF_OP_STXB pc=171 dst=r1 src=r3 offset=28 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(28)) = (uint8_t)r3; - // EBPF_OP_MOV64_REG pc=168 dst=r3 src=r2 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=172 dst=r3 src=r2 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r3 = r2; - // EBPF_OP_RSH64_IMM pc=169 dst=r3 src=r0 offset=0 imm=56 + // EBPF_OP_RSH64_IMM pc=173 dst=r3 src=r0 offset=0 imm=56 #line 34 "sample/./xdp_common.h" r3 >>= (IMMEDIATE(56) & 63); - // EBPF_OP_STXB pc=170 dst=r1 src=r3 offset=29 imm=0 + // EBPF_OP_STXB pc=174 dst=r1 src=r3 offset=29 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(29)) = (uint8_t)r3; - // EBPF_OP_MOV64_REG pc=171 dst=r3 src=r2 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=175 dst=r3 src=r2 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r3 = r2; - // EBPF_OP_RSH64_IMM pc=172 dst=r3 src=r0 offset=0 imm=32 + // EBPF_OP_RSH64_IMM pc=176 dst=r3 src=r0 offset=0 imm=32 #line 34 "sample/./xdp_common.h" r3 >>= (IMMEDIATE(32) & 63); - // EBPF_OP_STXB pc=173 dst=r1 src=r3 offset=26 imm=0 + // EBPF_OP_STXB pc=177 dst=r1 src=r3 offset=26 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(26)) = (uint8_t)r3; - // EBPF_OP_MOV64_REG pc=174 dst=r3 src=r2 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=178 dst=r3 src=r2 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r3 = r2; - // EBPF_OP_RSH64_IMM pc=175 dst=r3 src=r0 offset=0 imm=40 + // EBPF_OP_RSH64_IMM pc=179 dst=r3 src=r0 offset=0 imm=40 #line 34 "sample/./xdp_common.h" r3 >>= (IMMEDIATE(40) & 63); - // EBPF_OP_STXB pc=176 dst=r1 src=r3 offset=27 imm=0 + // EBPF_OP_STXB pc=180 dst=r1 src=r3 offset=27 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(27)) = (uint8_t)r3; - // EBPF_OP_MOV64_REG pc=177 dst=r3 src=r2 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=181 dst=r3 src=r2 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r3 = r2; - // EBPF_OP_RSH64_IMM pc=178 dst=r3 src=r0 offset=0 imm=16 + // EBPF_OP_RSH64_IMM pc=182 dst=r3 src=r0 offset=0 imm=16 #line 34 "sample/./xdp_common.h" r3 >>= (IMMEDIATE(16) & 63); - // EBPF_OP_STXB pc=179 dst=r1 src=r3 offset=24 imm=0 + // EBPF_OP_STXB pc=183 dst=r1 src=r3 offset=24 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(24)) = (uint8_t)r3; - // EBPF_OP_MOV64_REG pc=180 dst=r3 src=r2 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=184 dst=r3 src=r2 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r3 = r2; - // EBPF_OP_RSH64_IMM pc=181 dst=r3 src=r0 offset=0 imm=24 + // EBPF_OP_RSH64_IMM pc=185 dst=r3 src=r0 offset=0 imm=24 #line 34 "sample/./xdp_common.h" r3 >>= (IMMEDIATE(24) & 63); - // EBPF_OP_STXB pc=182 dst=r1 src=r3 offset=25 imm=0 + // EBPF_OP_STXB pc=186 dst=r1 src=r3 offset=25 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(25)) = (uint8_t)r3; - // EBPF_OP_STXB pc=183 dst=r1 src=r2 offset=22 imm=0 + // EBPF_OP_STXB pc=187 dst=r1 src=r2 offset=22 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(22)) = (uint8_t)r2; - // EBPF_OP_RSH64_IMM pc=184 dst=r2 src=r0 offset=0 imm=8 + // EBPF_OP_RSH64_IMM pc=188 dst=r2 src=r0 offset=0 imm=8 #line 34 "sample/./xdp_common.h" r2 >>= (IMMEDIATE(8) & 63); - // EBPF_OP_STXB pc=185 dst=r1 src=r2 offset=23 imm=0 + // EBPF_OP_STXB pc=189 dst=r1 src=r2 offset=23 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(23)) = (uint8_t)r2; - // EBPF_OP_LDXDW pc=186 dst=r2 src=r10 offset=-8 imm=0 + // EBPF_OP_LDXDW pc=190 dst=r2 src=r10 offset=-8 imm=0 #line 34 "sample/./xdp_common.h" r2 = *(uint64_t*)(uintptr_t)(r10 + OFFSET(-8)); - // EBPF_OP_MOV64_REG pc=187 dst=r3 src=r2 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=191 dst=r3 src=r2 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r3 = r2; - // EBPF_OP_RSH64_IMM pc=188 dst=r3 src=r0 offset=0 imm=48 + // EBPF_OP_RSH64_IMM pc=192 dst=r3 src=r0 offset=0 imm=48 #line 34 "sample/./xdp_common.h" r3 >>= (IMMEDIATE(48) & 63); - // EBPF_OP_STXB pc=189 dst=r1 src=r3 offset=36 imm=0 + // EBPF_OP_STXB pc=193 dst=r1 src=r3 offset=36 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(36)) = (uint8_t)r3; - // EBPF_OP_MOV64_REG pc=190 dst=r3 src=r2 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=194 dst=r3 src=r2 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r3 = r2; - // EBPF_OP_RSH64_IMM pc=191 dst=r3 src=r0 offset=0 imm=56 + // EBPF_OP_RSH64_IMM pc=195 dst=r3 src=r0 offset=0 imm=56 #line 34 "sample/./xdp_common.h" r3 >>= (IMMEDIATE(56) & 63); - // EBPF_OP_STXB pc=192 dst=r1 src=r3 offset=37 imm=0 + // EBPF_OP_STXB pc=196 dst=r1 src=r3 offset=37 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(37)) = (uint8_t)r3; - // EBPF_OP_MOV64_REG pc=193 dst=r3 src=r2 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=197 dst=r3 src=r2 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r3 = r2; - // EBPF_OP_RSH64_IMM pc=194 dst=r3 src=r0 offset=0 imm=32 + // EBPF_OP_RSH64_IMM pc=198 dst=r3 src=r0 offset=0 imm=32 #line 34 "sample/./xdp_common.h" r3 >>= (IMMEDIATE(32) & 63); - // EBPF_OP_STXB pc=195 dst=r1 src=r3 offset=34 imm=0 + // EBPF_OP_STXB pc=199 dst=r1 src=r3 offset=34 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(34)) = (uint8_t)r3; - // EBPF_OP_MOV64_REG pc=196 dst=r3 src=r2 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=200 dst=r3 src=r2 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r3 = r2; - // EBPF_OP_RSH64_IMM pc=197 dst=r3 src=r0 offset=0 imm=40 + // EBPF_OP_RSH64_IMM pc=201 dst=r3 src=r0 offset=0 imm=40 #line 34 "sample/./xdp_common.h" r3 >>= (IMMEDIATE(40) & 63); - // EBPF_OP_STXB pc=198 dst=r1 src=r3 offset=35 imm=0 + // EBPF_OP_STXB pc=202 dst=r1 src=r3 offset=35 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(35)) = (uint8_t)r3; - // EBPF_OP_MOV64_REG pc=199 dst=r3 src=r2 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=203 dst=r3 src=r2 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r3 = r2; - // EBPF_OP_RSH64_IMM pc=200 dst=r3 src=r0 offset=0 imm=16 + // EBPF_OP_RSH64_IMM pc=204 dst=r3 src=r0 offset=0 imm=16 #line 34 "sample/./xdp_common.h" r3 >>= (IMMEDIATE(16) & 63); - // EBPF_OP_STXB pc=201 dst=r1 src=r3 offset=32 imm=0 + // EBPF_OP_STXB pc=205 dst=r1 src=r3 offset=32 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(32)) = (uint8_t)r3; - // EBPF_OP_MOV64_REG pc=202 dst=r3 src=r2 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=206 dst=r3 src=r2 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r3 = r2; - // EBPF_OP_RSH64_IMM pc=203 dst=r3 src=r0 offset=0 imm=24 + // EBPF_OP_RSH64_IMM pc=207 dst=r3 src=r0 offset=0 imm=24 #line 34 "sample/./xdp_common.h" r3 >>= (IMMEDIATE(24) & 63); - // EBPF_OP_STXB pc=204 dst=r1 src=r3 offset=33 imm=0 + // EBPF_OP_STXB pc=208 dst=r1 src=r3 offset=33 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(33)) = (uint8_t)r3; - // EBPF_OP_STXB pc=205 dst=r1 src=r2 offset=30 imm=0 + // EBPF_OP_STXB pc=209 dst=r1 src=r2 offset=30 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(30)) = (uint8_t)r2; - // EBPF_OP_RSH64_IMM pc=206 dst=r2 src=r0 offset=0 imm=8 + // EBPF_OP_RSH64_IMM pc=210 dst=r2 src=r0 offset=0 imm=8 #line 34 "sample/./xdp_common.h" r2 >>= (IMMEDIATE(8) & 63); - // EBPF_OP_STXB pc=207 dst=r1 src=r2 offset=31 imm=0 + // EBPF_OP_STXB pc=211 dst=r1 src=r2 offset=31 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(31)) = (uint8_t)r2; + // EBPF_OP_LDXH pc=212 dst=r2 src=r1 offset=54 imm=0 +#line 40 "sample/./xdp_common.h" + r2 = *(uint16_t*)(uintptr_t)(r1 + OFFSET(54)); + // EBPF_OP_STXH pc=213 dst=r1 src=r2 offset=56 imm=0 +#line 42 "sample/./xdp_common.h" + *(uint16_t*)(uintptr_t)(r1 + OFFSET(56)) = (uint16_t)r2; + // EBPF_OP_MOV64_IMM pc=214 dst=r2 src=r0 offset=0 imm=7459 +#line 42 "sample/./xdp_common.h" + r2 = IMMEDIATE(7459); + // EBPF_OP_STXH pc=215 dst=r1 src=r2 offset=54 imm=0 +#line 41 "sample/./xdp_common.h" + *(uint16_t*)(uintptr_t)(r1 + OFFSET(54)) = (uint16_t)r2; label_2: - // EBPF_OP_MOV64_IMM pc=208 dst=r0 src=r0 offset=0 imm=3 -#line 34 "sample/./xdp_common.h" + // EBPF_OP_MOV64_IMM pc=216 dst=r0 src=r0 offset=0 imm=3 +#line 41 "sample/./xdp_common.h" r0 = IMMEDIATE(3); label_3: - // EBPF_OP_EXIT pc=209 dst=r0 src=r0 offset=0 imm=0 -#line 34 "sample/./xdp_common.h" + // EBPF_OP_EXIT pc=217 dst=r0 src=r0 offset=0 imm=0 +#line 41 "sample/./xdp_common.h" return r0; -#line 34 "sample/./xdp_common.h" +#line 41 "sample/./xdp_common.h" } #pragma code_seg(pop) #line __LINE__ __FILE__ @@ -750,7 +774,7 @@ static program_entry_t _programs[] = { 0, NULL, 0, - 210, + 218, &reflect_packet_program_type_guid, &reflect_packet_attach_type_guid, }, diff --git a/tests/bpf2c_tests/expected/reflect_packet_raw.c b/tests/bpf2c_tests/expected/reflect_packet_raw.c index cdc3c626ed..ece10eb1c0 100644 --- a/tests/bpf2c_tests/expected/reflect_packet_raw.c +++ b/tests/bpf2c_tests/expected/reflect_packet_raw.c @@ -55,32 +55,32 @@ reflect_packet(void* context) // EBPF_OP_MOV64_IMM pc=0 dst=r0 src=r0 offset=0 imm=1 #line 23 "sample/reflect_packet.c" r0 = IMMEDIATE(1); - // EBPF_OP_LDXDW pc=1 dst=r2 src=r1 offset=8 imm=0 + // EBPF_OP_LDXDW pc=1 dst=r3 src=r1 offset=8 imm=0 #line 29 "sample/reflect_packet.c" - r2 = *(uint64_t*)(uintptr_t)(r1 + OFFSET(8)); + r3 = *(uint64_t*)(uintptr_t)(r1 + OFFSET(8)); // EBPF_OP_LDXDW pc=2 dst=r1 src=r1 offset=0 imm=0 #line 28 "sample/reflect_packet.c" r1 = *(uint64_t*)(uintptr_t)(r1 + OFFSET(0)); - // EBPF_OP_MOV64_REG pc=3 dst=r3 src=r1 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=3 dst=r2 src=r1 offset=0 imm=0 #line 29 "sample/reflect_packet.c" - r3 = r1; - // EBPF_OP_ADD64_IMM pc=4 dst=r3 src=r0 offset=0 imm=14 + r2 = r1; + // EBPF_OP_ADD64_IMM pc=4 dst=r2 src=r0 offset=0 imm=14 #line 29 "sample/reflect_packet.c" - r3 += IMMEDIATE(14); - // EBPF_OP_JGT_REG pc=5 dst=r3 src=r2 offset=203 imm=0 + r2 += IMMEDIATE(14); + // EBPF_OP_JGT_REG pc=5 dst=r2 src=r3 offset=211 imm=0 #line 29 "sample/reflect_packet.c" - if (r3 > r2) + if (r2 > r3) #line 29 "sample/reflect_packet.c" goto label_3; // EBPF_OP_LDXH pc=6 dst=r4 src=r1 offset=12 imm=0 #line 34 "sample/reflect_packet.c" r4 = *(uint16_t*)(uintptr_t)(r1 + OFFSET(12)); - // EBPF_OP_JEQ_IMM pc=7 dst=r4 src=r0 offset=56 imm=56710 + // EBPF_OP_JEQ_IMM pc=7 dst=r4 src=r0 offset=60 imm=56710 #line 34 "sample/reflect_packet.c" if (r4 == IMMEDIATE(56710)) #line 34 "sample/reflect_packet.c" goto label_1; - // EBPF_OP_JNE_IMM pc=8 dst=r4 src=r0 offset=200 imm=8 + // EBPF_OP_JNE_IMM pc=8 dst=r4 src=r0 offset=208 imm=8 #line 34 "sample/reflect_packet.c" if (r4 != IMMEDIATE(8)) #line 34 "sample/reflect_packet.c" @@ -91,15 +91,15 @@ reflect_packet(void* context) // EBPF_OP_ADD64_IMM pc=10 dst=r4 src=r0 offset=0 imm=34 #line 35 "sample/reflect_packet.c" r4 += IMMEDIATE(34); - // EBPF_OP_JGT_REG pc=11 dst=r4 src=r2 offset=197 imm=0 + // EBPF_OP_JGT_REG pc=11 dst=r4 src=r3 offset=205 imm=0 #line 35 "sample/reflect_packet.c" - if (r4 > r2) + if (r4 > r3) #line 35 "sample/reflect_packet.c" goto label_3; // EBPF_OP_LDXB pc=12 dst=r4 src=r1 offset=23 imm=0 #line 41 "sample/reflect_packet.c" r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(23)); - // EBPF_OP_JNE_IMM pc=13 dst=r4 src=r0 offset=195 imm=17 + // EBPF_OP_JNE_IMM pc=13 dst=r4 src=r0 offset=203 imm=17 #line 41 "sample/reflect_packet.c" if (r4 != IMMEDIATE(17)) #line 41 "sample/reflect_packet.c" @@ -113,601 +113,625 @@ reflect_packet(void* context) // EBPF_OP_AND64_IMM pc=16 dst=r4 src=r0 offset=0 imm=60 #line 41 "sample/reflect_packet.c" r4 &= IMMEDIATE(60); - // EBPF_OP_ADD64_REG pc=17 dst=r3 src=r4 offset=0 imm=0 + // EBPF_OP_ADD64_REG pc=17 dst=r2 src=r4 offset=0 imm=0 #line 41 "sample/reflect_packet.c" - r3 += r4; - // EBPF_OP_MOV64_REG pc=18 dst=r4 src=r3 offset=0 imm=0 + r2 += r4; + // EBPF_OP_MOV64_REG pc=18 dst=r4 src=r2 offset=0 imm=0 #line 41 "sample/reflect_packet.c" - r4 = r3; + r4 = r2; // EBPF_OP_ADD64_IMM pc=19 dst=r4 src=r0 offset=0 imm=8 #line 41 "sample/reflect_packet.c" r4 += IMMEDIATE(8); - // EBPF_OP_JGT_REG pc=20 dst=r4 src=r2 offset=188 imm=0 + // EBPF_OP_JGT_REG pc=20 dst=r4 src=r3 offset=196 imm=0 #line 41 "sample/reflect_packet.c" - if (r4 > r2) + if (r4 > r3) #line 41 "sample/reflect_packet.c" goto label_3; - // EBPF_OP_LDXH pc=21 dst=r2 src=r3 offset=2 imm=0 + // EBPF_OP_LDXH pc=21 dst=r3 src=r2 offset=2 imm=0 #line 47 "sample/reflect_packet.c" - r2 = *(uint16_t*)(uintptr_t)(r3 + OFFSET(2)); - // EBPF_OP_JNE_IMM pc=22 dst=r2 src=r0 offset=186 imm=7459 + r3 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(2)); + // EBPF_OP_JNE_IMM pc=22 dst=r3 src=r0 offset=194 imm=7459 #line 47 "sample/reflect_packet.c" - if (r2 != IMMEDIATE(7459)) + if (r3 != IMMEDIATE(7459)) #line 47 "sample/reflect_packet.c" goto label_3; - // EBPF_OP_LDXB pc=23 dst=r2 src=r1 offset=5 imm=0 + // EBPF_OP_LDXB pc=23 dst=r3 src=r1 offset=5 imm=0 #line 15 "sample/./xdp_common.h" - r2 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(5)); - // EBPF_OP_LSH64_IMM pc=24 dst=r2 src=r0 offset=0 imm=8 + r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(5)); + // EBPF_OP_LSH64_IMM pc=24 dst=r3 src=r0 offset=0 imm=8 #line 15 "sample/./xdp_common.h" - r2 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=25 dst=r3 src=r1 offset=4 imm=0 + r3 <<= (IMMEDIATE(8) & 63); + // EBPF_OP_LDXB pc=25 dst=r4 src=r1 offset=4 imm=0 #line 15 "sample/./xdp_common.h" - r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(4)); - // EBPF_OP_OR64_REG pc=26 dst=r2 src=r3 offset=0 imm=0 + r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(4)); + // EBPF_OP_OR64_REG pc=26 dst=r3 src=r4 offset=0 imm=0 #line 15 "sample/./xdp_common.h" - r2 |= r3; - // EBPF_OP_STXH pc=27 dst=r10 src=r2 offset=-12 imm=0 + r3 |= r4; + // EBPF_OP_STXH pc=27 dst=r10 src=r3 offset=-12 imm=0 #line 15 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r10 + OFFSET(-12)) = (uint16_t)r2; - // EBPF_OP_LDXB pc=28 dst=r2 src=r1 offset=1 imm=0 + *(uint16_t*)(uintptr_t)(r10 + OFFSET(-12)) = (uint16_t)r3; + // EBPF_OP_LDXB pc=28 dst=r3 src=r1 offset=1 imm=0 #line 15 "sample/./xdp_common.h" - r2 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(1)); - // EBPF_OP_LSH64_IMM pc=29 dst=r2 src=r0 offset=0 imm=8 + r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(1)); + // EBPF_OP_LSH64_IMM pc=29 dst=r3 src=r0 offset=0 imm=8 #line 15 "sample/./xdp_common.h" - r2 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=30 dst=r3 src=r1 offset=0 imm=0 + r3 <<= (IMMEDIATE(8) & 63); + // EBPF_OP_LDXB pc=30 dst=r4 src=r1 offset=0 imm=0 #line 15 "sample/./xdp_common.h" - r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(0)); - // EBPF_OP_OR64_REG pc=31 dst=r2 src=r3 offset=0 imm=0 + r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(0)); + // EBPF_OP_OR64_REG pc=31 dst=r3 src=r4 offset=0 imm=0 #line 15 "sample/./xdp_common.h" - r2 |= r3; - // EBPF_OP_LDXB pc=32 dst=r3 src=r1 offset=3 imm=0 + r3 |= r4; + // EBPF_OP_LDXB pc=32 dst=r4 src=r1 offset=3 imm=0 #line 15 "sample/./xdp_common.h" - r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(3)); - // EBPF_OP_LSH64_IMM pc=33 dst=r3 src=r0 offset=0 imm=8 + r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(3)); + // EBPF_OP_LSH64_IMM pc=33 dst=r4 src=r0 offset=0 imm=8 #line 15 "sample/./xdp_common.h" - r3 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=34 dst=r4 src=r1 offset=2 imm=0 + r4 <<= (IMMEDIATE(8) & 63); + // EBPF_OP_LDXB pc=34 dst=r5 src=r1 offset=2 imm=0 #line 15 "sample/./xdp_common.h" - r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(2)); - // EBPF_OP_OR64_REG pc=35 dst=r3 src=r4 offset=0 imm=0 + r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(2)); + // EBPF_OP_OR64_REG pc=35 dst=r4 src=r5 offset=0 imm=0 #line 15 "sample/./xdp_common.h" - r3 |= r4; - // EBPF_OP_LSH64_IMM pc=36 dst=r3 src=r0 offset=0 imm=16 + r4 |= r5; + // EBPF_OP_LSH64_IMM pc=36 dst=r4 src=r0 offset=0 imm=16 #line 15 "sample/./xdp_common.h" - r3 <<= (IMMEDIATE(16) & 63); - // EBPF_OP_OR64_REG pc=37 dst=r3 src=r2 offset=0 imm=0 + r4 <<= (IMMEDIATE(16) & 63); + // EBPF_OP_OR64_REG pc=37 dst=r4 src=r3 offset=0 imm=0 #line 15 "sample/./xdp_common.h" - r3 |= r2; - // EBPF_OP_STXW pc=38 dst=r10 src=r3 offset=-16 imm=0 + r4 |= r3; + // EBPF_OP_STXW pc=38 dst=r10 src=r4 offset=-16 imm=0 #line 15 "sample/./xdp_common.h" - *(uint32_t*)(uintptr_t)(r10 + OFFSET(-16)) = (uint32_t)r3; - // EBPF_OP_LDXH pc=39 dst=r2 src=r1 offset=6 imm=0 + *(uint32_t*)(uintptr_t)(r10 + OFFSET(-16)) = (uint32_t)r4; + // EBPF_OP_LDXH pc=39 dst=r3 src=r1 offset=6 imm=0 #line 16 "sample/./xdp_common.h" - r2 = *(uint16_t*)(uintptr_t)(r1 + OFFSET(6)); - // EBPF_OP_STXH pc=40 dst=r1 src=r2 offset=0 imm=0 + r3 = *(uint16_t*)(uintptr_t)(r1 + OFFSET(6)); + // EBPF_OP_STXH pc=40 dst=r1 src=r3 offset=0 imm=0 #line 16 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r1 + OFFSET(0)) = (uint16_t)r2; - // EBPF_OP_LDXH pc=41 dst=r2 src=r1 offset=8 imm=0 + *(uint16_t*)(uintptr_t)(r1 + OFFSET(0)) = (uint16_t)r3; + // EBPF_OP_LDXH pc=41 dst=r3 src=r1 offset=8 imm=0 #line 16 "sample/./xdp_common.h" - r2 = *(uint16_t*)(uintptr_t)(r1 + OFFSET(8)); - // EBPF_OP_STXH pc=42 dst=r1 src=r2 offset=2 imm=0 + r3 = *(uint16_t*)(uintptr_t)(r1 + OFFSET(8)); + // EBPF_OP_STXH pc=42 dst=r1 src=r3 offset=2 imm=0 #line 16 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r1 + OFFSET(2)) = (uint16_t)r2; - // EBPF_OP_LDXH pc=43 dst=r2 src=r1 offset=10 imm=0 + *(uint16_t*)(uintptr_t)(r1 + OFFSET(2)) = (uint16_t)r3; + // EBPF_OP_LDXH pc=43 dst=r3 src=r1 offset=10 imm=0 #line 16 "sample/./xdp_common.h" - r2 = *(uint16_t*)(uintptr_t)(r1 + OFFSET(10)); - // EBPF_OP_STXH pc=44 dst=r1 src=r2 offset=4 imm=0 + r3 = *(uint16_t*)(uintptr_t)(r1 + OFFSET(10)); + // EBPF_OP_STXH pc=44 dst=r1 src=r3 offset=4 imm=0 #line 16 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r1 + OFFSET(4)) = (uint16_t)r2; - // EBPF_OP_LDXW pc=45 dst=r2 src=r10 offset=-16 imm=0 + *(uint16_t*)(uintptr_t)(r1 + OFFSET(4)) = (uint16_t)r3; + // EBPF_OP_LDXW pc=45 dst=r3 src=r10 offset=-16 imm=0 #line 17 "sample/./xdp_common.h" - r2 = *(uint32_t*)(uintptr_t)(r10 + OFFSET(-16)); - // EBPF_OP_MOV64_REG pc=46 dst=r3 src=r2 offset=0 imm=0 + r3 = *(uint32_t*)(uintptr_t)(r10 + OFFSET(-16)); + // EBPF_OP_MOV64_REG pc=46 dst=r4 src=r3 offset=0 imm=0 #line 17 "sample/./xdp_common.h" - r3 = r2; - // EBPF_OP_RSH64_IMM pc=47 dst=r3 src=r0 offset=0 imm=16 + r4 = r3; + // EBPF_OP_RSH64_IMM pc=47 dst=r4 src=r0 offset=0 imm=16 #line 17 "sample/./xdp_common.h" - r3 >>= (IMMEDIATE(16) & 63); - // EBPF_OP_STXB pc=48 dst=r1 src=r3 offset=8 imm=0 + r4 >>= (IMMEDIATE(16) & 63); + // EBPF_OP_STXB pc=48 dst=r1 src=r4 offset=8 imm=0 #line 17 "sample/./xdp_common.h" - *(uint8_t*)(uintptr_t)(r1 + OFFSET(8)) = (uint8_t)r3; - // EBPF_OP_MOV64_REG pc=49 dst=r3 src=r2 offset=0 imm=0 + *(uint8_t*)(uintptr_t)(r1 + OFFSET(8)) = (uint8_t)r4; + // EBPF_OP_MOV64_REG pc=49 dst=r4 src=r3 offset=0 imm=0 #line 17 "sample/./xdp_common.h" - r3 = r2; - // EBPF_OP_RSH64_IMM pc=50 dst=r3 src=r0 offset=0 imm=24 + r4 = r3; + // EBPF_OP_RSH64_IMM pc=50 dst=r4 src=r0 offset=0 imm=24 #line 17 "sample/./xdp_common.h" - r3 >>= (IMMEDIATE(24) & 63); - // EBPF_OP_STXB pc=51 dst=r1 src=r3 offset=9 imm=0 + r4 >>= (IMMEDIATE(24) & 63); + // EBPF_OP_STXB pc=51 dst=r1 src=r4 offset=9 imm=0 #line 17 "sample/./xdp_common.h" - *(uint8_t*)(uintptr_t)(r1 + OFFSET(9)) = (uint8_t)r3; - // EBPF_OP_STXB pc=52 dst=r1 src=r2 offset=6 imm=0 + *(uint8_t*)(uintptr_t)(r1 + OFFSET(9)) = (uint8_t)r4; + // EBPF_OP_STXB pc=52 dst=r1 src=r3 offset=6 imm=0 #line 17 "sample/./xdp_common.h" - *(uint8_t*)(uintptr_t)(r1 + OFFSET(6)) = (uint8_t)r2; - // EBPF_OP_RSH64_IMM pc=53 dst=r2 src=r0 offset=0 imm=8 + *(uint8_t*)(uintptr_t)(r1 + OFFSET(6)) = (uint8_t)r3; + // EBPF_OP_RSH64_IMM pc=53 dst=r3 src=r0 offset=0 imm=8 #line 17 "sample/./xdp_common.h" - r2 >>= (IMMEDIATE(8) & 63); - // EBPF_OP_STXB pc=54 dst=r1 src=r2 offset=7 imm=0 + r3 >>= (IMMEDIATE(8) & 63); + // EBPF_OP_STXB pc=54 dst=r1 src=r3 offset=7 imm=0 #line 17 "sample/./xdp_common.h" - *(uint8_t*)(uintptr_t)(r1 + OFFSET(7)) = (uint8_t)r2; - // EBPF_OP_LDXH pc=55 dst=r2 src=r10 offset=-12 imm=0 + *(uint8_t*)(uintptr_t)(r1 + OFFSET(7)) = (uint8_t)r3; + // EBPF_OP_LDXH pc=55 dst=r3 src=r10 offset=-12 imm=0 #line 17 "sample/./xdp_common.h" - r2 = *(uint16_t*)(uintptr_t)(r10 + OFFSET(-12)); - // EBPF_OP_STXB pc=56 dst=r1 src=r2 offset=10 imm=0 + r3 = *(uint16_t*)(uintptr_t)(r10 + OFFSET(-12)); + // EBPF_OP_STXB pc=56 dst=r1 src=r3 offset=10 imm=0 #line 17 "sample/./xdp_common.h" - *(uint8_t*)(uintptr_t)(r1 + OFFSET(10)) = (uint8_t)r2; - // EBPF_OP_RSH64_IMM pc=57 dst=r2 src=r0 offset=0 imm=8 + *(uint8_t*)(uintptr_t)(r1 + OFFSET(10)) = (uint8_t)r3; + // EBPF_OP_RSH64_IMM pc=57 dst=r3 src=r0 offset=0 imm=8 #line 17 "sample/./xdp_common.h" - r2 >>= (IMMEDIATE(8) & 63); - // EBPF_OP_STXB pc=58 dst=r1 src=r2 offset=11 imm=0 + r3 >>= (IMMEDIATE(8) & 63); + // EBPF_OP_STXB pc=58 dst=r1 src=r3 offset=11 imm=0 #line 17 "sample/./xdp_common.h" - *(uint8_t*)(uintptr_t)(r1 + OFFSET(11)) = (uint8_t)r2; - // EBPF_OP_LDXW pc=59 dst=r2 src=r1 offset=30 imm=0 + *(uint8_t*)(uintptr_t)(r1 + OFFSET(11)) = (uint8_t)r3; + // EBPF_OP_LDXW pc=59 dst=r3 src=r1 offset=30 imm=0 #line 23 "sample/./xdp_common.h" - r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(30)); - // EBPF_OP_LDXW pc=60 dst=r3 src=r1 offset=26 imm=0 + r3 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(30)); + // EBPF_OP_LDXW pc=60 dst=r4 src=r1 offset=26 imm=0 #line 24 "sample/./xdp_common.h" - r3 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(26)); - // EBPF_OP_STXW pc=61 dst=r1 src=r3 offset=30 imm=0 + r4 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(26)); + // EBPF_OP_STXW pc=61 dst=r1 src=r4 offset=30 imm=0 #line 24 "sample/./xdp_common.h" - *(uint32_t*)(uintptr_t)(r1 + OFFSET(30)) = (uint32_t)r3; - // EBPF_OP_STXW pc=62 dst=r1 src=r2 offset=26 imm=0 -#line 25 "sample/./xdp_common.h" - *(uint32_t*)(uintptr_t)(r1 + OFFSET(26)) = (uint32_t)r2; - // EBPF_OP_JA pc=63 dst=r0 src=r0 offset=144 imm=0 + *(uint32_t*)(uintptr_t)(r1 + OFFSET(30)) = (uint32_t)r4; + // EBPF_OP_STXW pc=62 dst=r1 src=r3 offset=26 imm=0 #line 25 "sample/./xdp_common.h" + *(uint32_t*)(uintptr_t)(r1 + OFFSET(26)) = (uint32_t)r3; + // EBPF_OP_LDXH pc=63 dst=r1 src=r2 offset=2 imm=0 +#line 41 "sample/./xdp_common.h" + r1 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(2)); + // EBPF_OP_LDXH pc=64 dst=r3 src=r2 offset=0 imm=0 +#line 40 "sample/./xdp_common.h" + r3 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(0)); + // EBPF_OP_STXH pc=65 dst=r2 src=r3 offset=2 imm=0 +#line 42 "sample/./xdp_common.h" + *(uint16_t*)(uintptr_t)(r2 + OFFSET(2)) = (uint16_t)r3; + // EBPF_OP_STXH pc=66 dst=r2 src=r1 offset=0 imm=0 +#line 41 "sample/./xdp_common.h" + *(uint16_t*)(uintptr_t)(r2 + OFFSET(0)) = (uint16_t)r1; + // EBPF_OP_JA pc=67 dst=r0 src=r0 offset=148 imm=0 +#line 41 "sample/./xdp_common.h" goto label_2; label_1: - // EBPF_OP_MOV64_REG pc=64 dst=r3 src=r1 offset=0 imm=0 -#line 55 "sample/reflect_packet.c" - r3 = r1; - // EBPF_OP_ADD64_IMM pc=65 dst=r3 src=r0 offset=0 imm=54 -#line 55 "sample/reflect_packet.c" - r3 += IMMEDIATE(54); - // EBPF_OP_JGT_REG pc=66 dst=r3 src=r2 offset=142 imm=0 -#line 55 "sample/reflect_packet.c" - if (r3 > r2) -#line 55 "sample/reflect_packet.c" + // EBPF_OP_MOV64_REG pc=68 dst=r2 src=r1 offset=0 imm=0 +#line 56 "sample/reflect_packet.c" + r2 = r1; + // EBPF_OP_ADD64_IMM pc=69 dst=r2 src=r0 offset=0 imm=54 +#line 56 "sample/reflect_packet.c" + r2 += IMMEDIATE(54); + // EBPF_OP_JGT_REG pc=70 dst=r2 src=r3 offset=146 imm=0 +#line 56 "sample/reflect_packet.c" + if (r2 > r3) +#line 56 "sample/reflect_packet.c" goto label_3; - // EBPF_OP_MOV64_REG pc=67 dst=r3 src=r1 offset=0 imm=0 -#line 55 "sample/reflect_packet.c" - r3 = r1; - // EBPF_OP_ADD64_IMM pc=68 dst=r3 src=r0 offset=0 imm=62 -#line 55 "sample/reflect_packet.c" - r3 += IMMEDIATE(62); - // EBPF_OP_JGT_REG pc=69 dst=r3 src=r2 offset=139 imm=0 -#line 61 "sample/reflect_packet.c" - if (r3 > r2) -#line 61 "sample/reflect_packet.c" + // EBPF_OP_MOV64_REG pc=71 dst=r2 src=r1 offset=0 imm=0 +#line 56 "sample/reflect_packet.c" + r2 = r1; + // EBPF_OP_ADD64_IMM pc=72 dst=r2 src=r0 offset=0 imm=62 +#line 56 "sample/reflect_packet.c" + r2 += IMMEDIATE(62); + // EBPF_OP_JGT_REG pc=73 dst=r2 src=r3 offset=143 imm=0 +#line 62 "sample/reflect_packet.c" + if (r2 > r3) +#line 62 "sample/reflect_packet.c" goto label_3; - // EBPF_OP_LDXB pc=70 dst=r2 src=r1 offset=20 imm=0 -#line 61 "sample/reflect_packet.c" + // EBPF_OP_LDXB pc=74 dst=r2 src=r1 offset=20 imm=0 +#line 62 "sample/reflect_packet.c" r2 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(20)); - // EBPF_OP_JNE_IMM pc=71 dst=r2 src=r0 offset=137 imm=17 -#line 61 "sample/reflect_packet.c" + // EBPF_OP_JNE_IMM pc=75 dst=r2 src=r0 offset=141 imm=17 +#line 62 "sample/reflect_packet.c" if (r2 != IMMEDIATE(17)) -#line 61 "sample/reflect_packet.c" +#line 62 "sample/reflect_packet.c" goto label_3; - // EBPF_OP_LDXH pc=72 dst=r2 src=r1 offset=56 imm=0 -#line 67 "sample/reflect_packet.c" + // EBPF_OP_LDXH pc=76 dst=r2 src=r1 offset=56 imm=0 +#line 68 "sample/reflect_packet.c" r2 = *(uint16_t*)(uintptr_t)(r1 + OFFSET(56)); - // EBPF_OP_JNE_IMM pc=73 dst=r2 src=r0 offset=135 imm=7459 -#line 67 "sample/reflect_packet.c" + // EBPF_OP_JNE_IMM pc=77 dst=r2 src=r0 offset=139 imm=7459 +#line 68 "sample/reflect_packet.c" if (r2 != IMMEDIATE(7459)) -#line 67 "sample/reflect_packet.c" +#line 68 "sample/reflect_packet.c" goto label_3; - // EBPF_OP_LDXB pc=74 dst=r2 src=r1 offset=5 imm=0 + // EBPF_OP_LDXB pc=78 dst=r2 src=r1 offset=5 imm=0 #line 15 "sample/./xdp_common.h" r2 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(5)); - // EBPF_OP_LSH64_IMM pc=75 dst=r2 src=r0 offset=0 imm=8 + // EBPF_OP_LSH64_IMM pc=79 dst=r2 src=r0 offset=0 imm=8 #line 15 "sample/./xdp_common.h" r2 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=76 dst=r3 src=r1 offset=4 imm=0 + // EBPF_OP_LDXB pc=80 dst=r3 src=r1 offset=4 imm=0 #line 15 "sample/./xdp_common.h" r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(4)); - // EBPF_OP_OR64_REG pc=77 dst=r2 src=r3 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=81 dst=r2 src=r3 offset=0 imm=0 #line 15 "sample/./xdp_common.h" r2 |= r3; - // EBPF_OP_STXH pc=78 dst=r10 src=r2 offset=-12 imm=0 + // EBPF_OP_STXH pc=82 dst=r10 src=r2 offset=-12 imm=0 #line 15 "sample/./xdp_common.h" *(uint16_t*)(uintptr_t)(r10 + OFFSET(-12)) = (uint16_t)r2; - // EBPF_OP_LDXB pc=79 dst=r2 src=r1 offset=1 imm=0 + // EBPF_OP_LDXB pc=83 dst=r2 src=r1 offset=1 imm=0 #line 15 "sample/./xdp_common.h" r2 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(1)); - // EBPF_OP_LSH64_IMM pc=80 dst=r2 src=r0 offset=0 imm=8 + // EBPF_OP_LSH64_IMM pc=84 dst=r2 src=r0 offset=0 imm=8 #line 15 "sample/./xdp_common.h" r2 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=81 dst=r3 src=r1 offset=0 imm=0 + // EBPF_OP_LDXB pc=85 dst=r3 src=r1 offset=0 imm=0 #line 15 "sample/./xdp_common.h" r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(0)); - // EBPF_OP_OR64_REG pc=82 dst=r2 src=r3 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=86 dst=r2 src=r3 offset=0 imm=0 #line 15 "sample/./xdp_common.h" r2 |= r3; - // EBPF_OP_LDXB pc=83 dst=r3 src=r1 offset=3 imm=0 + // EBPF_OP_LDXB pc=87 dst=r3 src=r1 offset=3 imm=0 #line 15 "sample/./xdp_common.h" r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(3)); - // EBPF_OP_LSH64_IMM pc=84 dst=r3 src=r0 offset=0 imm=8 + // EBPF_OP_LSH64_IMM pc=88 dst=r3 src=r0 offset=0 imm=8 #line 15 "sample/./xdp_common.h" r3 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=85 dst=r4 src=r1 offset=2 imm=0 + // EBPF_OP_LDXB pc=89 dst=r4 src=r1 offset=2 imm=0 #line 15 "sample/./xdp_common.h" r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(2)); - // EBPF_OP_OR64_REG pc=86 dst=r3 src=r4 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=90 dst=r3 src=r4 offset=0 imm=0 #line 15 "sample/./xdp_common.h" r3 |= r4; - // EBPF_OP_LSH64_IMM pc=87 dst=r3 src=r0 offset=0 imm=16 + // EBPF_OP_LSH64_IMM pc=91 dst=r3 src=r0 offset=0 imm=16 #line 15 "sample/./xdp_common.h" r3 <<= (IMMEDIATE(16) & 63); - // EBPF_OP_OR64_REG pc=88 dst=r3 src=r2 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=92 dst=r3 src=r2 offset=0 imm=0 #line 15 "sample/./xdp_common.h" r3 |= r2; - // EBPF_OP_STXW pc=89 dst=r10 src=r3 offset=-16 imm=0 + // EBPF_OP_STXW pc=93 dst=r10 src=r3 offset=-16 imm=0 #line 15 "sample/./xdp_common.h" *(uint32_t*)(uintptr_t)(r10 + OFFSET(-16)) = (uint32_t)r3; - // EBPF_OP_LDXH pc=90 dst=r2 src=r1 offset=6 imm=0 + // EBPF_OP_LDXH pc=94 dst=r2 src=r1 offset=6 imm=0 #line 16 "sample/./xdp_common.h" r2 = *(uint16_t*)(uintptr_t)(r1 + OFFSET(6)); - // EBPF_OP_STXH pc=91 dst=r1 src=r2 offset=0 imm=0 + // EBPF_OP_STXH pc=95 dst=r1 src=r2 offset=0 imm=0 #line 16 "sample/./xdp_common.h" *(uint16_t*)(uintptr_t)(r1 + OFFSET(0)) = (uint16_t)r2; - // EBPF_OP_LDXH pc=92 dst=r2 src=r1 offset=8 imm=0 + // EBPF_OP_LDXH pc=96 dst=r2 src=r1 offset=8 imm=0 #line 16 "sample/./xdp_common.h" r2 = *(uint16_t*)(uintptr_t)(r1 + OFFSET(8)); - // EBPF_OP_STXH pc=93 dst=r1 src=r2 offset=2 imm=0 + // EBPF_OP_STXH pc=97 dst=r1 src=r2 offset=2 imm=0 #line 16 "sample/./xdp_common.h" *(uint16_t*)(uintptr_t)(r1 + OFFSET(2)) = (uint16_t)r2; - // EBPF_OP_LDXH pc=94 dst=r2 src=r1 offset=10 imm=0 + // EBPF_OP_LDXH pc=98 dst=r2 src=r1 offset=10 imm=0 #line 16 "sample/./xdp_common.h" r2 = *(uint16_t*)(uintptr_t)(r1 + OFFSET(10)); - // EBPF_OP_STXH pc=95 dst=r1 src=r2 offset=4 imm=0 + // EBPF_OP_STXH pc=99 dst=r1 src=r2 offset=4 imm=0 #line 16 "sample/./xdp_common.h" *(uint16_t*)(uintptr_t)(r1 + OFFSET(4)) = (uint16_t)r2; - // EBPF_OP_LDXW pc=96 dst=r2 src=r10 offset=-16 imm=0 + // EBPF_OP_LDXW pc=100 dst=r2 src=r10 offset=-16 imm=0 #line 17 "sample/./xdp_common.h" r2 = *(uint32_t*)(uintptr_t)(r10 + OFFSET(-16)); - // EBPF_OP_MOV64_REG pc=97 dst=r3 src=r2 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=101 dst=r3 src=r2 offset=0 imm=0 #line 17 "sample/./xdp_common.h" r3 = r2; - // EBPF_OP_RSH64_IMM pc=98 dst=r3 src=r0 offset=0 imm=16 + // EBPF_OP_RSH64_IMM pc=102 dst=r3 src=r0 offset=0 imm=16 #line 17 "sample/./xdp_common.h" r3 >>= (IMMEDIATE(16) & 63); - // EBPF_OP_STXB pc=99 dst=r1 src=r3 offset=8 imm=0 + // EBPF_OP_STXB pc=103 dst=r1 src=r3 offset=8 imm=0 #line 17 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(8)) = (uint8_t)r3; - // EBPF_OP_MOV64_REG pc=100 dst=r3 src=r2 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=104 dst=r3 src=r2 offset=0 imm=0 #line 17 "sample/./xdp_common.h" r3 = r2; - // EBPF_OP_RSH64_IMM pc=101 dst=r3 src=r0 offset=0 imm=24 + // EBPF_OP_RSH64_IMM pc=105 dst=r3 src=r0 offset=0 imm=24 #line 17 "sample/./xdp_common.h" r3 >>= (IMMEDIATE(24) & 63); - // EBPF_OP_STXB pc=102 dst=r1 src=r3 offset=9 imm=0 + // EBPF_OP_STXB pc=106 dst=r1 src=r3 offset=9 imm=0 #line 17 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(9)) = (uint8_t)r3; - // EBPF_OP_STXB pc=103 dst=r1 src=r2 offset=6 imm=0 + // EBPF_OP_STXB pc=107 dst=r1 src=r2 offset=6 imm=0 #line 17 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(6)) = (uint8_t)r2; - // EBPF_OP_RSH64_IMM pc=104 dst=r2 src=r0 offset=0 imm=8 + // EBPF_OP_RSH64_IMM pc=108 dst=r2 src=r0 offset=0 imm=8 #line 17 "sample/./xdp_common.h" r2 >>= (IMMEDIATE(8) & 63); - // EBPF_OP_STXB pc=105 dst=r1 src=r2 offset=7 imm=0 + // EBPF_OP_STXB pc=109 dst=r1 src=r2 offset=7 imm=0 #line 17 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(7)) = (uint8_t)r2; - // EBPF_OP_LDXH pc=106 dst=r2 src=r10 offset=-12 imm=0 + // EBPF_OP_LDXH pc=110 dst=r2 src=r10 offset=-12 imm=0 #line 17 "sample/./xdp_common.h" r2 = *(uint16_t*)(uintptr_t)(r10 + OFFSET(-12)); - // EBPF_OP_STXB pc=107 dst=r1 src=r2 offset=10 imm=0 + // EBPF_OP_STXB pc=111 dst=r1 src=r2 offset=10 imm=0 #line 17 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(10)) = (uint8_t)r2; - // EBPF_OP_RSH64_IMM pc=108 dst=r2 src=r0 offset=0 imm=8 + // EBPF_OP_RSH64_IMM pc=112 dst=r2 src=r0 offset=0 imm=8 #line 17 "sample/./xdp_common.h" r2 >>= (IMMEDIATE(8) & 63); - // EBPF_OP_STXB pc=109 dst=r1 src=r2 offset=11 imm=0 + // EBPF_OP_STXB pc=113 dst=r1 src=r2 offset=11 imm=0 #line 17 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(11)) = (uint8_t)r2; - // EBPF_OP_LDXB pc=110 dst=r3 src=r1 offset=47 imm=0 + // EBPF_OP_LDXB pc=114 dst=r3 src=r1 offset=47 imm=0 #line 32 "sample/./xdp_common.h" r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(47)); - // EBPF_OP_LSH64_IMM pc=111 dst=r3 src=r0 offset=0 imm=8 + // EBPF_OP_LSH64_IMM pc=115 dst=r3 src=r0 offset=0 imm=8 #line 32 "sample/./xdp_common.h" r3 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=112 dst=r2 src=r1 offset=46 imm=0 + // EBPF_OP_LDXB pc=116 dst=r2 src=r1 offset=46 imm=0 #line 32 "sample/./xdp_common.h" r2 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(46)); - // EBPF_OP_OR64_REG pc=113 dst=r3 src=r2 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=117 dst=r3 src=r2 offset=0 imm=0 #line 32 "sample/./xdp_common.h" r3 |= r2; - // EBPF_OP_LDXB pc=114 dst=r2 src=r1 offset=49 imm=0 + // EBPF_OP_LDXB pc=118 dst=r2 src=r1 offset=49 imm=0 #line 32 "sample/./xdp_common.h" r2 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(49)); - // EBPF_OP_LSH64_IMM pc=115 dst=r2 src=r0 offset=0 imm=8 + // EBPF_OP_LSH64_IMM pc=119 dst=r2 src=r0 offset=0 imm=8 #line 32 "sample/./xdp_common.h" r2 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=116 dst=r4 src=r1 offset=48 imm=0 + // EBPF_OP_LDXB pc=120 dst=r4 src=r1 offset=48 imm=0 #line 32 "sample/./xdp_common.h" r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(48)); - // EBPF_OP_OR64_REG pc=117 dst=r2 src=r4 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=121 dst=r2 src=r4 offset=0 imm=0 #line 32 "sample/./xdp_common.h" r2 |= r4; - // EBPF_OP_LSH64_IMM pc=118 dst=r2 src=r0 offset=0 imm=16 + // EBPF_OP_LSH64_IMM pc=122 dst=r2 src=r0 offset=0 imm=16 #line 32 "sample/./xdp_common.h" r2 <<= (IMMEDIATE(16) & 63); - // EBPF_OP_OR64_REG pc=119 dst=r2 src=r3 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=123 dst=r2 src=r3 offset=0 imm=0 #line 32 "sample/./xdp_common.h" r2 |= r3; - // EBPF_OP_LDXB pc=120 dst=r4 src=r1 offset=51 imm=0 + // EBPF_OP_LDXB pc=124 dst=r4 src=r1 offset=51 imm=0 #line 32 "sample/./xdp_common.h" r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(51)); - // EBPF_OP_LSH64_IMM pc=121 dst=r4 src=r0 offset=0 imm=8 + // EBPF_OP_LSH64_IMM pc=125 dst=r4 src=r0 offset=0 imm=8 #line 32 "sample/./xdp_common.h" r4 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=122 dst=r3 src=r1 offset=50 imm=0 + // EBPF_OP_LDXB pc=126 dst=r3 src=r1 offset=50 imm=0 #line 32 "sample/./xdp_common.h" r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(50)); - // EBPF_OP_OR64_REG pc=123 dst=r4 src=r3 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=127 dst=r4 src=r3 offset=0 imm=0 #line 32 "sample/./xdp_common.h" r4 |= r3; - // EBPF_OP_LDXB pc=124 dst=r3 src=r1 offset=53 imm=0 + // EBPF_OP_LDXB pc=128 dst=r3 src=r1 offset=53 imm=0 #line 32 "sample/./xdp_common.h" r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(53)); - // EBPF_OP_LSH64_IMM pc=125 dst=r3 src=r0 offset=0 imm=8 + // EBPF_OP_LSH64_IMM pc=129 dst=r3 src=r0 offset=0 imm=8 #line 32 "sample/./xdp_common.h" r3 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=126 dst=r5 src=r1 offset=52 imm=0 + // EBPF_OP_LDXB pc=130 dst=r5 src=r1 offset=52 imm=0 #line 32 "sample/./xdp_common.h" r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(52)); - // EBPF_OP_OR64_REG pc=127 dst=r3 src=r5 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=131 dst=r3 src=r5 offset=0 imm=0 #line 32 "sample/./xdp_common.h" r3 |= r5; - // EBPF_OP_LSH64_IMM pc=128 dst=r3 src=r0 offset=0 imm=16 + // EBPF_OP_LSH64_IMM pc=132 dst=r3 src=r0 offset=0 imm=16 #line 32 "sample/./xdp_common.h" r3 <<= (IMMEDIATE(16) & 63); - // EBPF_OP_OR64_REG pc=129 dst=r3 src=r4 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=133 dst=r3 src=r4 offset=0 imm=0 #line 32 "sample/./xdp_common.h" r3 |= r4; - // EBPF_OP_LSH64_IMM pc=130 dst=r3 src=r0 offset=0 imm=32 + // EBPF_OP_LSH64_IMM pc=134 dst=r3 src=r0 offset=0 imm=32 #line 32 "sample/./xdp_common.h" r3 <<= (IMMEDIATE(32) & 63); - // EBPF_OP_OR64_REG pc=131 dst=r3 src=r2 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=135 dst=r3 src=r2 offset=0 imm=0 #line 32 "sample/./xdp_common.h" r3 |= r2; - // EBPF_OP_LDXB pc=132 dst=r4 src=r1 offset=39 imm=0 + // EBPF_OP_LDXB pc=136 dst=r4 src=r1 offset=39 imm=0 #line 32 "sample/./xdp_common.h" r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(39)); - // EBPF_OP_LSH64_IMM pc=133 dst=r4 src=r0 offset=0 imm=8 + // EBPF_OP_LSH64_IMM pc=137 dst=r4 src=r0 offset=0 imm=8 #line 32 "sample/./xdp_common.h" r4 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=134 dst=r2 src=r1 offset=38 imm=0 + // EBPF_OP_LDXB pc=138 dst=r2 src=r1 offset=38 imm=0 #line 32 "sample/./xdp_common.h" r2 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(38)); - // EBPF_OP_OR64_REG pc=135 dst=r4 src=r2 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=139 dst=r4 src=r2 offset=0 imm=0 #line 32 "sample/./xdp_common.h" r4 |= r2; - // EBPF_OP_LDXB pc=136 dst=r2 src=r1 offset=41 imm=0 + // EBPF_OP_LDXB pc=140 dst=r2 src=r1 offset=41 imm=0 #line 32 "sample/./xdp_common.h" r2 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(41)); - // EBPF_OP_LSH64_IMM pc=137 dst=r2 src=r0 offset=0 imm=8 + // EBPF_OP_LSH64_IMM pc=141 dst=r2 src=r0 offset=0 imm=8 #line 32 "sample/./xdp_common.h" r2 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=138 dst=r5 src=r1 offset=40 imm=0 + // EBPF_OP_LDXB pc=142 dst=r5 src=r1 offset=40 imm=0 #line 32 "sample/./xdp_common.h" r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(40)); - // EBPF_OP_OR64_REG pc=139 dst=r2 src=r5 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=143 dst=r2 src=r5 offset=0 imm=0 #line 32 "sample/./xdp_common.h" r2 |= r5; - // EBPF_OP_STXDW pc=140 dst=r10 src=r3 offset=-8 imm=0 + // EBPF_OP_STXDW pc=144 dst=r10 src=r3 offset=-8 imm=0 #line 32 "sample/./xdp_common.h" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-8)) = (uint64_t)r3; - // EBPF_OP_LSH64_IMM pc=141 dst=r2 src=r0 offset=0 imm=16 + // EBPF_OP_LSH64_IMM pc=145 dst=r2 src=r0 offset=0 imm=16 #line 32 "sample/./xdp_common.h" r2 <<= (IMMEDIATE(16) & 63); - // EBPF_OP_OR64_REG pc=142 dst=r2 src=r4 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=146 dst=r2 src=r4 offset=0 imm=0 #line 32 "sample/./xdp_common.h" r2 |= r4; - // EBPF_OP_LDXB pc=143 dst=r3 src=r1 offset=43 imm=0 + // EBPF_OP_LDXB pc=147 dst=r3 src=r1 offset=43 imm=0 #line 32 "sample/./xdp_common.h" r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(43)); - // EBPF_OP_LSH64_IMM pc=144 dst=r3 src=r0 offset=0 imm=8 + // EBPF_OP_LSH64_IMM pc=148 dst=r3 src=r0 offset=0 imm=8 #line 32 "sample/./xdp_common.h" r3 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=145 dst=r4 src=r1 offset=42 imm=0 + // EBPF_OP_LDXB pc=149 dst=r4 src=r1 offset=42 imm=0 #line 32 "sample/./xdp_common.h" r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(42)); - // EBPF_OP_OR64_REG pc=146 dst=r3 src=r4 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=150 dst=r3 src=r4 offset=0 imm=0 #line 32 "sample/./xdp_common.h" r3 |= r4; - // EBPF_OP_LDXB pc=147 dst=r4 src=r1 offset=45 imm=0 + // EBPF_OP_LDXB pc=151 dst=r4 src=r1 offset=45 imm=0 #line 32 "sample/./xdp_common.h" r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(45)); - // EBPF_OP_LSH64_IMM pc=148 dst=r4 src=r0 offset=0 imm=8 + // EBPF_OP_LSH64_IMM pc=152 dst=r4 src=r0 offset=0 imm=8 #line 32 "sample/./xdp_common.h" r4 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=149 dst=r5 src=r1 offset=44 imm=0 + // EBPF_OP_LDXB pc=153 dst=r5 src=r1 offset=44 imm=0 #line 32 "sample/./xdp_common.h" r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(44)); - // EBPF_OP_OR64_REG pc=150 dst=r4 src=r5 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=154 dst=r4 src=r5 offset=0 imm=0 #line 32 "sample/./xdp_common.h" r4 |= r5; - // EBPF_OP_LSH64_IMM pc=151 dst=r4 src=r0 offset=0 imm=16 + // EBPF_OP_LSH64_IMM pc=155 dst=r4 src=r0 offset=0 imm=16 #line 32 "sample/./xdp_common.h" r4 <<= (IMMEDIATE(16) & 63); - // EBPF_OP_OR64_REG pc=152 dst=r4 src=r3 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=156 dst=r4 src=r3 offset=0 imm=0 #line 32 "sample/./xdp_common.h" r4 |= r3; - // EBPF_OP_LSH64_IMM pc=153 dst=r4 src=r0 offset=0 imm=32 + // EBPF_OP_LSH64_IMM pc=157 dst=r4 src=r0 offset=0 imm=32 #line 32 "sample/./xdp_common.h" r4 <<= (IMMEDIATE(32) & 63); - // EBPF_OP_OR64_REG pc=154 dst=r4 src=r2 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=158 dst=r4 src=r2 offset=0 imm=0 #line 32 "sample/./xdp_common.h" r4 |= r2; - // EBPF_OP_STXDW pc=155 dst=r10 src=r4 offset=-16 imm=0 + // EBPF_OP_STXDW pc=159 dst=r10 src=r4 offset=-16 imm=0 #line 32 "sample/./xdp_common.h" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-16)) = (uint64_t)r4; - // EBPF_OP_LDXW pc=156 dst=r2 src=r1 offset=22 imm=0 + // EBPF_OP_LDXW pc=160 dst=r2 src=r1 offset=22 imm=0 #line 33 "sample/./xdp_common.h" r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(22)); - // EBPF_OP_STXW pc=157 dst=r1 src=r2 offset=38 imm=0 + // EBPF_OP_STXW pc=161 dst=r1 src=r2 offset=38 imm=0 #line 33 "sample/./xdp_common.h" *(uint32_t*)(uintptr_t)(r1 + OFFSET(38)) = (uint32_t)r2; - // EBPF_OP_LDXW pc=158 dst=r2 src=r1 offset=26 imm=0 + // EBPF_OP_LDXW pc=162 dst=r2 src=r1 offset=26 imm=0 #line 33 "sample/./xdp_common.h" r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(26)); - // EBPF_OP_STXW pc=159 dst=r1 src=r2 offset=42 imm=0 + // EBPF_OP_STXW pc=163 dst=r1 src=r2 offset=42 imm=0 #line 33 "sample/./xdp_common.h" *(uint32_t*)(uintptr_t)(r1 + OFFSET(42)) = (uint32_t)r2; - // EBPF_OP_LDXW pc=160 dst=r2 src=r1 offset=30 imm=0 + // EBPF_OP_LDXW pc=164 dst=r2 src=r1 offset=30 imm=0 #line 33 "sample/./xdp_common.h" r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(30)); - // EBPF_OP_STXW pc=161 dst=r1 src=r2 offset=46 imm=0 + // EBPF_OP_STXW pc=165 dst=r1 src=r2 offset=46 imm=0 #line 33 "sample/./xdp_common.h" *(uint32_t*)(uintptr_t)(r1 + OFFSET(46)) = (uint32_t)r2; - // EBPF_OP_LDXW pc=162 dst=r2 src=r1 offset=34 imm=0 + // EBPF_OP_LDXW pc=166 dst=r2 src=r1 offset=34 imm=0 #line 33 "sample/./xdp_common.h" r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(34)); - // EBPF_OP_STXW pc=163 dst=r1 src=r2 offset=50 imm=0 + // EBPF_OP_STXW pc=167 dst=r1 src=r2 offset=50 imm=0 #line 33 "sample/./xdp_common.h" *(uint32_t*)(uintptr_t)(r1 + OFFSET(50)) = (uint32_t)r2; - // EBPF_OP_LDXDW pc=164 dst=r2 src=r10 offset=-16 imm=0 + // EBPF_OP_LDXDW pc=168 dst=r2 src=r10 offset=-16 imm=0 #line 34 "sample/./xdp_common.h" r2 = *(uint64_t*)(uintptr_t)(r10 + OFFSET(-16)); - // EBPF_OP_MOV64_REG pc=165 dst=r3 src=r2 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=169 dst=r3 src=r2 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r3 = r2; - // EBPF_OP_RSH64_IMM pc=166 dst=r3 src=r0 offset=0 imm=48 + // EBPF_OP_RSH64_IMM pc=170 dst=r3 src=r0 offset=0 imm=48 #line 34 "sample/./xdp_common.h" r3 >>= (IMMEDIATE(48) & 63); - // EBPF_OP_STXB pc=167 dst=r1 src=r3 offset=28 imm=0 + // EBPF_OP_STXB pc=171 dst=r1 src=r3 offset=28 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(28)) = (uint8_t)r3; - // EBPF_OP_MOV64_REG pc=168 dst=r3 src=r2 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=172 dst=r3 src=r2 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r3 = r2; - // EBPF_OP_RSH64_IMM pc=169 dst=r3 src=r0 offset=0 imm=56 + // EBPF_OP_RSH64_IMM pc=173 dst=r3 src=r0 offset=0 imm=56 #line 34 "sample/./xdp_common.h" r3 >>= (IMMEDIATE(56) & 63); - // EBPF_OP_STXB pc=170 dst=r1 src=r3 offset=29 imm=0 + // EBPF_OP_STXB pc=174 dst=r1 src=r3 offset=29 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(29)) = (uint8_t)r3; - // EBPF_OP_MOV64_REG pc=171 dst=r3 src=r2 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=175 dst=r3 src=r2 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r3 = r2; - // EBPF_OP_RSH64_IMM pc=172 dst=r3 src=r0 offset=0 imm=32 + // EBPF_OP_RSH64_IMM pc=176 dst=r3 src=r0 offset=0 imm=32 #line 34 "sample/./xdp_common.h" r3 >>= (IMMEDIATE(32) & 63); - // EBPF_OP_STXB pc=173 dst=r1 src=r3 offset=26 imm=0 + // EBPF_OP_STXB pc=177 dst=r1 src=r3 offset=26 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(26)) = (uint8_t)r3; - // EBPF_OP_MOV64_REG pc=174 dst=r3 src=r2 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=178 dst=r3 src=r2 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r3 = r2; - // EBPF_OP_RSH64_IMM pc=175 dst=r3 src=r0 offset=0 imm=40 + // EBPF_OP_RSH64_IMM pc=179 dst=r3 src=r0 offset=0 imm=40 #line 34 "sample/./xdp_common.h" r3 >>= (IMMEDIATE(40) & 63); - // EBPF_OP_STXB pc=176 dst=r1 src=r3 offset=27 imm=0 + // EBPF_OP_STXB pc=180 dst=r1 src=r3 offset=27 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(27)) = (uint8_t)r3; - // EBPF_OP_MOV64_REG pc=177 dst=r3 src=r2 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=181 dst=r3 src=r2 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r3 = r2; - // EBPF_OP_RSH64_IMM pc=178 dst=r3 src=r0 offset=0 imm=16 + // EBPF_OP_RSH64_IMM pc=182 dst=r3 src=r0 offset=0 imm=16 #line 34 "sample/./xdp_common.h" r3 >>= (IMMEDIATE(16) & 63); - // EBPF_OP_STXB pc=179 dst=r1 src=r3 offset=24 imm=0 + // EBPF_OP_STXB pc=183 dst=r1 src=r3 offset=24 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(24)) = (uint8_t)r3; - // EBPF_OP_MOV64_REG pc=180 dst=r3 src=r2 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=184 dst=r3 src=r2 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r3 = r2; - // EBPF_OP_RSH64_IMM pc=181 dst=r3 src=r0 offset=0 imm=24 + // EBPF_OP_RSH64_IMM pc=185 dst=r3 src=r0 offset=0 imm=24 #line 34 "sample/./xdp_common.h" r3 >>= (IMMEDIATE(24) & 63); - // EBPF_OP_STXB pc=182 dst=r1 src=r3 offset=25 imm=0 + // EBPF_OP_STXB pc=186 dst=r1 src=r3 offset=25 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(25)) = (uint8_t)r3; - // EBPF_OP_STXB pc=183 dst=r1 src=r2 offset=22 imm=0 + // EBPF_OP_STXB pc=187 dst=r1 src=r2 offset=22 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(22)) = (uint8_t)r2; - // EBPF_OP_RSH64_IMM pc=184 dst=r2 src=r0 offset=0 imm=8 + // EBPF_OP_RSH64_IMM pc=188 dst=r2 src=r0 offset=0 imm=8 #line 34 "sample/./xdp_common.h" r2 >>= (IMMEDIATE(8) & 63); - // EBPF_OP_STXB pc=185 dst=r1 src=r2 offset=23 imm=0 + // EBPF_OP_STXB pc=189 dst=r1 src=r2 offset=23 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(23)) = (uint8_t)r2; - // EBPF_OP_LDXDW pc=186 dst=r2 src=r10 offset=-8 imm=0 + // EBPF_OP_LDXDW pc=190 dst=r2 src=r10 offset=-8 imm=0 #line 34 "sample/./xdp_common.h" r2 = *(uint64_t*)(uintptr_t)(r10 + OFFSET(-8)); - // EBPF_OP_MOV64_REG pc=187 dst=r3 src=r2 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=191 dst=r3 src=r2 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r3 = r2; - // EBPF_OP_RSH64_IMM pc=188 dst=r3 src=r0 offset=0 imm=48 + // EBPF_OP_RSH64_IMM pc=192 dst=r3 src=r0 offset=0 imm=48 #line 34 "sample/./xdp_common.h" r3 >>= (IMMEDIATE(48) & 63); - // EBPF_OP_STXB pc=189 dst=r1 src=r3 offset=36 imm=0 + // EBPF_OP_STXB pc=193 dst=r1 src=r3 offset=36 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(36)) = (uint8_t)r3; - // EBPF_OP_MOV64_REG pc=190 dst=r3 src=r2 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=194 dst=r3 src=r2 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r3 = r2; - // EBPF_OP_RSH64_IMM pc=191 dst=r3 src=r0 offset=0 imm=56 + // EBPF_OP_RSH64_IMM pc=195 dst=r3 src=r0 offset=0 imm=56 #line 34 "sample/./xdp_common.h" r3 >>= (IMMEDIATE(56) & 63); - // EBPF_OP_STXB pc=192 dst=r1 src=r3 offset=37 imm=0 + // EBPF_OP_STXB pc=196 dst=r1 src=r3 offset=37 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(37)) = (uint8_t)r3; - // EBPF_OP_MOV64_REG pc=193 dst=r3 src=r2 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=197 dst=r3 src=r2 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r3 = r2; - // EBPF_OP_RSH64_IMM pc=194 dst=r3 src=r0 offset=0 imm=32 + // EBPF_OP_RSH64_IMM pc=198 dst=r3 src=r0 offset=0 imm=32 #line 34 "sample/./xdp_common.h" r3 >>= (IMMEDIATE(32) & 63); - // EBPF_OP_STXB pc=195 dst=r1 src=r3 offset=34 imm=0 + // EBPF_OP_STXB pc=199 dst=r1 src=r3 offset=34 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(34)) = (uint8_t)r3; - // EBPF_OP_MOV64_REG pc=196 dst=r3 src=r2 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=200 dst=r3 src=r2 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r3 = r2; - // EBPF_OP_RSH64_IMM pc=197 dst=r3 src=r0 offset=0 imm=40 + // EBPF_OP_RSH64_IMM pc=201 dst=r3 src=r0 offset=0 imm=40 #line 34 "sample/./xdp_common.h" r3 >>= (IMMEDIATE(40) & 63); - // EBPF_OP_STXB pc=198 dst=r1 src=r3 offset=35 imm=0 + // EBPF_OP_STXB pc=202 dst=r1 src=r3 offset=35 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(35)) = (uint8_t)r3; - // EBPF_OP_MOV64_REG pc=199 dst=r3 src=r2 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=203 dst=r3 src=r2 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r3 = r2; - // EBPF_OP_RSH64_IMM pc=200 dst=r3 src=r0 offset=0 imm=16 + // EBPF_OP_RSH64_IMM pc=204 dst=r3 src=r0 offset=0 imm=16 #line 34 "sample/./xdp_common.h" r3 >>= (IMMEDIATE(16) & 63); - // EBPF_OP_STXB pc=201 dst=r1 src=r3 offset=32 imm=0 + // EBPF_OP_STXB pc=205 dst=r1 src=r3 offset=32 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(32)) = (uint8_t)r3; - // EBPF_OP_MOV64_REG pc=202 dst=r3 src=r2 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=206 dst=r3 src=r2 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r3 = r2; - // EBPF_OP_RSH64_IMM pc=203 dst=r3 src=r0 offset=0 imm=24 + // EBPF_OP_RSH64_IMM pc=207 dst=r3 src=r0 offset=0 imm=24 #line 34 "sample/./xdp_common.h" r3 >>= (IMMEDIATE(24) & 63); - // EBPF_OP_STXB pc=204 dst=r1 src=r3 offset=33 imm=0 + // EBPF_OP_STXB pc=208 dst=r1 src=r3 offset=33 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(33)) = (uint8_t)r3; - // EBPF_OP_STXB pc=205 dst=r1 src=r2 offset=30 imm=0 + // EBPF_OP_STXB pc=209 dst=r1 src=r2 offset=30 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(30)) = (uint8_t)r2; - // EBPF_OP_RSH64_IMM pc=206 dst=r2 src=r0 offset=0 imm=8 + // EBPF_OP_RSH64_IMM pc=210 dst=r2 src=r0 offset=0 imm=8 #line 34 "sample/./xdp_common.h" r2 >>= (IMMEDIATE(8) & 63); - // EBPF_OP_STXB pc=207 dst=r1 src=r2 offset=31 imm=0 + // EBPF_OP_STXB pc=211 dst=r1 src=r2 offset=31 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(31)) = (uint8_t)r2; + // EBPF_OP_LDXH pc=212 dst=r2 src=r1 offset=54 imm=0 +#line 40 "sample/./xdp_common.h" + r2 = *(uint16_t*)(uintptr_t)(r1 + OFFSET(54)); + // EBPF_OP_STXH pc=213 dst=r1 src=r2 offset=56 imm=0 +#line 42 "sample/./xdp_common.h" + *(uint16_t*)(uintptr_t)(r1 + OFFSET(56)) = (uint16_t)r2; + // EBPF_OP_MOV64_IMM pc=214 dst=r2 src=r0 offset=0 imm=7459 +#line 42 "sample/./xdp_common.h" + r2 = IMMEDIATE(7459); + // EBPF_OP_STXH pc=215 dst=r1 src=r2 offset=54 imm=0 +#line 41 "sample/./xdp_common.h" + *(uint16_t*)(uintptr_t)(r1 + OFFSET(54)) = (uint16_t)r2; label_2: - // EBPF_OP_MOV64_IMM pc=208 dst=r0 src=r0 offset=0 imm=3 -#line 34 "sample/./xdp_common.h" + // EBPF_OP_MOV64_IMM pc=216 dst=r0 src=r0 offset=0 imm=3 +#line 41 "sample/./xdp_common.h" r0 = IMMEDIATE(3); label_3: - // EBPF_OP_EXIT pc=209 dst=r0 src=r0 offset=0 imm=0 -#line 34 "sample/./xdp_common.h" + // EBPF_OP_EXIT pc=217 dst=r0 src=r0 offset=0 imm=0 +#line 41 "sample/./xdp_common.h" return r0; -#line 34 "sample/./xdp_common.h" +#line 41 "sample/./xdp_common.h" } #pragma code_seg(pop) #line __LINE__ __FILE__ @@ -724,7 +748,7 @@ static program_entry_t _programs[] = { 0, NULL, 0, - 210, + 218, &reflect_packet_program_type_guid, &reflect_packet_attach_type_guid, }, diff --git a/tests/bpf2c_tests/expected/reflect_packet_sys.c b/tests/bpf2c_tests/expected/reflect_packet_sys.c index baec1d722c..94bc4e21df 100644 --- a/tests/bpf2c_tests/expected/reflect_packet_sys.c +++ b/tests/bpf2c_tests/expected/reflect_packet_sys.c @@ -216,32 +216,32 @@ reflect_packet(void* context) // EBPF_OP_MOV64_IMM pc=0 dst=r0 src=r0 offset=0 imm=1 #line 23 "sample/reflect_packet.c" r0 = IMMEDIATE(1); - // EBPF_OP_LDXDW pc=1 dst=r2 src=r1 offset=8 imm=0 + // EBPF_OP_LDXDW pc=1 dst=r3 src=r1 offset=8 imm=0 #line 29 "sample/reflect_packet.c" - r2 = *(uint64_t*)(uintptr_t)(r1 + OFFSET(8)); + r3 = *(uint64_t*)(uintptr_t)(r1 + OFFSET(8)); // EBPF_OP_LDXDW pc=2 dst=r1 src=r1 offset=0 imm=0 #line 28 "sample/reflect_packet.c" r1 = *(uint64_t*)(uintptr_t)(r1 + OFFSET(0)); - // EBPF_OP_MOV64_REG pc=3 dst=r3 src=r1 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=3 dst=r2 src=r1 offset=0 imm=0 #line 29 "sample/reflect_packet.c" - r3 = r1; - // EBPF_OP_ADD64_IMM pc=4 dst=r3 src=r0 offset=0 imm=14 + r2 = r1; + // EBPF_OP_ADD64_IMM pc=4 dst=r2 src=r0 offset=0 imm=14 #line 29 "sample/reflect_packet.c" - r3 += IMMEDIATE(14); - // EBPF_OP_JGT_REG pc=5 dst=r3 src=r2 offset=203 imm=0 + r2 += IMMEDIATE(14); + // EBPF_OP_JGT_REG pc=5 dst=r2 src=r3 offset=211 imm=0 #line 29 "sample/reflect_packet.c" - if (r3 > r2) + if (r2 > r3) #line 29 "sample/reflect_packet.c" goto label_3; // EBPF_OP_LDXH pc=6 dst=r4 src=r1 offset=12 imm=0 #line 34 "sample/reflect_packet.c" r4 = *(uint16_t*)(uintptr_t)(r1 + OFFSET(12)); - // EBPF_OP_JEQ_IMM pc=7 dst=r4 src=r0 offset=56 imm=56710 + // EBPF_OP_JEQ_IMM pc=7 dst=r4 src=r0 offset=60 imm=56710 #line 34 "sample/reflect_packet.c" if (r4 == IMMEDIATE(56710)) #line 34 "sample/reflect_packet.c" goto label_1; - // EBPF_OP_JNE_IMM pc=8 dst=r4 src=r0 offset=200 imm=8 + // EBPF_OP_JNE_IMM pc=8 dst=r4 src=r0 offset=208 imm=8 #line 34 "sample/reflect_packet.c" if (r4 != IMMEDIATE(8)) #line 34 "sample/reflect_packet.c" @@ -252,15 +252,15 @@ reflect_packet(void* context) // EBPF_OP_ADD64_IMM pc=10 dst=r4 src=r0 offset=0 imm=34 #line 35 "sample/reflect_packet.c" r4 += IMMEDIATE(34); - // EBPF_OP_JGT_REG pc=11 dst=r4 src=r2 offset=197 imm=0 + // EBPF_OP_JGT_REG pc=11 dst=r4 src=r3 offset=205 imm=0 #line 35 "sample/reflect_packet.c" - if (r4 > r2) + if (r4 > r3) #line 35 "sample/reflect_packet.c" goto label_3; // EBPF_OP_LDXB pc=12 dst=r4 src=r1 offset=23 imm=0 #line 41 "sample/reflect_packet.c" r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(23)); - // EBPF_OP_JNE_IMM pc=13 dst=r4 src=r0 offset=195 imm=17 + // EBPF_OP_JNE_IMM pc=13 dst=r4 src=r0 offset=203 imm=17 #line 41 "sample/reflect_packet.c" if (r4 != IMMEDIATE(17)) #line 41 "sample/reflect_packet.c" @@ -274,601 +274,625 @@ reflect_packet(void* context) // EBPF_OP_AND64_IMM pc=16 dst=r4 src=r0 offset=0 imm=60 #line 41 "sample/reflect_packet.c" r4 &= IMMEDIATE(60); - // EBPF_OP_ADD64_REG pc=17 dst=r3 src=r4 offset=0 imm=0 + // EBPF_OP_ADD64_REG pc=17 dst=r2 src=r4 offset=0 imm=0 #line 41 "sample/reflect_packet.c" - r3 += r4; - // EBPF_OP_MOV64_REG pc=18 dst=r4 src=r3 offset=0 imm=0 + r2 += r4; + // EBPF_OP_MOV64_REG pc=18 dst=r4 src=r2 offset=0 imm=0 #line 41 "sample/reflect_packet.c" - r4 = r3; + r4 = r2; // EBPF_OP_ADD64_IMM pc=19 dst=r4 src=r0 offset=0 imm=8 #line 41 "sample/reflect_packet.c" r4 += IMMEDIATE(8); - // EBPF_OP_JGT_REG pc=20 dst=r4 src=r2 offset=188 imm=0 + // EBPF_OP_JGT_REG pc=20 dst=r4 src=r3 offset=196 imm=0 #line 41 "sample/reflect_packet.c" - if (r4 > r2) + if (r4 > r3) #line 41 "sample/reflect_packet.c" goto label_3; - // EBPF_OP_LDXH pc=21 dst=r2 src=r3 offset=2 imm=0 + // EBPF_OP_LDXH pc=21 dst=r3 src=r2 offset=2 imm=0 #line 47 "sample/reflect_packet.c" - r2 = *(uint16_t*)(uintptr_t)(r3 + OFFSET(2)); - // EBPF_OP_JNE_IMM pc=22 dst=r2 src=r0 offset=186 imm=7459 + r3 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(2)); + // EBPF_OP_JNE_IMM pc=22 dst=r3 src=r0 offset=194 imm=7459 #line 47 "sample/reflect_packet.c" - if (r2 != IMMEDIATE(7459)) + if (r3 != IMMEDIATE(7459)) #line 47 "sample/reflect_packet.c" goto label_3; - // EBPF_OP_LDXB pc=23 dst=r2 src=r1 offset=5 imm=0 + // EBPF_OP_LDXB pc=23 dst=r3 src=r1 offset=5 imm=0 #line 15 "sample/./xdp_common.h" - r2 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(5)); - // EBPF_OP_LSH64_IMM pc=24 dst=r2 src=r0 offset=0 imm=8 + r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(5)); + // EBPF_OP_LSH64_IMM pc=24 dst=r3 src=r0 offset=0 imm=8 #line 15 "sample/./xdp_common.h" - r2 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=25 dst=r3 src=r1 offset=4 imm=0 + r3 <<= (IMMEDIATE(8) & 63); + // EBPF_OP_LDXB pc=25 dst=r4 src=r1 offset=4 imm=0 #line 15 "sample/./xdp_common.h" - r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(4)); - // EBPF_OP_OR64_REG pc=26 dst=r2 src=r3 offset=0 imm=0 + r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(4)); + // EBPF_OP_OR64_REG pc=26 dst=r3 src=r4 offset=0 imm=0 #line 15 "sample/./xdp_common.h" - r2 |= r3; - // EBPF_OP_STXH pc=27 dst=r10 src=r2 offset=-12 imm=0 + r3 |= r4; + // EBPF_OP_STXH pc=27 dst=r10 src=r3 offset=-12 imm=0 #line 15 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r10 + OFFSET(-12)) = (uint16_t)r2; - // EBPF_OP_LDXB pc=28 dst=r2 src=r1 offset=1 imm=0 + *(uint16_t*)(uintptr_t)(r10 + OFFSET(-12)) = (uint16_t)r3; + // EBPF_OP_LDXB pc=28 dst=r3 src=r1 offset=1 imm=0 #line 15 "sample/./xdp_common.h" - r2 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(1)); - // EBPF_OP_LSH64_IMM pc=29 dst=r2 src=r0 offset=0 imm=8 + r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(1)); + // EBPF_OP_LSH64_IMM pc=29 dst=r3 src=r0 offset=0 imm=8 #line 15 "sample/./xdp_common.h" - r2 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=30 dst=r3 src=r1 offset=0 imm=0 + r3 <<= (IMMEDIATE(8) & 63); + // EBPF_OP_LDXB pc=30 dst=r4 src=r1 offset=0 imm=0 #line 15 "sample/./xdp_common.h" - r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(0)); - // EBPF_OP_OR64_REG pc=31 dst=r2 src=r3 offset=0 imm=0 + r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(0)); + // EBPF_OP_OR64_REG pc=31 dst=r3 src=r4 offset=0 imm=0 #line 15 "sample/./xdp_common.h" - r2 |= r3; - // EBPF_OP_LDXB pc=32 dst=r3 src=r1 offset=3 imm=0 + r3 |= r4; + // EBPF_OP_LDXB pc=32 dst=r4 src=r1 offset=3 imm=0 #line 15 "sample/./xdp_common.h" - r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(3)); - // EBPF_OP_LSH64_IMM pc=33 dst=r3 src=r0 offset=0 imm=8 + r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(3)); + // EBPF_OP_LSH64_IMM pc=33 dst=r4 src=r0 offset=0 imm=8 #line 15 "sample/./xdp_common.h" - r3 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=34 dst=r4 src=r1 offset=2 imm=0 + r4 <<= (IMMEDIATE(8) & 63); + // EBPF_OP_LDXB pc=34 dst=r5 src=r1 offset=2 imm=0 #line 15 "sample/./xdp_common.h" - r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(2)); - // EBPF_OP_OR64_REG pc=35 dst=r3 src=r4 offset=0 imm=0 + r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(2)); + // EBPF_OP_OR64_REG pc=35 dst=r4 src=r5 offset=0 imm=0 #line 15 "sample/./xdp_common.h" - r3 |= r4; - // EBPF_OP_LSH64_IMM pc=36 dst=r3 src=r0 offset=0 imm=16 + r4 |= r5; + // EBPF_OP_LSH64_IMM pc=36 dst=r4 src=r0 offset=0 imm=16 #line 15 "sample/./xdp_common.h" - r3 <<= (IMMEDIATE(16) & 63); - // EBPF_OP_OR64_REG pc=37 dst=r3 src=r2 offset=0 imm=0 + r4 <<= (IMMEDIATE(16) & 63); + // EBPF_OP_OR64_REG pc=37 dst=r4 src=r3 offset=0 imm=0 #line 15 "sample/./xdp_common.h" - r3 |= r2; - // EBPF_OP_STXW pc=38 dst=r10 src=r3 offset=-16 imm=0 + r4 |= r3; + // EBPF_OP_STXW pc=38 dst=r10 src=r4 offset=-16 imm=0 #line 15 "sample/./xdp_common.h" - *(uint32_t*)(uintptr_t)(r10 + OFFSET(-16)) = (uint32_t)r3; - // EBPF_OP_LDXH pc=39 dst=r2 src=r1 offset=6 imm=0 + *(uint32_t*)(uintptr_t)(r10 + OFFSET(-16)) = (uint32_t)r4; + // EBPF_OP_LDXH pc=39 dst=r3 src=r1 offset=6 imm=0 #line 16 "sample/./xdp_common.h" - r2 = *(uint16_t*)(uintptr_t)(r1 + OFFSET(6)); - // EBPF_OP_STXH pc=40 dst=r1 src=r2 offset=0 imm=0 + r3 = *(uint16_t*)(uintptr_t)(r1 + OFFSET(6)); + // EBPF_OP_STXH pc=40 dst=r1 src=r3 offset=0 imm=0 #line 16 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r1 + OFFSET(0)) = (uint16_t)r2; - // EBPF_OP_LDXH pc=41 dst=r2 src=r1 offset=8 imm=0 + *(uint16_t*)(uintptr_t)(r1 + OFFSET(0)) = (uint16_t)r3; + // EBPF_OP_LDXH pc=41 dst=r3 src=r1 offset=8 imm=0 #line 16 "sample/./xdp_common.h" - r2 = *(uint16_t*)(uintptr_t)(r1 + OFFSET(8)); - // EBPF_OP_STXH pc=42 dst=r1 src=r2 offset=2 imm=0 + r3 = *(uint16_t*)(uintptr_t)(r1 + OFFSET(8)); + // EBPF_OP_STXH pc=42 dst=r1 src=r3 offset=2 imm=0 #line 16 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r1 + OFFSET(2)) = (uint16_t)r2; - // EBPF_OP_LDXH pc=43 dst=r2 src=r1 offset=10 imm=0 + *(uint16_t*)(uintptr_t)(r1 + OFFSET(2)) = (uint16_t)r3; + // EBPF_OP_LDXH pc=43 dst=r3 src=r1 offset=10 imm=0 #line 16 "sample/./xdp_common.h" - r2 = *(uint16_t*)(uintptr_t)(r1 + OFFSET(10)); - // EBPF_OP_STXH pc=44 dst=r1 src=r2 offset=4 imm=0 + r3 = *(uint16_t*)(uintptr_t)(r1 + OFFSET(10)); + // EBPF_OP_STXH pc=44 dst=r1 src=r3 offset=4 imm=0 #line 16 "sample/./xdp_common.h" - *(uint16_t*)(uintptr_t)(r1 + OFFSET(4)) = (uint16_t)r2; - // EBPF_OP_LDXW pc=45 dst=r2 src=r10 offset=-16 imm=0 + *(uint16_t*)(uintptr_t)(r1 + OFFSET(4)) = (uint16_t)r3; + // EBPF_OP_LDXW pc=45 dst=r3 src=r10 offset=-16 imm=0 #line 17 "sample/./xdp_common.h" - r2 = *(uint32_t*)(uintptr_t)(r10 + OFFSET(-16)); - // EBPF_OP_MOV64_REG pc=46 dst=r3 src=r2 offset=0 imm=0 + r3 = *(uint32_t*)(uintptr_t)(r10 + OFFSET(-16)); + // EBPF_OP_MOV64_REG pc=46 dst=r4 src=r3 offset=0 imm=0 #line 17 "sample/./xdp_common.h" - r3 = r2; - // EBPF_OP_RSH64_IMM pc=47 dst=r3 src=r0 offset=0 imm=16 + r4 = r3; + // EBPF_OP_RSH64_IMM pc=47 dst=r4 src=r0 offset=0 imm=16 #line 17 "sample/./xdp_common.h" - r3 >>= (IMMEDIATE(16) & 63); - // EBPF_OP_STXB pc=48 dst=r1 src=r3 offset=8 imm=0 + r4 >>= (IMMEDIATE(16) & 63); + // EBPF_OP_STXB pc=48 dst=r1 src=r4 offset=8 imm=0 #line 17 "sample/./xdp_common.h" - *(uint8_t*)(uintptr_t)(r1 + OFFSET(8)) = (uint8_t)r3; - // EBPF_OP_MOV64_REG pc=49 dst=r3 src=r2 offset=0 imm=0 + *(uint8_t*)(uintptr_t)(r1 + OFFSET(8)) = (uint8_t)r4; + // EBPF_OP_MOV64_REG pc=49 dst=r4 src=r3 offset=0 imm=0 #line 17 "sample/./xdp_common.h" - r3 = r2; - // EBPF_OP_RSH64_IMM pc=50 dst=r3 src=r0 offset=0 imm=24 + r4 = r3; + // EBPF_OP_RSH64_IMM pc=50 dst=r4 src=r0 offset=0 imm=24 #line 17 "sample/./xdp_common.h" - r3 >>= (IMMEDIATE(24) & 63); - // EBPF_OP_STXB pc=51 dst=r1 src=r3 offset=9 imm=0 + r4 >>= (IMMEDIATE(24) & 63); + // EBPF_OP_STXB pc=51 dst=r1 src=r4 offset=9 imm=0 #line 17 "sample/./xdp_common.h" - *(uint8_t*)(uintptr_t)(r1 + OFFSET(9)) = (uint8_t)r3; - // EBPF_OP_STXB pc=52 dst=r1 src=r2 offset=6 imm=0 + *(uint8_t*)(uintptr_t)(r1 + OFFSET(9)) = (uint8_t)r4; + // EBPF_OP_STXB pc=52 dst=r1 src=r3 offset=6 imm=0 #line 17 "sample/./xdp_common.h" - *(uint8_t*)(uintptr_t)(r1 + OFFSET(6)) = (uint8_t)r2; - // EBPF_OP_RSH64_IMM pc=53 dst=r2 src=r0 offset=0 imm=8 + *(uint8_t*)(uintptr_t)(r1 + OFFSET(6)) = (uint8_t)r3; + // EBPF_OP_RSH64_IMM pc=53 dst=r3 src=r0 offset=0 imm=8 #line 17 "sample/./xdp_common.h" - r2 >>= (IMMEDIATE(8) & 63); - // EBPF_OP_STXB pc=54 dst=r1 src=r2 offset=7 imm=0 + r3 >>= (IMMEDIATE(8) & 63); + // EBPF_OP_STXB pc=54 dst=r1 src=r3 offset=7 imm=0 #line 17 "sample/./xdp_common.h" - *(uint8_t*)(uintptr_t)(r1 + OFFSET(7)) = (uint8_t)r2; - // EBPF_OP_LDXH pc=55 dst=r2 src=r10 offset=-12 imm=0 + *(uint8_t*)(uintptr_t)(r1 + OFFSET(7)) = (uint8_t)r3; + // EBPF_OP_LDXH pc=55 dst=r3 src=r10 offset=-12 imm=0 #line 17 "sample/./xdp_common.h" - r2 = *(uint16_t*)(uintptr_t)(r10 + OFFSET(-12)); - // EBPF_OP_STXB pc=56 dst=r1 src=r2 offset=10 imm=0 + r3 = *(uint16_t*)(uintptr_t)(r10 + OFFSET(-12)); + // EBPF_OP_STXB pc=56 dst=r1 src=r3 offset=10 imm=0 #line 17 "sample/./xdp_common.h" - *(uint8_t*)(uintptr_t)(r1 + OFFSET(10)) = (uint8_t)r2; - // EBPF_OP_RSH64_IMM pc=57 dst=r2 src=r0 offset=0 imm=8 + *(uint8_t*)(uintptr_t)(r1 + OFFSET(10)) = (uint8_t)r3; + // EBPF_OP_RSH64_IMM pc=57 dst=r3 src=r0 offset=0 imm=8 #line 17 "sample/./xdp_common.h" - r2 >>= (IMMEDIATE(8) & 63); - // EBPF_OP_STXB pc=58 dst=r1 src=r2 offset=11 imm=0 + r3 >>= (IMMEDIATE(8) & 63); + // EBPF_OP_STXB pc=58 dst=r1 src=r3 offset=11 imm=0 #line 17 "sample/./xdp_common.h" - *(uint8_t*)(uintptr_t)(r1 + OFFSET(11)) = (uint8_t)r2; - // EBPF_OP_LDXW pc=59 dst=r2 src=r1 offset=30 imm=0 + *(uint8_t*)(uintptr_t)(r1 + OFFSET(11)) = (uint8_t)r3; + // EBPF_OP_LDXW pc=59 dst=r3 src=r1 offset=30 imm=0 #line 23 "sample/./xdp_common.h" - r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(30)); - // EBPF_OP_LDXW pc=60 dst=r3 src=r1 offset=26 imm=0 + r3 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(30)); + // EBPF_OP_LDXW pc=60 dst=r4 src=r1 offset=26 imm=0 #line 24 "sample/./xdp_common.h" - r3 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(26)); - // EBPF_OP_STXW pc=61 dst=r1 src=r3 offset=30 imm=0 + r4 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(26)); + // EBPF_OP_STXW pc=61 dst=r1 src=r4 offset=30 imm=0 #line 24 "sample/./xdp_common.h" - *(uint32_t*)(uintptr_t)(r1 + OFFSET(30)) = (uint32_t)r3; - // EBPF_OP_STXW pc=62 dst=r1 src=r2 offset=26 imm=0 -#line 25 "sample/./xdp_common.h" - *(uint32_t*)(uintptr_t)(r1 + OFFSET(26)) = (uint32_t)r2; - // EBPF_OP_JA pc=63 dst=r0 src=r0 offset=144 imm=0 + *(uint32_t*)(uintptr_t)(r1 + OFFSET(30)) = (uint32_t)r4; + // EBPF_OP_STXW pc=62 dst=r1 src=r3 offset=26 imm=0 #line 25 "sample/./xdp_common.h" + *(uint32_t*)(uintptr_t)(r1 + OFFSET(26)) = (uint32_t)r3; + // EBPF_OP_LDXH pc=63 dst=r1 src=r2 offset=2 imm=0 +#line 41 "sample/./xdp_common.h" + r1 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(2)); + // EBPF_OP_LDXH pc=64 dst=r3 src=r2 offset=0 imm=0 +#line 40 "sample/./xdp_common.h" + r3 = *(uint16_t*)(uintptr_t)(r2 + OFFSET(0)); + // EBPF_OP_STXH pc=65 dst=r2 src=r3 offset=2 imm=0 +#line 42 "sample/./xdp_common.h" + *(uint16_t*)(uintptr_t)(r2 + OFFSET(2)) = (uint16_t)r3; + // EBPF_OP_STXH pc=66 dst=r2 src=r1 offset=0 imm=0 +#line 41 "sample/./xdp_common.h" + *(uint16_t*)(uintptr_t)(r2 + OFFSET(0)) = (uint16_t)r1; + // EBPF_OP_JA pc=67 dst=r0 src=r0 offset=148 imm=0 +#line 41 "sample/./xdp_common.h" goto label_2; label_1: - // EBPF_OP_MOV64_REG pc=64 dst=r3 src=r1 offset=0 imm=0 -#line 55 "sample/reflect_packet.c" - r3 = r1; - // EBPF_OP_ADD64_IMM pc=65 dst=r3 src=r0 offset=0 imm=54 -#line 55 "sample/reflect_packet.c" - r3 += IMMEDIATE(54); - // EBPF_OP_JGT_REG pc=66 dst=r3 src=r2 offset=142 imm=0 -#line 55 "sample/reflect_packet.c" - if (r3 > r2) -#line 55 "sample/reflect_packet.c" + // EBPF_OP_MOV64_REG pc=68 dst=r2 src=r1 offset=0 imm=0 +#line 56 "sample/reflect_packet.c" + r2 = r1; + // EBPF_OP_ADD64_IMM pc=69 dst=r2 src=r0 offset=0 imm=54 +#line 56 "sample/reflect_packet.c" + r2 += IMMEDIATE(54); + // EBPF_OP_JGT_REG pc=70 dst=r2 src=r3 offset=146 imm=0 +#line 56 "sample/reflect_packet.c" + if (r2 > r3) +#line 56 "sample/reflect_packet.c" goto label_3; - // EBPF_OP_MOV64_REG pc=67 dst=r3 src=r1 offset=0 imm=0 -#line 55 "sample/reflect_packet.c" - r3 = r1; - // EBPF_OP_ADD64_IMM pc=68 dst=r3 src=r0 offset=0 imm=62 -#line 55 "sample/reflect_packet.c" - r3 += IMMEDIATE(62); - // EBPF_OP_JGT_REG pc=69 dst=r3 src=r2 offset=139 imm=0 -#line 61 "sample/reflect_packet.c" - if (r3 > r2) -#line 61 "sample/reflect_packet.c" + // EBPF_OP_MOV64_REG pc=71 dst=r2 src=r1 offset=0 imm=0 +#line 56 "sample/reflect_packet.c" + r2 = r1; + // EBPF_OP_ADD64_IMM pc=72 dst=r2 src=r0 offset=0 imm=62 +#line 56 "sample/reflect_packet.c" + r2 += IMMEDIATE(62); + // EBPF_OP_JGT_REG pc=73 dst=r2 src=r3 offset=143 imm=0 +#line 62 "sample/reflect_packet.c" + if (r2 > r3) +#line 62 "sample/reflect_packet.c" goto label_3; - // EBPF_OP_LDXB pc=70 dst=r2 src=r1 offset=20 imm=0 -#line 61 "sample/reflect_packet.c" + // EBPF_OP_LDXB pc=74 dst=r2 src=r1 offset=20 imm=0 +#line 62 "sample/reflect_packet.c" r2 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(20)); - // EBPF_OP_JNE_IMM pc=71 dst=r2 src=r0 offset=137 imm=17 -#line 61 "sample/reflect_packet.c" + // EBPF_OP_JNE_IMM pc=75 dst=r2 src=r0 offset=141 imm=17 +#line 62 "sample/reflect_packet.c" if (r2 != IMMEDIATE(17)) -#line 61 "sample/reflect_packet.c" +#line 62 "sample/reflect_packet.c" goto label_3; - // EBPF_OP_LDXH pc=72 dst=r2 src=r1 offset=56 imm=0 -#line 67 "sample/reflect_packet.c" + // EBPF_OP_LDXH pc=76 dst=r2 src=r1 offset=56 imm=0 +#line 68 "sample/reflect_packet.c" r2 = *(uint16_t*)(uintptr_t)(r1 + OFFSET(56)); - // EBPF_OP_JNE_IMM pc=73 dst=r2 src=r0 offset=135 imm=7459 -#line 67 "sample/reflect_packet.c" + // EBPF_OP_JNE_IMM pc=77 dst=r2 src=r0 offset=139 imm=7459 +#line 68 "sample/reflect_packet.c" if (r2 != IMMEDIATE(7459)) -#line 67 "sample/reflect_packet.c" +#line 68 "sample/reflect_packet.c" goto label_3; - // EBPF_OP_LDXB pc=74 dst=r2 src=r1 offset=5 imm=0 + // EBPF_OP_LDXB pc=78 dst=r2 src=r1 offset=5 imm=0 #line 15 "sample/./xdp_common.h" r2 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(5)); - // EBPF_OP_LSH64_IMM pc=75 dst=r2 src=r0 offset=0 imm=8 + // EBPF_OP_LSH64_IMM pc=79 dst=r2 src=r0 offset=0 imm=8 #line 15 "sample/./xdp_common.h" r2 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=76 dst=r3 src=r1 offset=4 imm=0 + // EBPF_OP_LDXB pc=80 dst=r3 src=r1 offset=4 imm=0 #line 15 "sample/./xdp_common.h" r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(4)); - // EBPF_OP_OR64_REG pc=77 dst=r2 src=r3 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=81 dst=r2 src=r3 offset=0 imm=0 #line 15 "sample/./xdp_common.h" r2 |= r3; - // EBPF_OP_STXH pc=78 dst=r10 src=r2 offset=-12 imm=0 + // EBPF_OP_STXH pc=82 dst=r10 src=r2 offset=-12 imm=0 #line 15 "sample/./xdp_common.h" *(uint16_t*)(uintptr_t)(r10 + OFFSET(-12)) = (uint16_t)r2; - // EBPF_OP_LDXB pc=79 dst=r2 src=r1 offset=1 imm=0 + // EBPF_OP_LDXB pc=83 dst=r2 src=r1 offset=1 imm=0 #line 15 "sample/./xdp_common.h" r2 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(1)); - // EBPF_OP_LSH64_IMM pc=80 dst=r2 src=r0 offset=0 imm=8 + // EBPF_OP_LSH64_IMM pc=84 dst=r2 src=r0 offset=0 imm=8 #line 15 "sample/./xdp_common.h" r2 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=81 dst=r3 src=r1 offset=0 imm=0 + // EBPF_OP_LDXB pc=85 dst=r3 src=r1 offset=0 imm=0 #line 15 "sample/./xdp_common.h" r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(0)); - // EBPF_OP_OR64_REG pc=82 dst=r2 src=r3 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=86 dst=r2 src=r3 offset=0 imm=0 #line 15 "sample/./xdp_common.h" r2 |= r3; - // EBPF_OP_LDXB pc=83 dst=r3 src=r1 offset=3 imm=0 + // EBPF_OP_LDXB pc=87 dst=r3 src=r1 offset=3 imm=0 #line 15 "sample/./xdp_common.h" r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(3)); - // EBPF_OP_LSH64_IMM pc=84 dst=r3 src=r0 offset=0 imm=8 + // EBPF_OP_LSH64_IMM pc=88 dst=r3 src=r0 offset=0 imm=8 #line 15 "sample/./xdp_common.h" r3 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=85 dst=r4 src=r1 offset=2 imm=0 + // EBPF_OP_LDXB pc=89 dst=r4 src=r1 offset=2 imm=0 #line 15 "sample/./xdp_common.h" r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(2)); - // EBPF_OP_OR64_REG pc=86 dst=r3 src=r4 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=90 dst=r3 src=r4 offset=0 imm=0 #line 15 "sample/./xdp_common.h" r3 |= r4; - // EBPF_OP_LSH64_IMM pc=87 dst=r3 src=r0 offset=0 imm=16 + // EBPF_OP_LSH64_IMM pc=91 dst=r3 src=r0 offset=0 imm=16 #line 15 "sample/./xdp_common.h" r3 <<= (IMMEDIATE(16) & 63); - // EBPF_OP_OR64_REG pc=88 dst=r3 src=r2 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=92 dst=r3 src=r2 offset=0 imm=0 #line 15 "sample/./xdp_common.h" r3 |= r2; - // EBPF_OP_STXW pc=89 dst=r10 src=r3 offset=-16 imm=0 + // EBPF_OP_STXW pc=93 dst=r10 src=r3 offset=-16 imm=0 #line 15 "sample/./xdp_common.h" *(uint32_t*)(uintptr_t)(r10 + OFFSET(-16)) = (uint32_t)r3; - // EBPF_OP_LDXH pc=90 dst=r2 src=r1 offset=6 imm=0 + // EBPF_OP_LDXH pc=94 dst=r2 src=r1 offset=6 imm=0 #line 16 "sample/./xdp_common.h" r2 = *(uint16_t*)(uintptr_t)(r1 + OFFSET(6)); - // EBPF_OP_STXH pc=91 dst=r1 src=r2 offset=0 imm=0 + // EBPF_OP_STXH pc=95 dst=r1 src=r2 offset=0 imm=0 #line 16 "sample/./xdp_common.h" *(uint16_t*)(uintptr_t)(r1 + OFFSET(0)) = (uint16_t)r2; - // EBPF_OP_LDXH pc=92 dst=r2 src=r1 offset=8 imm=0 + // EBPF_OP_LDXH pc=96 dst=r2 src=r1 offset=8 imm=0 #line 16 "sample/./xdp_common.h" r2 = *(uint16_t*)(uintptr_t)(r1 + OFFSET(8)); - // EBPF_OP_STXH pc=93 dst=r1 src=r2 offset=2 imm=0 + // EBPF_OP_STXH pc=97 dst=r1 src=r2 offset=2 imm=0 #line 16 "sample/./xdp_common.h" *(uint16_t*)(uintptr_t)(r1 + OFFSET(2)) = (uint16_t)r2; - // EBPF_OP_LDXH pc=94 dst=r2 src=r1 offset=10 imm=0 + // EBPF_OP_LDXH pc=98 dst=r2 src=r1 offset=10 imm=0 #line 16 "sample/./xdp_common.h" r2 = *(uint16_t*)(uintptr_t)(r1 + OFFSET(10)); - // EBPF_OP_STXH pc=95 dst=r1 src=r2 offset=4 imm=0 + // EBPF_OP_STXH pc=99 dst=r1 src=r2 offset=4 imm=0 #line 16 "sample/./xdp_common.h" *(uint16_t*)(uintptr_t)(r1 + OFFSET(4)) = (uint16_t)r2; - // EBPF_OP_LDXW pc=96 dst=r2 src=r10 offset=-16 imm=0 + // EBPF_OP_LDXW pc=100 dst=r2 src=r10 offset=-16 imm=0 #line 17 "sample/./xdp_common.h" r2 = *(uint32_t*)(uintptr_t)(r10 + OFFSET(-16)); - // EBPF_OP_MOV64_REG pc=97 dst=r3 src=r2 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=101 dst=r3 src=r2 offset=0 imm=0 #line 17 "sample/./xdp_common.h" r3 = r2; - // EBPF_OP_RSH64_IMM pc=98 dst=r3 src=r0 offset=0 imm=16 + // EBPF_OP_RSH64_IMM pc=102 dst=r3 src=r0 offset=0 imm=16 #line 17 "sample/./xdp_common.h" r3 >>= (IMMEDIATE(16) & 63); - // EBPF_OP_STXB pc=99 dst=r1 src=r3 offset=8 imm=0 + // EBPF_OP_STXB pc=103 dst=r1 src=r3 offset=8 imm=0 #line 17 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(8)) = (uint8_t)r3; - // EBPF_OP_MOV64_REG pc=100 dst=r3 src=r2 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=104 dst=r3 src=r2 offset=0 imm=0 #line 17 "sample/./xdp_common.h" r3 = r2; - // EBPF_OP_RSH64_IMM pc=101 dst=r3 src=r0 offset=0 imm=24 + // EBPF_OP_RSH64_IMM pc=105 dst=r3 src=r0 offset=0 imm=24 #line 17 "sample/./xdp_common.h" r3 >>= (IMMEDIATE(24) & 63); - // EBPF_OP_STXB pc=102 dst=r1 src=r3 offset=9 imm=0 + // EBPF_OP_STXB pc=106 dst=r1 src=r3 offset=9 imm=0 #line 17 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(9)) = (uint8_t)r3; - // EBPF_OP_STXB pc=103 dst=r1 src=r2 offset=6 imm=0 + // EBPF_OP_STXB pc=107 dst=r1 src=r2 offset=6 imm=0 #line 17 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(6)) = (uint8_t)r2; - // EBPF_OP_RSH64_IMM pc=104 dst=r2 src=r0 offset=0 imm=8 + // EBPF_OP_RSH64_IMM pc=108 dst=r2 src=r0 offset=0 imm=8 #line 17 "sample/./xdp_common.h" r2 >>= (IMMEDIATE(8) & 63); - // EBPF_OP_STXB pc=105 dst=r1 src=r2 offset=7 imm=0 + // EBPF_OP_STXB pc=109 dst=r1 src=r2 offset=7 imm=0 #line 17 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(7)) = (uint8_t)r2; - // EBPF_OP_LDXH pc=106 dst=r2 src=r10 offset=-12 imm=0 + // EBPF_OP_LDXH pc=110 dst=r2 src=r10 offset=-12 imm=0 #line 17 "sample/./xdp_common.h" r2 = *(uint16_t*)(uintptr_t)(r10 + OFFSET(-12)); - // EBPF_OP_STXB pc=107 dst=r1 src=r2 offset=10 imm=0 + // EBPF_OP_STXB pc=111 dst=r1 src=r2 offset=10 imm=0 #line 17 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(10)) = (uint8_t)r2; - // EBPF_OP_RSH64_IMM pc=108 dst=r2 src=r0 offset=0 imm=8 + // EBPF_OP_RSH64_IMM pc=112 dst=r2 src=r0 offset=0 imm=8 #line 17 "sample/./xdp_common.h" r2 >>= (IMMEDIATE(8) & 63); - // EBPF_OP_STXB pc=109 dst=r1 src=r2 offset=11 imm=0 + // EBPF_OP_STXB pc=113 dst=r1 src=r2 offset=11 imm=0 #line 17 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(11)) = (uint8_t)r2; - // EBPF_OP_LDXB pc=110 dst=r3 src=r1 offset=47 imm=0 + // EBPF_OP_LDXB pc=114 dst=r3 src=r1 offset=47 imm=0 #line 32 "sample/./xdp_common.h" r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(47)); - // EBPF_OP_LSH64_IMM pc=111 dst=r3 src=r0 offset=0 imm=8 + // EBPF_OP_LSH64_IMM pc=115 dst=r3 src=r0 offset=0 imm=8 #line 32 "sample/./xdp_common.h" r3 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=112 dst=r2 src=r1 offset=46 imm=0 + // EBPF_OP_LDXB pc=116 dst=r2 src=r1 offset=46 imm=0 #line 32 "sample/./xdp_common.h" r2 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(46)); - // EBPF_OP_OR64_REG pc=113 dst=r3 src=r2 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=117 dst=r3 src=r2 offset=0 imm=0 #line 32 "sample/./xdp_common.h" r3 |= r2; - // EBPF_OP_LDXB pc=114 dst=r2 src=r1 offset=49 imm=0 + // EBPF_OP_LDXB pc=118 dst=r2 src=r1 offset=49 imm=0 #line 32 "sample/./xdp_common.h" r2 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(49)); - // EBPF_OP_LSH64_IMM pc=115 dst=r2 src=r0 offset=0 imm=8 + // EBPF_OP_LSH64_IMM pc=119 dst=r2 src=r0 offset=0 imm=8 #line 32 "sample/./xdp_common.h" r2 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=116 dst=r4 src=r1 offset=48 imm=0 + // EBPF_OP_LDXB pc=120 dst=r4 src=r1 offset=48 imm=0 #line 32 "sample/./xdp_common.h" r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(48)); - // EBPF_OP_OR64_REG pc=117 dst=r2 src=r4 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=121 dst=r2 src=r4 offset=0 imm=0 #line 32 "sample/./xdp_common.h" r2 |= r4; - // EBPF_OP_LSH64_IMM pc=118 dst=r2 src=r0 offset=0 imm=16 + // EBPF_OP_LSH64_IMM pc=122 dst=r2 src=r0 offset=0 imm=16 #line 32 "sample/./xdp_common.h" r2 <<= (IMMEDIATE(16) & 63); - // EBPF_OP_OR64_REG pc=119 dst=r2 src=r3 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=123 dst=r2 src=r3 offset=0 imm=0 #line 32 "sample/./xdp_common.h" r2 |= r3; - // EBPF_OP_LDXB pc=120 dst=r4 src=r1 offset=51 imm=0 + // EBPF_OP_LDXB pc=124 dst=r4 src=r1 offset=51 imm=0 #line 32 "sample/./xdp_common.h" r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(51)); - // EBPF_OP_LSH64_IMM pc=121 dst=r4 src=r0 offset=0 imm=8 + // EBPF_OP_LSH64_IMM pc=125 dst=r4 src=r0 offset=0 imm=8 #line 32 "sample/./xdp_common.h" r4 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=122 dst=r3 src=r1 offset=50 imm=0 + // EBPF_OP_LDXB pc=126 dst=r3 src=r1 offset=50 imm=0 #line 32 "sample/./xdp_common.h" r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(50)); - // EBPF_OP_OR64_REG pc=123 dst=r4 src=r3 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=127 dst=r4 src=r3 offset=0 imm=0 #line 32 "sample/./xdp_common.h" r4 |= r3; - // EBPF_OP_LDXB pc=124 dst=r3 src=r1 offset=53 imm=0 + // EBPF_OP_LDXB pc=128 dst=r3 src=r1 offset=53 imm=0 #line 32 "sample/./xdp_common.h" r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(53)); - // EBPF_OP_LSH64_IMM pc=125 dst=r3 src=r0 offset=0 imm=8 + // EBPF_OP_LSH64_IMM pc=129 dst=r3 src=r0 offset=0 imm=8 #line 32 "sample/./xdp_common.h" r3 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=126 dst=r5 src=r1 offset=52 imm=0 + // EBPF_OP_LDXB pc=130 dst=r5 src=r1 offset=52 imm=0 #line 32 "sample/./xdp_common.h" r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(52)); - // EBPF_OP_OR64_REG pc=127 dst=r3 src=r5 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=131 dst=r3 src=r5 offset=0 imm=0 #line 32 "sample/./xdp_common.h" r3 |= r5; - // EBPF_OP_LSH64_IMM pc=128 dst=r3 src=r0 offset=0 imm=16 + // EBPF_OP_LSH64_IMM pc=132 dst=r3 src=r0 offset=0 imm=16 #line 32 "sample/./xdp_common.h" r3 <<= (IMMEDIATE(16) & 63); - // EBPF_OP_OR64_REG pc=129 dst=r3 src=r4 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=133 dst=r3 src=r4 offset=0 imm=0 #line 32 "sample/./xdp_common.h" r3 |= r4; - // EBPF_OP_LSH64_IMM pc=130 dst=r3 src=r0 offset=0 imm=32 + // EBPF_OP_LSH64_IMM pc=134 dst=r3 src=r0 offset=0 imm=32 #line 32 "sample/./xdp_common.h" r3 <<= (IMMEDIATE(32) & 63); - // EBPF_OP_OR64_REG pc=131 dst=r3 src=r2 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=135 dst=r3 src=r2 offset=0 imm=0 #line 32 "sample/./xdp_common.h" r3 |= r2; - // EBPF_OP_LDXB pc=132 dst=r4 src=r1 offset=39 imm=0 + // EBPF_OP_LDXB pc=136 dst=r4 src=r1 offset=39 imm=0 #line 32 "sample/./xdp_common.h" r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(39)); - // EBPF_OP_LSH64_IMM pc=133 dst=r4 src=r0 offset=0 imm=8 + // EBPF_OP_LSH64_IMM pc=137 dst=r4 src=r0 offset=0 imm=8 #line 32 "sample/./xdp_common.h" r4 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=134 dst=r2 src=r1 offset=38 imm=0 + // EBPF_OP_LDXB pc=138 dst=r2 src=r1 offset=38 imm=0 #line 32 "sample/./xdp_common.h" r2 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(38)); - // EBPF_OP_OR64_REG pc=135 dst=r4 src=r2 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=139 dst=r4 src=r2 offset=0 imm=0 #line 32 "sample/./xdp_common.h" r4 |= r2; - // EBPF_OP_LDXB pc=136 dst=r2 src=r1 offset=41 imm=0 + // EBPF_OP_LDXB pc=140 dst=r2 src=r1 offset=41 imm=0 #line 32 "sample/./xdp_common.h" r2 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(41)); - // EBPF_OP_LSH64_IMM pc=137 dst=r2 src=r0 offset=0 imm=8 + // EBPF_OP_LSH64_IMM pc=141 dst=r2 src=r0 offset=0 imm=8 #line 32 "sample/./xdp_common.h" r2 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=138 dst=r5 src=r1 offset=40 imm=0 + // EBPF_OP_LDXB pc=142 dst=r5 src=r1 offset=40 imm=0 #line 32 "sample/./xdp_common.h" r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(40)); - // EBPF_OP_OR64_REG pc=139 dst=r2 src=r5 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=143 dst=r2 src=r5 offset=0 imm=0 #line 32 "sample/./xdp_common.h" r2 |= r5; - // EBPF_OP_STXDW pc=140 dst=r10 src=r3 offset=-8 imm=0 + // EBPF_OP_STXDW pc=144 dst=r10 src=r3 offset=-8 imm=0 #line 32 "sample/./xdp_common.h" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-8)) = (uint64_t)r3; - // EBPF_OP_LSH64_IMM pc=141 dst=r2 src=r0 offset=0 imm=16 + // EBPF_OP_LSH64_IMM pc=145 dst=r2 src=r0 offset=0 imm=16 #line 32 "sample/./xdp_common.h" r2 <<= (IMMEDIATE(16) & 63); - // EBPF_OP_OR64_REG pc=142 dst=r2 src=r4 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=146 dst=r2 src=r4 offset=0 imm=0 #line 32 "sample/./xdp_common.h" r2 |= r4; - // EBPF_OP_LDXB pc=143 dst=r3 src=r1 offset=43 imm=0 + // EBPF_OP_LDXB pc=147 dst=r3 src=r1 offset=43 imm=0 #line 32 "sample/./xdp_common.h" r3 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(43)); - // EBPF_OP_LSH64_IMM pc=144 dst=r3 src=r0 offset=0 imm=8 + // EBPF_OP_LSH64_IMM pc=148 dst=r3 src=r0 offset=0 imm=8 #line 32 "sample/./xdp_common.h" r3 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=145 dst=r4 src=r1 offset=42 imm=0 + // EBPF_OP_LDXB pc=149 dst=r4 src=r1 offset=42 imm=0 #line 32 "sample/./xdp_common.h" r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(42)); - // EBPF_OP_OR64_REG pc=146 dst=r3 src=r4 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=150 dst=r3 src=r4 offset=0 imm=0 #line 32 "sample/./xdp_common.h" r3 |= r4; - // EBPF_OP_LDXB pc=147 dst=r4 src=r1 offset=45 imm=0 + // EBPF_OP_LDXB pc=151 dst=r4 src=r1 offset=45 imm=0 #line 32 "sample/./xdp_common.h" r4 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(45)); - // EBPF_OP_LSH64_IMM pc=148 dst=r4 src=r0 offset=0 imm=8 + // EBPF_OP_LSH64_IMM pc=152 dst=r4 src=r0 offset=0 imm=8 #line 32 "sample/./xdp_common.h" r4 <<= (IMMEDIATE(8) & 63); - // EBPF_OP_LDXB pc=149 dst=r5 src=r1 offset=44 imm=0 + // EBPF_OP_LDXB pc=153 dst=r5 src=r1 offset=44 imm=0 #line 32 "sample/./xdp_common.h" r5 = *(uint8_t*)(uintptr_t)(r1 + OFFSET(44)); - // EBPF_OP_OR64_REG pc=150 dst=r4 src=r5 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=154 dst=r4 src=r5 offset=0 imm=0 #line 32 "sample/./xdp_common.h" r4 |= r5; - // EBPF_OP_LSH64_IMM pc=151 dst=r4 src=r0 offset=0 imm=16 + // EBPF_OP_LSH64_IMM pc=155 dst=r4 src=r0 offset=0 imm=16 #line 32 "sample/./xdp_common.h" r4 <<= (IMMEDIATE(16) & 63); - // EBPF_OP_OR64_REG pc=152 dst=r4 src=r3 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=156 dst=r4 src=r3 offset=0 imm=0 #line 32 "sample/./xdp_common.h" r4 |= r3; - // EBPF_OP_LSH64_IMM pc=153 dst=r4 src=r0 offset=0 imm=32 + // EBPF_OP_LSH64_IMM pc=157 dst=r4 src=r0 offset=0 imm=32 #line 32 "sample/./xdp_common.h" r4 <<= (IMMEDIATE(32) & 63); - // EBPF_OP_OR64_REG pc=154 dst=r4 src=r2 offset=0 imm=0 + // EBPF_OP_OR64_REG pc=158 dst=r4 src=r2 offset=0 imm=0 #line 32 "sample/./xdp_common.h" r4 |= r2; - // EBPF_OP_STXDW pc=155 dst=r10 src=r4 offset=-16 imm=0 + // EBPF_OP_STXDW pc=159 dst=r10 src=r4 offset=-16 imm=0 #line 32 "sample/./xdp_common.h" *(uint64_t*)(uintptr_t)(r10 + OFFSET(-16)) = (uint64_t)r4; - // EBPF_OP_LDXW pc=156 dst=r2 src=r1 offset=22 imm=0 + // EBPF_OP_LDXW pc=160 dst=r2 src=r1 offset=22 imm=0 #line 33 "sample/./xdp_common.h" r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(22)); - // EBPF_OP_STXW pc=157 dst=r1 src=r2 offset=38 imm=0 + // EBPF_OP_STXW pc=161 dst=r1 src=r2 offset=38 imm=0 #line 33 "sample/./xdp_common.h" *(uint32_t*)(uintptr_t)(r1 + OFFSET(38)) = (uint32_t)r2; - // EBPF_OP_LDXW pc=158 dst=r2 src=r1 offset=26 imm=0 + // EBPF_OP_LDXW pc=162 dst=r2 src=r1 offset=26 imm=0 #line 33 "sample/./xdp_common.h" r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(26)); - // EBPF_OP_STXW pc=159 dst=r1 src=r2 offset=42 imm=0 + // EBPF_OP_STXW pc=163 dst=r1 src=r2 offset=42 imm=0 #line 33 "sample/./xdp_common.h" *(uint32_t*)(uintptr_t)(r1 + OFFSET(42)) = (uint32_t)r2; - // EBPF_OP_LDXW pc=160 dst=r2 src=r1 offset=30 imm=0 + // EBPF_OP_LDXW pc=164 dst=r2 src=r1 offset=30 imm=0 #line 33 "sample/./xdp_common.h" r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(30)); - // EBPF_OP_STXW pc=161 dst=r1 src=r2 offset=46 imm=0 + // EBPF_OP_STXW pc=165 dst=r1 src=r2 offset=46 imm=0 #line 33 "sample/./xdp_common.h" *(uint32_t*)(uintptr_t)(r1 + OFFSET(46)) = (uint32_t)r2; - // EBPF_OP_LDXW pc=162 dst=r2 src=r1 offset=34 imm=0 + // EBPF_OP_LDXW pc=166 dst=r2 src=r1 offset=34 imm=0 #line 33 "sample/./xdp_common.h" r2 = *(uint32_t*)(uintptr_t)(r1 + OFFSET(34)); - // EBPF_OP_STXW pc=163 dst=r1 src=r2 offset=50 imm=0 + // EBPF_OP_STXW pc=167 dst=r1 src=r2 offset=50 imm=0 #line 33 "sample/./xdp_common.h" *(uint32_t*)(uintptr_t)(r1 + OFFSET(50)) = (uint32_t)r2; - // EBPF_OP_LDXDW pc=164 dst=r2 src=r10 offset=-16 imm=0 + // EBPF_OP_LDXDW pc=168 dst=r2 src=r10 offset=-16 imm=0 #line 34 "sample/./xdp_common.h" r2 = *(uint64_t*)(uintptr_t)(r10 + OFFSET(-16)); - // EBPF_OP_MOV64_REG pc=165 dst=r3 src=r2 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=169 dst=r3 src=r2 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r3 = r2; - // EBPF_OP_RSH64_IMM pc=166 dst=r3 src=r0 offset=0 imm=48 + // EBPF_OP_RSH64_IMM pc=170 dst=r3 src=r0 offset=0 imm=48 #line 34 "sample/./xdp_common.h" r3 >>= (IMMEDIATE(48) & 63); - // EBPF_OP_STXB pc=167 dst=r1 src=r3 offset=28 imm=0 + // EBPF_OP_STXB pc=171 dst=r1 src=r3 offset=28 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(28)) = (uint8_t)r3; - // EBPF_OP_MOV64_REG pc=168 dst=r3 src=r2 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=172 dst=r3 src=r2 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r3 = r2; - // EBPF_OP_RSH64_IMM pc=169 dst=r3 src=r0 offset=0 imm=56 + // EBPF_OP_RSH64_IMM pc=173 dst=r3 src=r0 offset=0 imm=56 #line 34 "sample/./xdp_common.h" r3 >>= (IMMEDIATE(56) & 63); - // EBPF_OP_STXB pc=170 dst=r1 src=r3 offset=29 imm=0 + // EBPF_OP_STXB pc=174 dst=r1 src=r3 offset=29 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(29)) = (uint8_t)r3; - // EBPF_OP_MOV64_REG pc=171 dst=r3 src=r2 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=175 dst=r3 src=r2 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r3 = r2; - // EBPF_OP_RSH64_IMM pc=172 dst=r3 src=r0 offset=0 imm=32 + // EBPF_OP_RSH64_IMM pc=176 dst=r3 src=r0 offset=0 imm=32 #line 34 "sample/./xdp_common.h" r3 >>= (IMMEDIATE(32) & 63); - // EBPF_OP_STXB pc=173 dst=r1 src=r3 offset=26 imm=0 + // EBPF_OP_STXB pc=177 dst=r1 src=r3 offset=26 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(26)) = (uint8_t)r3; - // EBPF_OP_MOV64_REG pc=174 dst=r3 src=r2 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=178 dst=r3 src=r2 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r3 = r2; - // EBPF_OP_RSH64_IMM pc=175 dst=r3 src=r0 offset=0 imm=40 + // EBPF_OP_RSH64_IMM pc=179 dst=r3 src=r0 offset=0 imm=40 #line 34 "sample/./xdp_common.h" r3 >>= (IMMEDIATE(40) & 63); - // EBPF_OP_STXB pc=176 dst=r1 src=r3 offset=27 imm=0 + // EBPF_OP_STXB pc=180 dst=r1 src=r3 offset=27 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(27)) = (uint8_t)r3; - // EBPF_OP_MOV64_REG pc=177 dst=r3 src=r2 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=181 dst=r3 src=r2 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r3 = r2; - // EBPF_OP_RSH64_IMM pc=178 dst=r3 src=r0 offset=0 imm=16 + // EBPF_OP_RSH64_IMM pc=182 dst=r3 src=r0 offset=0 imm=16 #line 34 "sample/./xdp_common.h" r3 >>= (IMMEDIATE(16) & 63); - // EBPF_OP_STXB pc=179 dst=r1 src=r3 offset=24 imm=0 + // EBPF_OP_STXB pc=183 dst=r1 src=r3 offset=24 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(24)) = (uint8_t)r3; - // EBPF_OP_MOV64_REG pc=180 dst=r3 src=r2 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=184 dst=r3 src=r2 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r3 = r2; - // EBPF_OP_RSH64_IMM pc=181 dst=r3 src=r0 offset=0 imm=24 + // EBPF_OP_RSH64_IMM pc=185 dst=r3 src=r0 offset=0 imm=24 #line 34 "sample/./xdp_common.h" r3 >>= (IMMEDIATE(24) & 63); - // EBPF_OP_STXB pc=182 dst=r1 src=r3 offset=25 imm=0 + // EBPF_OP_STXB pc=186 dst=r1 src=r3 offset=25 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(25)) = (uint8_t)r3; - // EBPF_OP_STXB pc=183 dst=r1 src=r2 offset=22 imm=0 + // EBPF_OP_STXB pc=187 dst=r1 src=r2 offset=22 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(22)) = (uint8_t)r2; - // EBPF_OP_RSH64_IMM pc=184 dst=r2 src=r0 offset=0 imm=8 + // EBPF_OP_RSH64_IMM pc=188 dst=r2 src=r0 offset=0 imm=8 #line 34 "sample/./xdp_common.h" r2 >>= (IMMEDIATE(8) & 63); - // EBPF_OP_STXB pc=185 dst=r1 src=r2 offset=23 imm=0 + // EBPF_OP_STXB pc=189 dst=r1 src=r2 offset=23 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(23)) = (uint8_t)r2; - // EBPF_OP_LDXDW pc=186 dst=r2 src=r10 offset=-8 imm=0 + // EBPF_OP_LDXDW pc=190 dst=r2 src=r10 offset=-8 imm=0 #line 34 "sample/./xdp_common.h" r2 = *(uint64_t*)(uintptr_t)(r10 + OFFSET(-8)); - // EBPF_OP_MOV64_REG pc=187 dst=r3 src=r2 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=191 dst=r3 src=r2 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r3 = r2; - // EBPF_OP_RSH64_IMM pc=188 dst=r3 src=r0 offset=0 imm=48 + // EBPF_OP_RSH64_IMM pc=192 dst=r3 src=r0 offset=0 imm=48 #line 34 "sample/./xdp_common.h" r3 >>= (IMMEDIATE(48) & 63); - // EBPF_OP_STXB pc=189 dst=r1 src=r3 offset=36 imm=0 + // EBPF_OP_STXB pc=193 dst=r1 src=r3 offset=36 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(36)) = (uint8_t)r3; - // EBPF_OP_MOV64_REG pc=190 dst=r3 src=r2 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=194 dst=r3 src=r2 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r3 = r2; - // EBPF_OP_RSH64_IMM pc=191 dst=r3 src=r0 offset=0 imm=56 + // EBPF_OP_RSH64_IMM pc=195 dst=r3 src=r0 offset=0 imm=56 #line 34 "sample/./xdp_common.h" r3 >>= (IMMEDIATE(56) & 63); - // EBPF_OP_STXB pc=192 dst=r1 src=r3 offset=37 imm=0 + // EBPF_OP_STXB pc=196 dst=r1 src=r3 offset=37 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(37)) = (uint8_t)r3; - // EBPF_OP_MOV64_REG pc=193 dst=r3 src=r2 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=197 dst=r3 src=r2 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r3 = r2; - // EBPF_OP_RSH64_IMM pc=194 dst=r3 src=r0 offset=0 imm=32 + // EBPF_OP_RSH64_IMM pc=198 dst=r3 src=r0 offset=0 imm=32 #line 34 "sample/./xdp_common.h" r3 >>= (IMMEDIATE(32) & 63); - // EBPF_OP_STXB pc=195 dst=r1 src=r3 offset=34 imm=0 + // EBPF_OP_STXB pc=199 dst=r1 src=r3 offset=34 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(34)) = (uint8_t)r3; - // EBPF_OP_MOV64_REG pc=196 dst=r3 src=r2 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=200 dst=r3 src=r2 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r3 = r2; - // EBPF_OP_RSH64_IMM pc=197 dst=r3 src=r0 offset=0 imm=40 + // EBPF_OP_RSH64_IMM pc=201 dst=r3 src=r0 offset=0 imm=40 #line 34 "sample/./xdp_common.h" r3 >>= (IMMEDIATE(40) & 63); - // EBPF_OP_STXB pc=198 dst=r1 src=r3 offset=35 imm=0 + // EBPF_OP_STXB pc=202 dst=r1 src=r3 offset=35 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(35)) = (uint8_t)r3; - // EBPF_OP_MOV64_REG pc=199 dst=r3 src=r2 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=203 dst=r3 src=r2 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r3 = r2; - // EBPF_OP_RSH64_IMM pc=200 dst=r3 src=r0 offset=0 imm=16 + // EBPF_OP_RSH64_IMM pc=204 dst=r3 src=r0 offset=0 imm=16 #line 34 "sample/./xdp_common.h" r3 >>= (IMMEDIATE(16) & 63); - // EBPF_OP_STXB pc=201 dst=r1 src=r3 offset=32 imm=0 + // EBPF_OP_STXB pc=205 dst=r1 src=r3 offset=32 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(32)) = (uint8_t)r3; - // EBPF_OP_MOV64_REG pc=202 dst=r3 src=r2 offset=0 imm=0 + // EBPF_OP_MOV64_REG pc=206 dst=r3 src=r2 offset=0 imm=0 #line 34 "sample/./xdp_common.h" r3 = r2; - // EBPF_OP_RSH64_IMM pc=203 dst=r3 src=r0 offset=0 imm=24 + // EBPF_OP_RSH64_IMM pc=207 dst=r3 src=r0 offset=0 imm=24 #line 34 "sample/./xdp_common.h" r3 >>= (IMMEDIATE(24) & 63); - // EBPF_OP_STXB pc=204 dst=r1 src=r3 offset=33 imm=0 + // EBPF_OP_STXB pc=208 dst=r1 src=r3 offset=33 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(33)) = (uint8_t)r3; - // EBPF_OP_STXB pc=205 dst=r1 src=r2 offset=30 imm=0 + // EBPF_OP_STXB pc=209 dst=r1 src=r2 offset=30 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(30)) = (uint8_t)r2; - // EBPF_OP_RSH64_IMM pc=206 dst=r2 src=r0 offset=0 imm=8 + // EBPF_OP_RSH64_IMM pc=210 dst=r2 src=r0 offset=0 imm=8 #line 34 "sample/./xdp_common.h" r2 >>= (IMMEDIATE(8) & 63); - // EBPF_OP_STXB pc=207 dst=r1 src=r2 offset=31 imm=0 + // EBPF_OP_STXB pc=211 dst=r1 src=r2 offset=31 imm=0 #line 34 "sample/./xdp_common.h" *(uint8_t*)(uintptr_t)(r1 + OFFSET(31)) = (uint8_t)r2; + // EBPF_OP_LDXH pc=212 dst=r2 src=r1 offset=54 imm=0 +#line 40 "sample/./xdp_common.h" + r2 = *(uint16_t*)(uintptr_t)(r1 + OFFSET(54)); + // EBPF_OP_STXH pc=213 dst=r1 src=r2 offset=56 imm=0 +#line 42 "sample/./xdp_common.h" + *(uint16_t*)(uintptr_t)(r1 + OFFSET(56)) = (uint16_t)r2; + // EBPF_OP_MOV64_IMM pc=214 dst=r2 src=r0 offset=0 imm=7459 +#line 42 "sample/./xdp_common.h" + r2 = IMMEDIATE(7459); + // EBPF_OP_STXH pc=215 dst=r1 src=r2 offset=54 imm=0 +#line 41 "sample/./xdp_common.h" + *(uint16_t*)(uintptr_t)(r1 + OFFSET(54)) = (uint16_t)r2; label_2: - // EBPF_OP_MOV64_IMM pc=208 dst=r0 src=r0 offset=0 imm=3 -#line 34 "sample/./xdp_common.h" + // EBPF_OP_MOV64_IMM pc=216 dst=r0 src=r0 offset=0 imm=3 +#line 41 "sample/./xdp_common.h" r0 = IMMEDIATE(3); label_3: - // EBPF_OP_EXIT pc=209 dst=r0 src=r0 offset=0 imm=0 -#line 34 "sample/./xdp_common.h" + // EBPF_OP_EXIT pc=217 dst=r0 src=r0 offset=0 imm=0 +#line 41 "sample/./xdp_common.h" return r0; -#line 34 "sample/./xdp_common.h" +#line 41 "sample/./xdp_common.h" } #pragma code_seg(pop) #line __LINE__ __FILE__ @@ -885,7 +909,7 @@ static program_entry_t _programs[] = { 0, NULL, 0, - 210, + 218, &reflect_packet_program_type_guid, &reflect_packet_attach_type_guid, }, diff --git a/tests/end_to_end/test_helper.cpp b/tests/end_to_end/test_helper.cpp index 0038455a5a..ad99a90e16 100644 --- a/tests/end_to_end/test_helper.cpp +++ b/tests/end_to_end/test_helper.cpp @@ -90,6 +90,15 @@ static uint32_t _ebpf_service_handle_counter = 0; _Guarded_by_( _service_path_to_context_mutex) static std::map _service_path_to_context_map; +std::mutex _overlapped_buffers_mutex; +typedef struct _overlapped_completion +{ + std::vector buffer; + uint8_t* output_buffer = nullptr; + size_t output_buffer_length = 0; +} overlapped_completion_t; +std::map _overlapped_buffers; + class duplicate_handles_table_t { public: @@ -276,11 +285,29 @@ GlueDuplicateHandle( return !!_duplicate_handles.reference_or_add(reinterpret_cast(source_handle)); } +static void +_complete_async_io(OVERLAPPED* overlapped, size_t output_buffer_length) +{ + std::unique_lock lock(_overlapped_buffers_mutex); + auto it = _overlapped_buffers.find(overlapped); + REQUIRE(it != _overlapped_buffers.end()); + if (it->second.output_buffer != nullptr) { + memcpy(it->second.output_buffer, it->second.buffer.data(), output_buffer_length); + } + _overlapped_buffers.erase(it); +} + static void _complete_overlapped(_Inout_ void* context, size_t output_buffer_length, ebpf_result_t result) { UNREFERENCED_PARAMETER(output_buffer_length); auto overlapped = reinterpret_cast(context); + + // Copy the output buffer to the user buffer. + if (overlapped) { + _complete_async_io(overlapped, output_buffer_length); + } + overlapped->InternalHigh = static_cast(output_buffer_length); overlapped->Internal = ebpf_result_to_ntstatus(result); SetEvent(overlapped->hEvent); @@ -439,10 +466,23 @@ GlueDeviceIoControl( size_t minimum_reply_size = 0; bool async = false; unsigned long sharedBufferSize = (input_buffer_size > output_buffer_size) ? input_buffer_size : output_buffer_size; - std::vector sharedBuffer; const void* local_input_buffer = nullptr; void* local_output_buffer = nullptr; + // To correctly emulate the kernel execution context, we need to use the same buffer + // for both input and output. So we allocate a buffer that is large enough to hold + // either the input or output, and then use that buffer for both. + if (overlapped) { + std::unique_lock lock(_overlapped_buffers_mutex); + REQUIRE(_overlapped_buffers.find(overlapped) == _overlapped_buffers.end()); + _overlapped_buffers[overlapped] = {{}, (uint8_t*)output_buffer, output_buffer_size}; + } + std::vector synchronousBuffer; + + std::vector& sharedBuffer = overlapped ? _overlapped_buffers[overlapped].buffer : synchronousBuffer; + + sharedBuffer.resize(sharedBufferSize); + result = ebpf_core_get_protocol_handler_properties(request_id, &minimum_request_size, &minimum_reply_size, &async); if (result != EBPF_SUCCESS) { goto Fail; @@ -468,18 +508,13 @@ GlueDeviceIoControl( // Intercept the call to perform any IOCTL specific _pre_ tasks. _preprocess_ioctl(user_request); - if (!async) { - // In the kernel execution context, the request and reply share - // the same memory. So to catch bugs that only show up in that - // case, we force the same here. - sharedBuffer.resize(sharedBufferSize); - memcpy(sharedBuffer.data(), user_request, input_buffer_size); - local_input_buffer = sharedBuffer.data(); - local_output_buffer = (minimum_reply_size > 0) ? sharedBuffer.data() : nullptr; - } else { - local_input_buffer = user_request; - local_output_buffer = user_reply; - } + // In the kernel execution context, the request and reply share + // the same memory. So to catch bugs that only show up in that + // case, we force the same here. + sharedBuffer.resize(sharedBufferSize); + memcpy(sharedBuffer.data(), user_request, input_buffer_size); + local_input_buffer = sharedBuffer.data(); + local_output_buffer = (minimum_reply_size > 0) ? sharedBuffer.data() : nullptr; result = ebpf_core_invoke_protocol_handler( request_id, @@ -494,6 +529,11 @@ GlueDeviceIoControl( memcpy(user_reply, sharedBuffer.data(), output_buffer_size); } + // If the request failed synchronously, complete the overlapped. + if (overlapped && !(result == EBPF_PENDING || result == EBPF_SUCCESS)) { + _complete_async_io(overlapped, 0); + } + if (result != EBPF_SUCCESS) { goto Fail; } @@ -718,6 +758,12 @@ _test_helper_end_to_end::~_test_helper_end_to_end() _unload_all_native_modules(); clear_program_info_cache(); + + { + std::unique_lock lock(_overlapped_buffers_mutex); + _overlapped_buffers.clear(); + } + if (api_initialized) { ebpf_api_terminate(); } diff --git a/tests/libfuzzer/core_helper_fuzzer/core_helper_fuzzer.vcxproj b/tests/libfuzzer/core_helper_fuzzer/core_helper_fuzzer.vcxproj index 3eac12f64c..531cd51286 100644 --- a/tests/libfuzzer/core_helper_fuzzer/core_helper_fuzzer.vcxproj +++ b/tests/libfuzzer/core_helper_fuzzer/core_helper_fuzzer.vcxproj @@ -95,7 +95,7 @@ FUZZER;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - $(SolutionDir)tests\libfuzzer\include;$(SolutionDir)libs\api_common;$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)libs\ebpfnetsh;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(OutDir);$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)libs\service;$(SolutionDir)rpc_interface;$(SolutionDir)libs\platform;$(SolutionDir)libs\platform\user;$(SolutionDir)external\usersim\inc;$(SolutionDir)libs\execution_context;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\sample;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)\tests\xdp;$(SolutionDir)tools\encode_program_info;$(SolutionDir)libs\thunk;$(SolutionDir)libs\thunk\mock;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)include\user;$(SolutionDir)netebpfext\user;$(SolutionDir)tests\netebpfext_unit;%(AdditionalIncludeDirectories) + $(SolutionDir)tests\libfuzzer\include;$(SolutionDir)libs\api_common;$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)libs\ebpfnetsh;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(OutDir);$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)libs\service;$(SolutionDir)rpc_interface;$(SolutionDir)libs\platform;$(SolutionDir)libs\platform\user;$(SolutionDir)external\usersim\inc;$(SolutionDir)external\usersim\src;$(SolutionDir)libs\execution_context;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\sample;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)\tests\xdp;$(SolutionDir)tools\encode_program_info;$(SolutionDir)libs\thunk;$(SolutionDir)libs\thunk\mock;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)include\user;$(SolutionDir)netebpfext\user;$(SolutionDir)tests\netebpfext_unit;%(AdditionalIncludeDirectories) Console @@ -106,7 +106,7 @@ FUZZER;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - $(SolutionDir)tests\libfuzzer\include;$(SolutionDir)libs\api_common;$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)libs\ebpfnetsh;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(OutDir);$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)libs\service;$(SolutionDir)rpc_interface;$(SolutionDir)libs\platform;$(SolutionDir)libs\platform\user;$(SolutionDir)external\usersim\inc;$(SolutionDir)libs\execution_context;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\sample;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)\tests\xdp;$(SolutionDir)tools\encode_program_info;$(SolutionDir)libs\thunk;$(SolutionDir)libs\thunk\mock;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)include\user;$(SolutionDir)netebpfext\user;$(SolutionDir)tests\netebpfext_unit;%(AdditionalIncludeDirectories) + $(SolutionDir)tests\libfuzzer\include;$(SolutionDir)libs\api_common;$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)libs\ebpfnetsh;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(OutDir);$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)libs\service;$(SolutionDir)rpc_interface;$(SolutionDir)libs\platform;$(SolutionDir)libs\platform\user;$(SolutionDir)external\usersim\inc;$(SolutionDir)external\usersim\src;$(SolutionDir)libs\execution_context;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\sample;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)\tests\xdp;$(SolutionDir)tools\encode_program_info;$(SolutionDir)libs\thunk;$(SolutionDir)libs\thunk\mock;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)include\user;$(SolutionDir)netebpfext\user;$(SolutionDir)tests\netebpfext_unit;%(AdditionalIncludeDirectories) Console @@ -117,7 +117,7 @@ FUZZER;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - $(SolutionDir)tests\libfuzzer\include;$(SolutionDir)libs\api_common;$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)libs\ebpfnetsh;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(OutDir);$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)libs\service;$(SolutionDir)rpc_interface;$(SolutionDir)libs\platform;$(SolutionDir)libs\platform\user;$(SolutionDir)external\usersim\inc;$(SolutionDir)libs\execution_context;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\sample;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)\tests\xdp;$(SolutionDir)tools\encode_program_info;$(SolutionDir)libs\thunk;$(SolutionDir)libs\thunk\mock;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)include\user;$(SolutionDir)netebpfext\user;$(SolutionDir)tests\netebpfext_unit;%(AdditionalIncludeDirectories) + $(SolutionDir)tests\libfuzzer\include;$(SolutionDir)libs\api_common;$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)libs\ebpfnetsh;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(OutDir);$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)libs\service;$(SolutionDir)rpc_interface;$(SolutionDir)libs\platform;$(SolutionDir)libs\platform\user;$(SolutionDir)external\usersim\inc;$(SolutionDir)external\usersim\src;$(SolutionDir)libs\execution_context;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\sample;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)\tests\xdp;$(SolutionDir)tools\encode_program_info;$(SolutionDir)libs\thunk;$(SolutionDir)libs\thunk\mock;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)include\user;$(SolutionDir)netebpfext\user;$(SolutionDir)tests\netebpfext_unit;%(AdditionalIncludeDirectories) Console @@ -128,7 +128,7 @@ FUZZER;NDEBUG;_CONSOLE;NO_CATCH;%(PreprocessorDefinitions) - $(SolutionDir)tests\libfuzzer\include;$(SolutionDir)libs\api_common;$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)libs\ebpfnetsh;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(OutDir);$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)libs\service;$(SolutionDir)rpc_interface;$(SolutionDir)libs\platform;$(SolutionDir)libs\platform\user;$(SolutionDir)external\usersim\inc;$(SolutionDir)libs\execution_context;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\sample;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)\tests\xdp;$(SolutionDir)tools\encode_program_info;$(SolutionDir)libs\thunk;$(SolutionDir)libs\thunk\mock;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)include\user;$(SolutionDir)netebpfext\user;$(SolutionDir)tests\netebpfext_unit;%(AdditionalIncludeDirectories) + $(SolutionDir)tests\libfuzzer\include;$(SolutionDir)libs\api_common;$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)libs\ebpfnetsh;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(OutDir);$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)libs\service;$(SolutionDir)rpc_interface;$(SolutionDir)libs\platform;$(SolutionDir)libs\platform\user;$(SolutionDir)external\usersim\inc;$(SolutionDir)external\usersim\src;$(SolutionDir)libs\execution_context;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\sample;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)\tests\xdp;$(SolutionDir)tools\encode_program_info;$(SolutionDir)libs\thunk;$(SolutionDir)libs\thunk\mock;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)include\user;$(SolutionDir)netebpfext\user;$(SolutionDir)tests\netebpfext_unit;%(AdditionalIncludeDirectories) Console @@ -140,7 +140,7 @@ FUZZER;NDEBUG;_CONSOLE;NO_CATCH;%(PreprocessorDefinitions) - $(SolutionDir)tests\libfuzzer\include;$(SolutionDir)libs\api_common;$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)libs\ebpfnetsh;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(OutDir);$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)libs\service;$(SolutionDir)rpc_interface;$(SolutionDir)libs\platform;$(SolutionDir)libs\platform\user;$(SolutionDir)external\usersim\inc;$(SolutionDir)libs\execution_context;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\sample;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)\tests\xdp;$(SolutionDir)tools\encode_program_info;$(SolutionDir)libs\thunk;$(SolutionDir)libs\thunk\mock;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)include\user;$(SolutionDir)netebpfext\user;$(SolutionDir)tests\netebpfext_unit;%(AdditionalIncludeDirectories) + $(SolutionDir)tests\libfuzzer\include;$(SolutionDir)libs\api_common;$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)libs\ebpfnetsh;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(OutDir);$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)libs\service;$(SolutionDir)rpc_interface;$(SolutionDir)libs\platform;$(SolutionDir)libs\platform\user;$(SolutionDir)external\usersim\inc;$(SolutionDir)external\usersim\src;$(SolutionDir)libs\execution_context;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\sample;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)\tests\xdp;$(SolutionDir)tools\encode_program_info;$(SolutionDir)libs\thunk;$(SolutionDir)libs\thunk\mock;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)include\user;$(SolutionDir)netebpfext\user;$(SolutionDir)tests\netebpfext_unit;%(AdditionalIncludeDirectories) Console diff --git a/tests/libfuzzer/netebpfext_fuzzer/netebpfext_fuzzer.vcxproj b/tests/libfuzzer/netebpfext_fuzzer/netebpfext_fuzzer.vcxproj index 53163c5173..a5f5b681e7 100644 --- a/tests/libfuzzer/netebpfext_fuzzer/netebpfext_fuzzer.vcxproj +++ b/tests/libfuzzer/netebpfext_fuzzer/netebpfext_fuzzer.vcxproj @@ -66,7 +66,7 @@ FUZZER;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - $(SolutionDir)tests\libfuzzer\include;$(SolutionDir)libs\api_common;$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)libs\ebpfnetsh;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(OutDir);$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)libs\service;$(SolutionDir)rpc_interface;$(SolutionDir)libs\platform;$(SolutionDir)libs\platform\user;$(SolutionDir)external\usersim\inc;$(SolutionDir)libs\execution_context;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\sample;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)\tests\xdp;$(SolutionDir)tools\encode_program_info;$(SolutionDir)libs\thunk;$(SolutionDir)libs\thunk\mock;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)include\user;$(SolutionDir)netebpfext\user;$(SolutionDir)tests\netebpfext_unit;$(SolutionDir)external\ubpf\vm\inc;$(SolutionDir)external\ubpf\build\vm;%(AdditionalIncludeDirectories) + $(SolutionDir)tests\libfuzzer\include;$(SolutionDir)libs\api_common;$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)libs\ebpfnetsh;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(OutDir);$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)libs\service;$(SolutionDir)rpc_interface;$(SolutionDir)libs\platform;$(SolutionDir)libs\platform\user;$(SolutionDir)external\usersim\inc;$(SolutionDir)external\usersim\src;$(SolutionDir)libs\execution_context;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\sample;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)\tests\xdp;$(SolutionDir)tools\encode_program_info;$(SolutionDir)libs\thunk;$(SolutionDir)libs\thunk\mock;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)include\user;$(SolutionDir)netebpfext\user;$(SolutionDir)tests\netebpfext_unit;$(SolutionDir)external\ubpf\vm\inc;$(SolutionDir)external\ubpf\build\vm;%(AdditionalIncludeDirectories) Console @@ -77,7 +77,7 @@ FUZZER;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - $(SolutionDir)tests\libfuzzer\include;$(SolutionDir)libs\api_common;$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)libs\ebpfnetsh;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(OutDir);$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)libs\service;$(SolutionDir)rpc_interface;$(SolutionDir)libs\platform;$(SolutionDir)libs\platform\user;$(SolutionDir)external\usersim\inc;$(SolutionDir)libs\execution_context;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\sample;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)\tests\xdp;$(SolutionDir)tools\encode_program_info;$(SolutionDir)libs\thunk;$(SolutionDir)libs\thunk\mock;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)include\user;$(SolutionDir)netebpfext\user;$(SolutionDir)tests\netebpfext_unit;$(SolutionDir)external\ubpf\vm\inc;$(SolutionDir)external\ubpf\build\vm;%(AdditionalIncludeDirectories) + $(SolutionDir)tests\libfuzzer\include;$(SolutionDir)libs\api_common;$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)libs\ebpfnetsh;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(OutDir);$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)libs\service;$(SolutionDir)rpc_interface;$(SolutionDir)libs\platform;$(SolutionDir)libs\platform\user;$(SolutionDir)external\usersim\inc;$(SolutionDir)external\usersim\src;$(SolutionDir)libs\execution_context;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\sample;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)\tests\xdp;$(SolutionDir)tools\encode_program_info;$(SolutionDir)libs\thunk;$(SolutionDir)libs\thunk\mock;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)include\user;$(SolutionDir)netebpfext\user;$(SolutionDir)tests\netebpfext_unit;$(SolutionDir)external\ubpf\vm\inc;$(SolutionDir)external\ubpf\build\vm;%(AdditionalIncludeDirectories) Console @@ -88,7 +88,7 @@ FUZZER;NDEBUG;_CONSOLE;NO_CATCH;%(PreprocessorDefinitions) - $(SolutionDir)tests\libfuzzer\include;$(SolutionDir)libs\api_common;$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)libs\ebpfnetsh;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(OutDir);$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)libs\service;$(SolutionDir)rpc_interface;$(SolutionDir)libs\platform;$(SolutionDir)libs\platform\user;$(SolutionDir)external\usersim\inc;$(SolutionDir)libs\execution_context;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\sample;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)\tests\xdp;$(SolutionDir)tools\encode_program_info;$(SolutionDir)libs\thunk;$(SolutionDir)libs\thunk\mock;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)include\user;$(SolutionDir)netebpfext\user;$(SolutionDir)tests\netebpfext_unit;$(SolutionDir)external\ubpf\vm\inc;$(SolutionDir)external\ubpf\build\vm;%(AdditionalIncludeDirectories) + $(SolutionDir)tests\libfuzzer\include;$(SolutionDir)libs\api_common;$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)libs\ebpfnetsh;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(OutDir);$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)libs\service;$(SolutionDir)rpc_interface;$(SolutionDir)libs\platform;$(SolutionDir)libs\platform\user;$(SolutionDir)external\usersim\inc;$(SolutionDir)external\usersim\src;$(SolutionDir)libs\execution_context;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\sample;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)\tests\xdp;$(SolutionDir)tools\encode_program_info;$(SolutionDir)libs\thunk;$(SolutionDir)libs\thunk\mock;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)include\user;$(SolutionDir)netebpfext\user;$(SolutionDir)tests\netebpfext_unit;$(SolutionDir)external\ubpf\vm\inc;$(SolutionDir)external\ubpf\build\vm;%(AdditionalIncludeDirectories) Console diff --git a/tests/libs/common/common_tests.cpp b/tests/libs/common/common_tests.cpp index 65fd6404ea..60c01081f6 100644 --- a/tests/libs/common/common_tests.cpp +++ b/tests/libs/common/common_tests.cpp @@ -151,12 +151,33 @@ ring_buffer_test_event_handler(_Inout_ void* ctx, _In_opt_ const void* data, siz } std::vector event_record(reinterpret_cast(data), reinterpret_cast(data) + size); - // Check if indicated event record matches an entry in the context records. + + // Check if indicated event record matches an entry in the context records + // that has not been matched yet. auto records = event_context->records; - auto it = std::find(records->begin(), records->end(), event_record); - if (it != records->end()) { + auto it = records->begin(); + for (;;) { + // Find the next entry in the records vector. + it = std::find(it, records->end(), event_record); + if (it == records->end()) { + // No more entries in the records vector. + break; + } + + // Check if the entry has already been matched. + auto index = std::distance(records->begin(), it); + if (event_context->event_received.find(index) != event_context->event_received.end()) { + it++; + // Entry already matched. + continue; + } + + // Mark the entry as matched. + event_context->event_received.insert(index); event_context->matched_entry_count++; + break; } + if (event_context->matched_entry_count == event_context->test_event_count) { // If all the entries in the app ID list was found, fulfill the promise. event_context->ring_buffer_event_promise.set_value(); @@ -197,6 +218,8 @@ ring_buffer_api_test_helper( // Wait for event handler getting notifications for all RING_BUFFER_TEST_EVENT_COUNT events. REQUIRE(ring_buffer_event_callback.wait_for(1s) == std::future_status::ready); + REQUIRE(context->matched_entry_count == RING_BUFFER_TEST_EVENT_COUNT); + // Mark the event context as canceled, such that the event callback stops processing events. context->canceled = true; diff --git a/tests/libs/common/common_tests.h b/tests/libs/common/common_tests.h index d79ebd8cfa..2039821e0d 100644 --- a/tests/libs/common/common_tests.h +++ b/tests/libs/common/common_tests.h @@ -14,6 +14,7 @@ #include #include +#include #define RING_BUFFER_TEST_EVENT_COUNT 10 @@ -42,7 +43,8 @@ typedef struct _ring_buffer_test_event_context unsubscribe(); std::promise ring_buffer_event_promise; struct ring_buffer* ring_buffer; - std::vector>* records; + const std::vector>* records; + std::set event_received; bool canceled; int matched_entry_count; int test_event_count; diff --git a/tests/netebpfext_unit/netebpfext_unit.vcxproj b/tests/netebpfext_unit/netebpfext_unit.vcxproj index de0a5b9578..d419fbf027 100644 --- a/tests/netebpfext_unit/netebpfext_unit.vcxproj +++ b/tests/netebpfext_unit/netebpfext_unit.vcxproj @@ -74,7 +74,7 @@ true _DEBUG;_CONSOLE;%(PreprocessorDefinitions) true - $(SolutionDir)libs\api_common;$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)libs\ebpfnetsh;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(OutDir);$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)libs\service;$(SolutionDir)rpc_interface;$(SolutionDir)libs\platform;$(SolutionDir)libs\platform\user;$(SolutionDir)external\usersim\inc;$(SolutionDir)libs\execution_context;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\sample;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)\tests\xdp;$(SolutionDir)tools\export_program_info;$(SolutionDir)libs\thunk;$(SolutionDir)libs\thunk\mock;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)include\user;$(SolutionDir)\netebpfext\user;$(WindowsSdkDir)Include\10.0.22621.0\km;%(AdditionalIncludeDirectories) + $(SolutionDir)libs\api_common;$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)libs\ebpfnetsh;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(OutDir);$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)libs\service;$(SolutionDir)rpc_interface;$(SolutionDir)libs\platform;$(SolutionDir)libs\platform\user;$(SolutionDir)external\usersim\inc;$(SolutionDir)external\usersim\src;$(SolutionDir)libs\execution_context;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\sample;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)\tests\xdp;$(SolutionDir)tools\export_program_info;$(SolutionDir)libs\thunk;$(SolutionDir)libs\thunk\mock;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)include\user;$(SolutionDir)\netebpfext\user;$(WindowsSdkDir)Include\10.0.22621.0\km;%(AdditionalIncludeDirectories) Console @@ -89,7 +89,7 @@ true _DEBUG;_CONSOLE;%(PreprocessorDefinitions) true - $(SolutionDir)libs\api_common;$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)libs\ebpfnetsh;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(OutDir);$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)libs\service;$(SolutionDir)rpc_interface;$(SolutionDir)libs\platform;$(SolutionDir)libs\platform\user;$(SolutionDir)external\usersim\inc;$(SolutionDir)libs\execution_context;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\sample;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)\tests\xdp;$(SolutionDir)tools\export_program_info;$(SolutionDir)libs\thunk;$(SolutionDir)libs\thunk\mock;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)include\user;$(SolutionDir)\netebpfext\user;$(WindowsSdkDir)Include\10.0.22621.0\km;%(AdditionalIncludeDirectories) + $(SolutionDir)libs\api_common;$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)libs\ebpfnetsh;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(OutDir);$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)libs\service;$(SolutionDir)rpc_interface;$(SolutionDir)libs\platform;$(SolutionDir)libs\platform\user;$(SolutionDir)external\usersim\inc;$(SolutionDir)external\usersim\src;$(SolutionDir)libs\execution_context;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\sample;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)\tests\xdp;$(SolutionDir)tools\export_program_info;$(SolutionDir)libs\thunk;$(SolutionDir)libs\thunk\mock;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)include\user;$(SolutionDir)\netebpfext\user;$(WindowsSdkDir)Include\10.0.22621.0\km;%(AdditionalIncludeDirectories) Console @@ -106,7 +106,7 @@ true NDEBUG;_CONSOLE;%(PreprocessorDefinitions) true - $(SolutionDir)libs\api_common;$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)libs\ebpfnetsh;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(OutDir);$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)libs\service;$(SolutionDir)rpc_interface;$(SolutionDir)libs\platform;$(SolutionDir)libs\platform\user;$(SolutionDir)external\usersim\inc;$(SolutionDir)libs\execution_context;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\sample;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)\tests\xdp;$(SolutionDir)tools\export_program_info;$(SolutionDir)libs\thunk;$(SolutionDir)libs\thunk\mock;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)include\user;$(SolutionDir)\netebpfext\user;$(WindowsSdkDir)Include\10.0.22621.0\km;%(AdditionalIncludeDirectories) + $(SolutionDir)libs\api_common;$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)libs\ebpfnetsh;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(OutDir);$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)libs\service;$(SolutionDir)rpc_interface;$(SolutionDir)libs\platform;$(SolutionDir)libs\platform\user;$(SolutionDir)external\usersim\inc;$(SolutionDir)external\usersim\src;$(SolutionDir)libs\execution_context;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\sample;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)\tests\xdp;$(SolutionDir)tools\export_program_info;$(SolutionDir)libs\thunk;$(SolutionDir)libs\thunk\mock;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;$(SolutionDir)external\bpftool;$(SolutionDir)include\user;$(SolutionDir)\netebpfext\user;$(WindowsSdkDir)Include\10.0.22621.0\km;%(AdditionalIncludeDirectories) Console diff --git a/tests/sample/encap_reflect_packet.c b/tests/sample/encap_reflect_packet.c index 9408c7c53c..c259d908c2 100644 --- a/tests/sample/encap_reflect_packet.c +++ b/tests/sample/encap_reflect_packet.c @@ -60,6 +60,15 @@ encapsulate_ipv4_reflect_packet(xdp_md_t* ctx) // Swap the IP addresses for the inner IPv4 header. swap_ipv4_addresses(inner_ipv4_header); + next_header = (char*)(inner_ipv4_header) + sizeof(uint32_t) * inner_ipv4_header->HeaderLength; + if (next_header + sizeof(UDP_HEADER) > (char*)ctx->data_end) { + goto Done; + } + UDP_HEADER* udp_header = (UDP_HEADER*)next_header; + if (udp_header->destPort == ntohs(REFLECTION_TEST_PORT)) { + swap_ports(udp_header); + } + // Copy over the inner IP header to the outer IP header. __builtin_memcpy(outer_ipv4_header, inner_ipv4_header, sizeof(IPV4_HEADER)); @@ -125,6 +134,15 @@ encapsulate_ipv6_reflect_packet(xdp_md_t* ctx) // Swap the IP addresses for the inner IP header. swap_ipv6_addresses(inner_ipv6_header); + next_header = (char*)(inner_ipv6_header) + sizeof(IPV6_HEADER); + if (next_header + sizeof(UDP_HEADER) > (char*)ctx->data_end) { + goto Done; + } + UDP_HEADER* udp_header = (UDP_HEADER*)next_header; + if (udp_header->destPort == ntohs(REFLECTION_TEST_PORT)) { + swap_ports(udp_header); + } + // Copy over the inner IP header to the outer IP header. __builtin_memcpy(outer_ipv6_header, inner_ipv6_header, sizeof(IPV6_HEADER)); diff --git a/tests/sample/reflect_packet.c b/tests/sample/reflect_packet.c index 7fbd8e62f4..e09f117a8b 100644 --- a/tests/sample/reflect_packet.c +++ b/tests/sample/reflect_packet.c @@ -47,6 +47,7 @@ reflect_packet(xdp_md_t* ctx) if (udp_header->destPort == ntohs(REFLECTION_TEST_PORT)) { swap_mac_addresses(ethernet_header); swap_ipv4_addresses(ipv4_header); + swap_ports(udp_header); rc = XDP_TX; goto Done; } @@ -67,6 +68,7 @@ reflect_packet(xdp_md_t* ctx) if (udp_header->destPort == ntohs(REFLECTION_TEST_PORT)) { swap_mac_addresses(ethernet_header); swap_ipv6_addresses(ipv6_header); + swap_ports(udp_header); rc = XDP_TX; goto Done; } diff --git a/tests/sample/xdp_common.h b/tests/sample/xdp_common.h index 52ea3da97a..edf22d5194 100644 --- a/tests/sample/xdp_common.h +++ b/tests/sample/xdp_common.h @@ -34,6 +34,14 @@ swap_ipv6_addresses(IPV6_HEADER* ipv6_header) __builtin_memcpy(ipv6_header->SourceAddress, address, sizeof(ipv6_address_t)); } +inline void +swap_ports(UDP_HEADER* udp_header) +{ + uint16_t src_port = udp_header->srcPort; + udp_header->srcPort = udp_header->destPort; + udp_header->destPort = src_port; +} + inline int fold_csum(int csum) { diff --git a/tests/socket/socket_tests.cpp b/tests/socket/socket_tests.cpp index 7bef2b7227..c2d64df703 100644 --- a/tests/socket/socket_tests.cpp +++ b/tests/socket/socket_tests.cpp @@ -269,7 +269,10 @@ connection_monitor_test( // Ring buffer event callback context. std::unique_ptr context = std::make_unique(); - context->test_event_count = disconnect ? 4 : 2; + // Issue: https://github.com/microsoft/ebpf-for-windows/issues/2706 + // Should there be a disconnect event for both inbound and outbound connections? + // Should the local and remote addresses be swapped for inbound vs outbound connections? + context->test_event_count = disconnect ? 3 : 2; bpf_program* _program = bpf_object__find_program_by_name(object, "connection_monitor"); REQUIRE(_program != nullptr); diff --git a/tests/xdp/xdp_tests.cpp b/tests/xdp/xdp_tests.cpp index 27bbdd97bd..683f37bab7 100644 --- a/tests/xdp/xdp_tests.cpp +++ b/tests/xdp/xdp_tests.cpp @@ -72,23 +72,23 @@ TEST_CASE("xdp_encap_reflect_test", "[xdp_tests]") TEST_CASE("xdp_reflect_test", "[xdp_tests]") { - // Create a UDP receiver socket. - datagram_server_socket_t datagram_server_socket(SOCK_DGRAM, IPPROTO_UDP, REFLECTION_TEST_PORT); - // Post an asynchronous receive on the receiver socket. - datagram_server_socket.post_async_receive(); // Initialize the remote address. struct sockaddr_storage remote_address = {}; get_address_from_string(_remote_ip, remote_address, true); // Send message to remote host on reflection port. const char* message = "Bo!ng"; - datagram_client_socket_t datagram_client_socket(SOCK_DGRAM, IPPROTO_UDP, 0); - datagram_client_socket.send_message_to_remote_host(message, remote_address, REFLECTION_TEST_PORT); - // Complete the asynchronous receive and obtain the reflected message. - datagram_server_socket.complete_async_receive(); - // Verify if the received message is expected. + datagram_client_socket_t sender_receiver_socket(SOCK_DGRAM, IPPROTO_UDP, 0); + sender_receiver_socket.send_message_to_remote_host(message, remote_address, REFLECTION_TEST_PORT); + sender_receiver_socket.complete_async_send(1000, expected_result_t::SUCCESS); + + // Post, then complete the asynchronous receive, and obtain the reflected message. + sender_receiver_socket.post_async_receive(); + sender_receiver_socket.complete_async_receive(2000, false); uint32_t bytes_received = 0; char* received_message = nullptr; - datagram_server_socket.get_received_message(bytes_received, received_message); + sender_receiver_socket.get_received_message(bytes_received, received_message); + + // Verify if the received message is expected. REQUIRE(bytes_received == strlen(message)); REQUIRE(memcmp(received_message, message, strlen(message)) == 0); }