The payload length counts bytes after the fixed IPv6 header.

highlighted = computed this step

Payload length counts bytes after the header

The payload length field says 4 bytes follow the fixed header.

payload length=4\text{payload length}=4
Payload lengthThe fixed header fields are decoded from the pinned packet bytes.Payload length320 bits / 40 bytes0x600123450004114020010db800000000000000000000000120010db8000000000000000000000002byte 0byte 1byte 2byte 301100000000000010010001101000101byte 4byte 5byte 6byte 700000000000001000001000101000000byte 8byte 9byte 10byte 1100100000000000010000110110111000byte 12byte 13byte 14byte 1500000000000000000000000000000000byte 16byte 17byte 18byte 1900000000000000000000000000000000byte 20byte 21byte 22byte 2300000000000000000000000000000001byte 24byte 25byte 26byte 2700100000000000010000110110111000byte 28byte 29byte 30byte 3100000000000000000000000000000000byte 32byte 33byte 34byte 3500000000000000000000000000000000byte 36byte 37byte 38byte 3900000000000000000000000000000010version6traffic-class0flow-label0x12345payload-length4next-header17->UDPhop-limit64source2001:db8::1(cont.)(cont.)(cont.)destination2001:db8::2(cont.)(cont.)(cont.)

The fixed header stays fixed

The fixed header itself is 40 bytes. The length field counts what comes after it.

fixed header bytes=40\text{fixed header bytes}=40
Payload lengthThe fixed header fields are decoded from the pinned packet bytes.Payload length320 bits / 40 bytes0x600123450004114020010db800000000000000000000000120010db8000000000000000000000002byte 0byte 1byte 2byte 301100000000000010010001101000101byte 4byte 5byte 6byte 700000000000001000001000101000000byte 8byte 9byte 10byte 1100100000000000010000110110111000byte 12byte 13byte 14byte 1500000000000000000000000000000000byte 16byte 17byte 18byte 1900000000000000000000000000000000byte 20byte 21byte 22byte 2300000000000000000000000000000001byte 24byte 25byte 26byte 2700100000000000010000110110111000byte 28byte 29byte 30byte 3100000000000000000000000000000000byte 32byte 33byte 34byte 3500000000000000000000000000000000byte 36byte 37byte 38byte 3900000000000000000000000000000010version6traffic-class0flow-label0x12345payload-length4next-header17->UDPhop-limit64source2001:db8::1(cont.)(cont.)(cont.)destination2001:db8::2(cont.)(cont.)(cont.)

The marker is four bytes

The payload marker bytes are 0x6869abcd, exactly the count named by the header.

payload=0x6869abcd\text{payload}=0x6869abcd
Payload markerThe payload marker is outside the fixed header.Payload marker32 bits / 4 bytes0x6869abcdbyte 0byte 1byte 2byte 301101000011010011010101111001101payload-marker0x6869abcd

Summary

The header length is fixed here; the payload length names only the bytes after it.

40+440+4
Payload lengthThe fixed header fields are decoded from the pinned packet bytes.Payload length320 bits / 40 bytes0x600123450004114020010db800000000000000000000000120010db8000000000000000000000002byte 0byte 1byte 2byte 301100000000000010010001101000101byte 4byte 5byte 6byte 700000000000001000001000101000000byte 8byte 9byte 10byte 1100100000000000010000110110111000byte 12byte 13byte 14byte 1500000000000000000000000000000000byte 16byte 17byte 18byte 1900000000000000000000000000000000byte 20byte 21byte 22byte 2300000000000000000000000000000001byte 24byte 25byte 26byte 2700100000000000010000110110111000byte 28byte 29byte 30byte 3100000000000000000000000000000000byte 32byte 33byte 34byte 3500000000000000000000000000000000byte 36byte 37byte 38byte 3900000000000000000000000000000010version6traffic-class0flow-label0x12345payload-length4next-header17->UDPhop-limit64source2001:db8::1(cont.)(cont.)(cont.)destination2001:db8::2(cont.)(cont.)(cont.)