Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sdiv and smod instruction support to bpf2c #3165

Merged
merged 4 commits into from
Jan 18, 2024

Conversation

dthaler
Copy link
Collaborator

@dthaler dthaler commented Jan 10, 2024

Description

Add support to bpf2c for the signed division and modulo instructions as specified in ietf-wg-bpf/ebpf-docs#42

Testing

Manually tested with latest bpf_conformance suite (in bpf_conformance main branch) using

bpf_conformance_runner --test_file_directory C:\Users\dthal\git\ebpf\bpf_conformance\build\tests --plugin_path C:\Users\dthal\git\ebpf\ebpf-for-windows\x64\Debug\bpf2c_plugin.exe --cpu_version v4 --exclude_regex "imm-" --plugin_options "--include C:\Users\dthal\git\ebpf\ebpf-for-windows\include"

Documentation

This PR includes a doc change to update the list of what instructions are supported.
It also lists bpf_conformance tests for the same, although the latest release of bpf_conformance still doesn't include them yet.
It also fixes a cut-and-paste error for opcode 0x06.

Installation

No impact

Manually tested with latest bpf_conformance test

Signed-off-by: Dave Thaler <[email protected]>
@dthaler dthaler requested a review from Alan-Jowett January 11, 2024 22:17
@dthaler dthaler changed the title Add sdiv instruction support to bpf2c Add sdiv and smod instruction support to bpf2c Jan 12, 2024
@Alan-Jowett Alan-Jowett added this pull request to the merge queue Jan 18, 2024
Merged via the queue into microsoft:main with commit d0c6a08 Jan 18, 2024
75 checks passed
@dthaler dthaler deleted the sdiv branch January 18, 2024 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants