Linux kernel source tree
Find a file
Andrey Ignatov 194db0d958 selftests/bpf: Test for get_socket_cookie
Add test to use get_socket_cookie() from BPF programs of types
BPF_PROG_TYPE_SOCK_OPS and BPF_PROG_TYPE_CGROUP_SOCK_ADDR.

The test attaches two programs to cgroup, runs TCP server and client in
the cgroup and checks that two operations are done properly on client
socket when user calls connect(2):

1. In BPF_CGROUP_INET6_CONNECT socket cookie is used as the key to write
   new value in a map for client socket.

2. In BPF_CGROUP_SOCK_OPS (BPF_SOCK_OPS_TCP_CONNECT_CB callback) the
   value written in "1." is found by socket cookie, since it's the same
   socket, and updated.

Finally the test verifies the value in the map.

Signed-off-by: Andrey Ignatov <rdna@fb.com>
Acked-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
2018-07-31 09:33:48 +02:00
arch
block
certs
crypto
Documentation docs: bpf: Capitalise document heading 2018-07-27 07:23:48 +02:00
drivers nfp: fix variable dereferenced before check in nfp_app_ctrl_rx_raw() 2018-07-31 09:28:19 +02:00
firmware
fs
include bpf: Support bpf_get_socket_cookie in more prog types 2018-07-31 09:33:48 +02:00
init
ipc
kernel
lib
LICENSES
mm
net bpf: Support bpf_get_socket_cookie in more prog types 2018-07-31 09:33:48 +02:00
samples samples: bpf: convert xdpsock_user.c to libbpf 2018-07-27 07:18:44 +02:00
scripts
security
sound
tools selftests/bpf: Test for get_socket_cookie 2018-07-31 09:33:48 +02:00
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.
See Documentation/00-INDEX for a list of what is contained in each file.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.