Re: [PATCH 3/4] bpf, docs: Generate nicer tables for instruction encodings
From: Christoph Hellwig <hch@lst.de>
Date: 2022-01-03 09:57:18
Also in:
bpf, netdev
From: Christoph Hellwig <hch@lst.de>
Date: 2022-01-03 09:57:18
Also in:
bpf, netdev
On Thu, Dec 30, 2021 at 04:43:24PM -0800, Alexei Starovoitov wrote:
quoted
+ ======== ===== ========================= + code value description + ======== ===== ========================= + BPF_JA 0x00 BPF_JMP only BPF_JEQ 0x10 BPF_JGT 0x20 BPF_JGE 0x30 BPF_JSET 0x40Not your fault, but the new table looks odd with only some opcodes documented. Same issue with BPF_ALU table. In the past the documented opcodes were for eBPF only and not documented in both, so it wasn't that bad. At least there was a reason for discrepancy. Now it just odd. May be add a comment to all rows?
Yes, having the description everywhere would be good. But I'll have to do research to actually figure out what should go in there for some.
quoted
+ ============= ===== ===================== + mode modifier value description + ============= ===== ===================== + BPF_IMM 0x00 used for 64-bit mov + BPF_ABS 0x20 + BPF_IND 0x40 + BPF_MEM 0x60May be say here that ABS and IND are legacy for compat with classic only? and MEM is the most common modifier for load/store?
Sure.