Skip to content

Commit af69989

Browse files
gregory-kanter-s1dylandreimerink
authored andcommitted
Fix incorrect attributes in SOCKMAP and SOCKHASH
1 parent c68732b commit af69989

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

‎docs/linux/map-type/BPF_MAP_TYPE_SOCKHASH.md‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,13 @@ This map can also be manipulated from kernel space, the main use-case for doing
2121

2222
## Attributes
2323

24-
The [`value_size`](../syscall/BPF_MAP_CREATE.md#value_size) must always be `4` and the [`key_size`](../syscall/BPF_MAP_CREATE.md#key_size) must always be `8`.
24+
[:octicons-tag-24: v4.18](https://github.com/torvalds/linux/commit/81110384441a59cff47430f20f049e69b98c17f4)
25+
26+
The [`value_size`](../syscall/BPF_MAP_CREATE.md#value_size) must always be `4`.
27+
28+
[:octicons-tag-24: v5.7](https://github.com/torvalds/linux/commit/c1cdf65da060a8e047a9f4433306fd6dac1f51a6)
29+
30+
The [`value_size`](../syscall/BPF_MAP_CREATE.md#value_size) must be either `4` or `8` to support storing socket cookies. Lookups are unsupported for value size `4` maps.
2531

2632
<!-- TODO link to generic page for attributes which are the same for every map type -->
2733

‎docs/linux/map-type/BPF_MAP_TYPE_SOCKMAP.md‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,15 @@ A sock object may be in multiple maps, but can only inherit a single parse or ve
3636

3737
## Attributes
3838

39-
The [`value_size`](../syscall/BPF_MAP_CREATE.md#value_size) must always be `4` and the [`key_size`](../syscall/BPF_MAP_CREATE.md#key_size) must always be `8`.
39+
The [`key_size`](../syscall/BPF_MAP_CREATE.md#key_size) must always be `4`.
40+
41+
[:octicons-tag-24: v4.14](https://github.com/torvalds/linux/commit/174a79ff9515f400b9a6115643dafd62a635b7e6)
42+
43+
The [`value_size`](../syscall/BPF_MAP_CREATE.md#value_size) must always be `4`.
44+
45+
[:octicons-tag-24: v5.7](https://github.com/torvalds/linux/commit/c1cdf65da060a8e047a9f4433306fd6dac1f51a6)
46+
47+
The [`value_size`](../syscall/BPF_MAP_CREATE.md#value_size) must be either `4` or `8` to support storing socket cookies. Lookups are unsupported for value size `4` maps.
4048

4149
<!-- TODO link to generic page for attributes which are the same for every map type -->
4250

0 commit comments

Comments
 (0)