samples/bpf: Update cpumap/devmap sec_name
authorLorenzo Bianconi <lorenzo@kernel.org>
Tue, 1 Feb 2022 14:58:10 +0000 (15:58 +0100)
committerAndrii Nakryiko <andrii@kernel.org>
Tue, 1 Feb 2022 17:51:31 +0000 (09:51 -0800)
Substitute deprecated xdp_cpumap and xdp_devmap sec_name with
xdp/cpumap and xdp/devmap respectively.

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/509201497c6c4926bc941f1cba24173cf500e760.1643727185.git.lorenzo@kernel.org
samples/bpf/xdp_redirect_cpu.bpf.c
samples/bpf/xdp_redirect_map.bpf.c
samples/bpf/xdp_redirect_map_multi.bpf.c

index 25e3a40..87c54bf 100644 (file)
@@ -491,7 +491,7 @@ int  xdp_prognum5_lb_hash_ip_pairs(struct xdp_md *ctx)
        return bpf_redirect_map(&cpu_map, cpu_dest, 0);
 }
 
-SEC("xdp_cpumap/redirect")
+SEC("xdp/cpumap")
 int xdp_redirect_cpu_devmap(struct xdp_md *ctx)
 {
        void *data_end = (void *)(long)ctx->data_end;
@@ -507,19 +507,19 @@ int xdp_redirect_cpu_devmap(struct xdp_md *ctx)
        return bpf_redirect_map(&tx_port, 0, 0);
 }
 
-SEC("xdp_cpumap/pass")
+SEC("xdp/cpumap")
 int xdp_redirect_cpu_pass(struct xdp_md *ctx)
 {
        return XDP_PASS;
 }
 
-SEC("xdp_cpumap/drop")
+SEC("xdp/cpumap")
 int xdp_redirect_cpu_drop(struct xdp_md *ctx)
 {
        return XDP_DROP;
 }
 
-SEC("xdp_devmap/egress")
+SEC("xdp/devmap")
 int xdp_redirect_egress_prog(struct xdp_md *ctx)
 {
        void *data_end = (void *)(long)ctx->data_end;
index 59efd65..415bac1 100644 (file)
@@ -68,7 +68,7 @@ int xdp_redirect_map_native(struct xdp_md *ctx)
        return xdp_redirect_map(ctx, &tx_port_native);
 }
 
-SEC("xdp_devmap/egress")
+SEC("xdp/devmap")
 int xdp_redirect_map_egress(struct xdp_md *ctx)
 {
        void *data_end = (void *)(long)ctx->data_end;
index bb0a5a3..8b2fd4e 100644 (file)
@@ -53,7 +53,7 @@ int xdp_redirect_map_native(struct xdp_md *ctx)
        return xdp_redirect_map(ctx, &forward_map_native);
 }
 
-SEC("xdp_devmap/egress")
+SEC("xdp/devmap")
 int xdp_devmap_prog(struct xdp_md *ctx)
 {
        void *data_end = (void *)(long)ctx->data_end;