ietf-wg-bpf / ebpf-docs

eBPF Standard Documentation
42 stars 5 forks source link

ISA: src vs src_reg #93

Closed dthaler closed 7 months ago

dthaler commented 7 months ago

The source register number field is defined as:

src_reg the source register number (0-10), except where otherwise specified (64-bit immediate instructions_ reuse this field for other purposes)

However, the "64-bit immediate instructions" section has:

Instructions with the BPF_IMM 'mode' modifier use the wide instruction encoding defined in Instruction encoding_, and use the 'src' field of the basic instruction to hold an opcode subtype.

The following table defines a set of BPF_IMM | BPF_DW | BPF_LD instructions with opcode subtypes in the 'src' field, using new terms such as "map" defined further below:

And various tables have a column labeled "src".

These should be src_reg

dthaler commented 7 months ago

Also in the appendix, the offset column should probably appear before the imm column.

dthaler commented 7 months ago

Patch posted at https://mailarchive.ietf.org/arch/msg/bpf/y3aNV8BEIY-RD0_4fn1R7h-mKho/

dthaler commented 7 months ago

Appendix updated in PR #94 and #98

dthaler commented 7 months ago

Fixed in PR #99

dthaler commented 7 months ago

Fixed in draft -01