ietf-wg-bpf / ebpf-docs

eBPF Standard Documentation
37 stars 5 forks source link

ISA: add definition and/or reference for big/little endian #156

Open dthaler opened 2 weeks ago

dthaler commented 2 weeks ago

John Scudder comments:

Thanks for this.

Although one would hope that “big-endian” and “little-endian” are widely understood, it might not be a bad idea to supply definitions and/or a reference.

dthaler commented 2 weeks ago

Paul Wouters comments:

Can the headers in the tables such as in Section 3 be extended so it is more clear how many bits are in the various fields ? eg the IETF style is:

1                   2                   3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    opcode     |     regs      |            offset             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              imm                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Why "host vs big" endian instead of "host order vs network order" or "little vs big endian" ? I understand not all hosts are "host endian", I am just a little confused why to fixup two common sets into a new set.

NITS:

boilerplate got rendered badly

dthaler commented 1 week ago

The appropriate reference for endianness is IEN 137

dthaler commented 1 week ago

Proposed patch posted at https://mailarchive.ietf.org/arch/msg/bpf/G0yjlzZ4GazyQC2gN0jW8YjqGkk/ (Boilerplate fix will be done as part of #160)

dthaler commented 1 week ago

Fixed in draft -04