Skip to content

Commit

Permalink
samples/bpf: Update cpumap/devmap sec_name
Browse files Browse the repository at this point in the history
Substitute deprecated xdp_cpumap and xdp_devmap sec_name with
xdp/cpumap and xdp/devmap respectively.

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Link: https://lore.kernel.org/bpf/509201497c6c4926bc941f1cba24173cf500e760.1643727185.git.lorenzo@kernel.org
  • Loading branch information
LorenzoBianconi authored and anakryiko committed Feb 1, 2022
1 parent 439f033 commit 8bab532
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions samples/bpf/xdp_redirect_cpu.bpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion samples/bpf/xdp_redirect_map.bpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion samples/bpf/xdp_redirect_map_multi.bpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8bab532

Please sign in to comment.