
Unfortunately the existing test relied on packet payload in order to map incoming packets to sockets. In order to get this to work with TCP, TCP_FASTOPEN needed to be used. Since the fast open path is slightly different than the standard TCP path, I created a second test which sends to reuseport group members based on receiving cpu core id. This will probably serve as a better real-world example use as well. Signed-off-by: Craig Gallek <kraig@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
20 lines
357 B
Makefile
20 lines
357 B
Makefile
# Makefile for net selftests
|
|
|
|
CFLAGS = -Wall -O2 -g
|
|
|
|
CFLAGS += -I../../../../usr/include/
|
|
|
|
NET_PROGS = socket psock_fanout psock_tpacket reuseport_bpf reuseport_bpf_cpu
|
|
|
|
all: $(NET_PROGS)
|
|
%: %.c
|
|
$(CC) $(CFLAGS) -o $@ $^
|
|
|
|
TEST_PROGS := run_netsocktests run_afpackettests test_bpf.sh
|
|
TEST_FILES := $(NET_PROGS)
|
|
|
|
include ../lib.mk
|
|
|
|
clean:
|
|
$(RM) $(NET_PROGS)
|