diff options
author | 2022-08-12 16:37:27 +0100 | |
---|---|---|
committer | 2022-08-15 17:34:29 +0200 | |
commit | 4961d0772578e8737afe61370743f3bc22867111 (patch) | |
tree | 4853274a298fc312bfd7a12eeeceb8d619bb56d2 /include | |
parent | bpftool: Fix a typo in a comment (diff) | |
download | linux-4961d0772578e8737afe61370743f3bc22867111.tar.gz linux-4961d0772578e8737afe61370743f3bc22867111.tar.bz2 linux-4961d0772578e8737afe61370743f3bc22867111.zip |
bpf: Clear up confusion in bpf_skb_adjust_room()'s documentation
Adding or removing room space _below_ layers 2 or 3, as the description
mentions, is ambiguous. This was written with a mental image of the
packet with layer 2 at the top, layer 3 under it, and so on. But it has
led users to believe that it was on lower layers (before the beginning
of the L2 and L3 headers respectively).
Let's make it more explicit, and specify between which layers the room
space is adjusted.
Reported-by: Rumen Telbizov <rumen.telbizov@menlosecurity.com>
Signed-off-by: Quentin Monnet <quentin@isovalent.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20220812153727.224500-3-quentin@isovalent.com
Diffstat (limited to 'include')
-rw-r--r-- | include/uapi/linux/bpf.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index 7d1e2794d83e..934a2a8beb87 100644 --- a/include/uapi/linux/bpf.h +++ b/include/uapi/linux/bpf.h @@ -2573,10 +2573,12 @@ union bpf_attr { * There are two supported modes at this time: * * * **BPF_ADJ_ROOM_MAC**: Adjust room at the mac layer - * (room space is added or removed below the layer 2 header). + * (room space is added or removed between the layer 2 and + * layer 3 headers). * * * **BPF_ADJ_ROOM_NET**: Adjust room at the network layer - * (room space is added or removed below the layer 3 header). + * (room space is added or removed between the layer 3 and + * layer 4 headers). * * The following flags are supported at this time: * |