diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile index 1e9a989090e6ed..eb7cd0eaad0ff7 100644 --- a/samples/bpf/Makefile +++ b/samples/bpf/Makefile @@ -54,7 +54,7 @@ hostprogs-y += task_fd_query hostprogs-y += xdp_sample_pkts hostprogs-y += ibumad hostprogs-y += hbm -hostprogs-y += xdp_parse_ssl +hostprogs-y += xdp_ssl_parser # Libbpf dependencies LIBBPF = $(TOOLS_PATH)/lib/bpf/libbpf.a @@ -112,7 +112,7 @@ task_fd_query-objs := bpf_load.o task_fd_query_user.o $(TRACE_HELPERS) xdp_sample_pkts-objs := xdp_sample_pkts_user.o $(TRACE_HELPERS) ibumad-objs := bpf_load.o ibumad_user.o $(TRACE_HELPERS) hbm-objs := bpf_load.o hbm.o $(CGROUP_HELPERS) -xdp_parse_ssl-objs := xdp_parse_ssl_user.o +xdp_ssl_parser-objs := xdp_ssl_parser_user.o # Tell kbuild to always build the programs always := $(hostprogs-y) @@ -172,7 +172,7 @@ always += task_fd_query_kern.o always += xdp_sample_pkts_kern.o always += ibumad_kern.o always += hbm_out_kern.o -always += xdp_parse_ssl_kern.o +always += xdp_ssl_parser_kern.o KBUILD_HOSTCFLAGS += -I$(objtree)/usr/include KBUILD_HOSTCFLAGS += -I$(srctree)/tools/lib/ diff --git a/samples/bpf/xdp_parse_ssl_common.h b/samples/bpf/xdp_parse_ssl_common.h deleted file mode 100644 index 2be2fea8d239b6..00000000000000 --- a/samples/bpf/xdp_parse_ssl_common.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef _XDP_PARSE_SSL_COMMON_H -#define _XDP_PARSE_SSL_COMMON_H - -struct sslsni_wrapper { - char sslsni[100]; -}; - -#endif diff --git a/samples/bpf/xdp_ssl_parser_common.h b/samples/bpf/xdp_ssl_parser_common.h new file mode 100644 index 00000000000000..af9ed17e07cb89 --- /dev/null +++ b/samples/bpf/xdp_ssl_parser_common.h @@ -0,0 +1,8 @@ +#ifndef _XDP_SSL_PARSER_COMMON_H +#define _XDP_SSL_PARSER_COMMON_H + +struct sslsni_wrapper { + char sslsni[100]; +}; + +#endif diff --git a/samples/bpf/xdp_parse_ssl_kern.c b/samples/bpf/xdp_ssl_parser_kern.c similarity index 98% rename from samples/bpf/xdp_parse_ssl_kern.c rename to samples/bpf/xdp_ssl_parser_kern.c index 9493678f7fc4af..8895c9eacf6286 100644 --- a/samples/bpf/xdp_parse_ssl_kern.c +++ b/samples/bpf/xdp_ssl_parser_kern.c @@ -13,7 +13,7 @@ #include #include "bpf_helpers.h" #include "bpf_endian.h" -#include "xdp_parse_ssl_common.h" +#include "xdp_ssl_parser_common.h" #define RANDLEN 32 #define SNIMAXLEN 253 @@ -245,7 +245,7 @@ static int parse_ipv4(void *data, uint64_t nh_off, void *data_end) return tcp(data, nh_off + ihl_len, data_end); } -SEC("parsessl") +SEC("sslparser") int handle_ingress(struct xdp_md *ctx) { void *data_end = (void *)(long)ctx->data_end; @@ -283,7 +283,7 @@ int handle_ingress(struct xdp_md *ctx) } if (h_proto == htons(ETH_P_IP)) - return parse_ipv4(data, nh_off, data_end); + parse_ipv4(data, nh_off, data_end); return rc; } diff --git a/samples/bpf/xdp_parse_ssl_user.c b/samples/bpf/xdp_ssl_parser_user.c similarity index 94% rename from samples/bpf/xdp_parse_ssl_user.c rename to samples/bpf/xdp_ssl_parser_user.c index 469912505db7ee..955355fe84549e 100644 --- a/samples/bpf/xdp_parse_ssl_user.c +++ b/samples/bpf/xdp_ssl_parser_user.c @@ -5,7 +5,7 @@ #include #include #include -#include "xdp_parse_ssl_common.h" +#include "xdp_ssl_parser_common.h" int main(int argc, char **argv) { int fd = -1;