@@ -109,9 +109,9 @@ The encoding of the 'opcode' field varies and can be determined from
109109the three least significant bits (LSB) of the 'opcode' field which holds
110110the "instruction class", as follows:
111111
112- ========= ===== =============================== =================
112+ ========= ===== =============================== ===================================
113113class value description reference
114- ========= ===== =============================== =================
114+ ========= ===== =============================== ===================================
115115BPF_LD 0x00 non-standard load operations `Load and store instructions `_
116116BPF_LDX 0x01 load into register operations `Load and store instructions `_
117117BPF_ST 0x02 store from immediate operations `Load and store instructions `_
@@ -120,7 +120,7 @@ BPF_ALU 0x04 32-bit arithmetic operations `Arithmetic and jump instruct
120120BPF_JMP 0x05 64-bit jump operations `Arithmetic and jump instructions `_
121121BPF_JMP32 0x06 32-bit jump operations `Arithmetic and jump instructions `_
122122BPF_ALU64 0x07 64-bit arithmetic operations `Arithmetic and jump instructions `_
123- ========= ===== =============================== =================
123+ ========= ===== =============================== ===================================
124124
125125Arithmetic and jump instructions
126126================================
@@ -140,12 +140,12 @@ code
140140source
141141 the source operand location, which unless otherwise specified is one of:
142142
143- ====== ===== ========================================
143+ ====== ===== ==========================================
144144 source value description
145- ====== ===== ========================================
145+ ====== ===== ==========================================
146146 BPF_K 0x00 use 32-bit 'imm' value as source operand
147147 BPF_X 0x08 use 'src' register value as source operand
148- ====== ===== ========================================
148+ ====== ===== ==========================================
149149
150150instruction class
151151 the instruction class (see `Instruction classes `_)
@@ -159,9 +159,9 @@ otherwise identical operations.
159159
160160The 4-bit 'code' field encodes the operation as follows:
161161
162- ======== ===== =================================================
162+ ======== ===== ==========================================================
163163code value description
164- ======== ===== =================================================
164+ ======== ===== ==========================================================
165165BPF_ADD 0x00 dst += src
166166BPF_SUB 0x10 dst -= src
167167BPF_MUL 0x20 dst \* = src
@@ -176,7 +176,7 @@ BPF_XOR 0xa0 dst ^= src
176176BPF_MOV 0xb0 dst = src
177177BPF_ARSH 0xc0 sign extending shift right
178178BPF_END 0xd0 byte swap operations (see `Byte swap instructions `_ below)
179- ======== ===== =================================================
179+ ======== ===== ==========================================================
180180
181181where 'src' is the source operand value.
182182
@@ -268,22 +268,22 @@ The 4-bit 'code' field encodes the operation as below, where PC is the program c
268268======== ===== === ========================== ========================
269269code value src description notes
270270======== ===== === ========================== ========================
271- BPF_JA 0x00 0x0 PC += offset BPF_JMP only
272- BPF_JEQ 0x10 any PC += offset if dst == src
273- BPF_JGT 0x20 any PC += offset if dst > src unsigned
274- BPF_JGE 0x30 any PC += offset if dst >= src unsigned
275- BPF_JSET 0x40 any PC += offset if dst & src
276- BPF_JNE 0x50 any PC += offset if dst != src
277- BPF_JSGT 0x60 any PC += offset if dst > src signed
278- BPF_JSGE 0x70 any PC += offset if dst >= src signed
279- BPF_CALL 0x80 0x0 call helper function imm see `Helper functions `_
280- BPF_CALL 0x80 0x1 call PC += offset see `eBPF functions `_
281- BPF_CALL 0x80 0x2 call runtime function imm see `Runtime functions `_
282- BPF_EXIT 0x95 0x0 return BPF_JMP only
283- BPF_JLT 0xa0 any PC += offset if dst < src unsigned
284- BPF_JLE 0xb0 any PC += offset if dst <= src unsigned
285- BPF_JSLT 0xc0 any PC += offset if dst < src signed
286- BPF_JSLE 0xd0 any PC += offset if dst <= src signed
271+ BPF_JA 0x0 0x0 PC += offset BPF_JMP only
272+ BPF_JEQ 0x1 any PC += offset if dst == src
273+ BPF_JGT 0x2 any PC += offset if dst > src unsigned
274+ BPF_JGE 0x3 any PC += offset if dst >= src unsigned
275+ BPF_JSET 0x4 any PC += offset if dst & src
276+ BPF_JNE 0x5 any PC += offset if dst != src
277+ BPF_JSGT 0x6 any PC += offset if dst > src signed
278+ BPF_JSGE 0x7 any PC += offset if dst >= src signed
279+ BPF_CALL 0x8 0x0 call helper function imm see `Helper functions `_
280+ BPF_CALL 0x8 0x1 call PC += offset see `eBPF functions `_
281+ BPF_CALL 0x8 0x2 call runtime function imm see `Runtime functions `_
282+ BPF_EXIT 0x9 0x0 return BPF_JMP only
283+ BPF_JLT 0xa any PC += offset if dst < src unsigned
284+ BPF_JLE 0xb any PC += offset if dst <= src unsigned
285+ BPF_JSLT 0xc any PC += offset if dst < src signed
286+ BPF_JSLE 0xd any PC += offset if dst <= src signed
287287======== ===== === ========================== ========================
288288
289289Helper functions
@@ -401,7 +401,7 @@ The 'imm' field is used to encode the actual atomic operation.
401401Simple atomic operation use a subset of the values defined to encode
402402arithmetic operations in the 'imm' field to encode the atomic operation:
403403
404- ======== ===== ===========
404+ ======== ===== ===========
405405imm value description
406406======== ===== ===========
407407BPF_ADD 0x00 atomic add
0 commit comments