OSDN Git Service

bpf: Add function for XDP meta data length check
authorZvi Effron <zeffron@riotgames.com>
Wed, 7 Jul 2021 22:16:54 +0000 (22:16 +0000)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 8 Jul 2021 02:51:12 +0000 (19:51 -0700)
commit7445cf31d2e25e3f8ad7b1c5342e624c09ab23a2
treea7babfa3dec035e81533d4e66266bfc75f3013ea
parent5e437416ff66981d8154687cfdf7de50b1d82bfc
bpf: Add function for XDP meta data length check

This commit prepares to use the XDP meta data length check in multiple
places by making it into a static inline function instead of a literal.

Co-developed-by: Cody Haas <chaas@riotgames.com>
Co-developed-by: Lisa Watanabe <lwatanabe@riotgames.com>
Signed-off-by: Cody Haas <chaas@riotgames.com>
Signed-off-by: Lisa Watanabe <lwatanabe@riotgames.com>
Signed-off-by: Zvi Effron <zeffron@riotgames.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20210707221657.3985075-2-zeffron@riotgames.com
include/net/xdp.h
net/core/filter.c