> -----Original Message----- > From: Aoyang Fang (SSE, 222010547) <aoyangfang@xxxxxxxxxxxxxxxx> > Sent: Wednesday, January 3, 2024 7:13 PM > To: bpf@xxxxxxxxxxxxxxx; bpf@xxxxxxxx > Cc: void@xxxxxxxxxxxxx > Subject: [PATCH] update the consistency issue in documentation > > From fa9f3f47ddeb3e9a615c17aea57d2ecd53a7d201 Mon Sep 17 00:00:00 > 2001 > From: lincyawer <53161583+Lincyaw@xxxxxxxxxxxxxxxxxxxxxxxx> > Date: Thu, 4 Jan 2024 10:51:36 +0800 > Subject: [PATCH] The original documentation of BPF_JMP instructions is > somehow misleading. The code part of instruction, e.g., BPF_JEQ's value is > noted as 0x1, however, in `include/uapi/linux/bpf.h`, the value of BPF_JEQ is > 0x10. At the same time, the description convention is inconsistent with the > BPF_ALU, whose code are also 4bit, but the value of BPF_ADD is 0x00 https://www.ietf.org/archive/id/draft-ietf-bpf-isa-00.html#section-3 says: > ============== ====== ================= > 4 bits (MSB) 1 bit 3 bits (LSB) > ============== ====== ================= > code source instruction class > ============== ====== ================= Hence the code field is 4 bits, and 0x10 cannot fit in a 4 bit field. The documentation is already internally consistent, and this proposed change would make the documentation incorrect. Dave