Add regression tests for PF_PACKET transmission using packet_snd. The TPACKET ring interface has tests for transmission and reception. This is an initial stab at the same for the send call based interface. Packets are sent over loopback, then read twice. The entire packet is read from another packet socket and compared. The packet is also verified to arrive at a UDP socket for protocol conformance. The test sends a packet over loopback, testing the following options (not the full cross-product): - SOCK_DGRAM - SOCK_RAW - vlan tag - qdisc bypass - bind() and sendto() - virtio_net_hdr - csum offload (NOT actual csum feature, ignored on loopback) - gso Besides these basic functionality tests, the test runs from a set of bounds checks, positive and negative. Running over loopback, which has dev->min_header_len, it cannot generate variable length hhlen. Signed-off-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
23 lines
868 B
Makefile
23 lines
868 B
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
# Makefile for net selftests
|
|
|
|
CFLAGS = -Wall -Wl,--no-as-needed -O2 -g
|
|
CFLAGS += -I../../../../usr/include/
|
|
|
|
TEST_PROGS := run_netsocktests run_afpackettests test_bpf.sh netdevice.sh rtnetlink.sh
|
|
TEST_PROGS += fib_tests.sh fib-onlink-tests.sh pmtu.sh udpgso.sh
|
|
TEST_PROGS += udpgso_bench.sh fib_rule_tests.sh msg_zerocopy.sh psock_snd.sh
|
|
TEST_PROGS_EXTENDED := in_netns.sh
|
|
TEST_GEN_FILES = socket
|
|
TEST_GEN_FILES += psock_fanout psock_tpacket msg_zerocopy
|
|
TEST_GEN_FILES += tcp_mmap tcp_inq psock_snd
|
|
TEST_GEN_FILES += udpgso udpgso_bench_tx udpgso_bench_rx
|
|
TEST_GEN_PROGS = reuseport_bpf reuseport_bpf_cpu reuseport_bpf_numa
|
|
TEST_GEN_PROGS += reuseport_dualstack reuseaddr_conflict
|
|
|
|
include ../lib.mk
|
|
|
|
$(OUTPUT)/reuseport_bpf_numa: LDFLAGS += -lnuma
|
|
$(OUTPUT)/tcp_mmap: LDFLAGS += -lpthread
|
|
$(OUTPUT)/tcp_inq: LDFLAGS += -lpthread
|