lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Fri, 31 Jul 2020 13:44:17 +0900 From: Yoshiki Komachi <komachi.yoshiki@...il.com> To: "David S. Miller" <davem@...emloft.net>, Alexei Starovoitov <ast@...nel.org>, Daniel Borkmann <daniel@...earbox.net>, Jesper Dangaard Brouer <hawk@...nel.org>, John Fastabend <john.fastabend@...il.com>, Jakub Kicinski <kuba@...nel.org>, Martin KaFai Lau <kafai@...com>, Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>, Andrii Nakryiko <andriin@...com>, KP Singh <kpsingh@...omium.org>, Roopa Prabhu <roopa@...ulusnetworks.com>, Nikolay Aleksandrov <nikolay@...ulusnetworks.com>, David Ahern <dsahern@...nel.org> Cc: Yoshiki Komachi <komachi.yoshiki@...il.com>, netdev@...r.kernel.org, bridge@...ts.linux-foundation.org, bpf@...r.kernel.org Subject: [RFC PATCH bpf-next 0/3] Add a new bpf helper for FDB lookup This series adds a new bpf helper for doing FDB lookup in the kernel tables from XDP programs. This helps users to accelerate Linux bridge with XDP. In the past, XDP generally required users to reimplement their own networking functionalities with specific manners of BPF programming by themselves, hindering its potential uses. IMO, bpf helpers to access networking stacks in kernel help to mitigate the programming costs because users reuse mature Linux networking feature more easily. The previous commit 87f5fc7e48dd ("bpf: Provide helper to do forwarding lookups in kernel FIB table") have already added a bpf helper for access FIB in the kernel tables from XDP programs. As a next step, this series introduces the API for FDB lookup. In the future, other bpf helpers for learning and VLAN filtering will also be required in order to realize fast XDP-based bridge although these are not included in this series. Patch 1 adds new function for access FDB in the kernel tables via the new bpf helper. Patch 2 adds the bpf helper and 3 adds a sample program. Yoshiki Komachi (3): net/bridge: Add new function to access FDB from XDP programs bpf: Add helper to do forwarding lookups in kernel FDB table samples/bpf: Add a simple bridge example accelerated with XDP include/linux/if_bridge.h | 11 ++ include/uapi/linux/bpf.h | 28 ++++ net/bridge/br_fdb.c | 25 ++++ net/core/filter.c | 45 +++++++ samples/bpf/Makefile | 3 + samples/bpf/xdp_bridge_kern.c | 129 ++++++++++++++++++ samples/bpf/xdp_bridge_user.c | 239 +++++++++++++++++++++++++++++++++ scripts/bpf_helpers_doc.py | 1 + tools/include/uapi/linux/bpf.h | 28 ++++ 9 files changed, 509 insertions(+) create mode 100644 samples/bpf/xdp_bridge_kern.c create mode 100644 samples/bpf/xdp_bridge_user.c -- 2.20.1 (Apple Git-117)
Powered by blists - more mailing lists