mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 04:31:50 +00:00
604326b41a
Add a generic sk_msg layer, and convert current sockmap and later kTLS over to make use of it. While sk_buff handles network packet representation from netdevice up to socket, sk_msg handles data representation from application to socket layer. This means that sk_msg framework spans across ULP users in the kernel, and enables features such as introspection or filtering of data with the help of BPF programs that operate on this data structure. Latter becomes in particular useful for kTLS where data encryption is deferred into the kernel, and as such enabling the kernel to perform L7 introspection and policy based on BPF for TLS connections where the record is being encrypted after BPF has run and came to a verdict. In order to get there, first step is to transform open coding of scatter-gather list handling into a common core framework that subsystems can use. The code itself has been split and refactored into three bigger pieces: i) the generic sk_msg API which deals with managing the scatter gather ring, providing helpers for walking and mangling, transferring application data from user space into it, and preparing it for BPF pre/post-processing, ii) the plain sock map itself where sockets can be attached to or detached from; these bits are independent of i) which can now be used also without sock map, and iii) the integration with plain TCP as one protocol to be used for processing L7 application data (later this could e.g. also be extended to other protocols like UDP). The semantics are the same with the old sock map code and therefore no change of user facing behavior or APIs. While pursuing this work it also helped finding a number of bugs in the old sockmap code that we've fixed already in earlier commits. The test_sockmap kselftest suite passes through fine as well. Joint work with John. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: John Fastabend <john.fastabend@gmail.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
37 lines
1.3 KiB
Makefile
37 lines
1.3 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
#
|
|
# Makefile for the Linux networking core.
|
|
#
|
|
|
|
obj-y := sock.o request_sock.o skbuff.o datagram.o stream.o scm.o \
|
|
gen_stats.o gen_estimator.o net_namespace.o secure_seq.o flow_dissector.o
|
|
|
|
obj-$(CONFIG_SYSCTL) += sysctl_net_core.o
|
|
|
|
obj-y += dev.o ethtool.o dev_addr_lists.o dst.o netevent.o \
|
|
neighbour.o rtnetlink.o utils.o link_watch.o filter.o \
|
|
sock_diag.o dev_ioctl.o tso.o sock_reuseport.o \
|
|
fib_notifier.o xdp.o
|
|
|
|
obj-y += net-sysfs.o
|
|
obj-$(CONFIG_PAGE_POOL) += page_pool.o
|
|
obj-$(CONFIG_PROC_FS) += net-procfs.o
|
|
obj-$(CONFIG_NET_SOCK_MSG) += skmsg.o
|
|
obj-$(CONFIG_NET_PKTGEN) += pktgen.o
|
|
obj-$(CONFIG_NETPOLL) += netpoll.o
|
|
obj-$(CONFIG_FIB_RULES) += fib_rules.o
|
|
obj-$(CONFIG_TRACEPOINTS) += net-traces.o
|
|
obj-$(CONFIG_NET_DROP_MONITOR) += drop_monitor.o
|
|
obj-$(CONFIG_NETWORK_PHY_TIMESTAMPING) += timestamping.o
|
|
obj-$(CONFIG_NET_PTP_CLASSIFY) += ptp_classifier.o
|
|
obj-$(CONFIG_CGROUP_NET_PRIO) += netprio_cgroup.o
|
|
obj-$(CONFIG_CGROUP_NET_CLASSID) += netclassid_cgroup.o
|
|
obj-$(CONFIG_LWTUNNEL) += lwtunnel.o
|
|
obj-$(CONFIG_LWTUNNEL_BPF) += lwt_bpf.o
|
|
obj-$(CONFIG_BPF_STREAM_PARSER) += sock_map.o
|
|
obj-$(CONFIG_DST_CACHE) += dst_cache.o
|
|
obj-$(CONFIG_HWBM) += hwbm.o
|
|
obj-$(CONFIG_NET_DEVLINK) += devlink.o
|
|
obj-$(CONFIG_GRO_CELLS) += gro_cells.o
|
|
obj-$(CONFIG_FAILOVER) += failover.o
|