Commit 439f0336 authored by Lorenzo Bianconi's avatar Lorenzo Bianconi Committed by Andrii Nakryiko
Browse files

selftests/bpf: Update cpumap/devmap sec_name



Substitute deprecated xdp_cpumap and xdp_devmap sec_name with
xdp/cpumap and xdp/devmap respectively in bpf kselftests.

Signed-off-by: default avatarLorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/9a4286cd36781e2c31ba3773bfdcf45cf1bbaa9e.1643727185.git.lorenzo@kernel.org
parent 4a4d4cee
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ struct {
	__uint(max_entries, 4);
} cpu_map SEC(".maps");

SEC("xdp_cpumap/dummy_cm")
SEC("xdp/cpumap")
int xdp_dummy_cm(struct xdp_md *ctx)
{
	return XDP_PASS;
+1 −1
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ int xdp_dummy_prog(struct xdp_md *ctx)
	return XDP_PASS;
}

SEC("xdp_cpumap/dummy_cm")
SEC("xdp/cpumap")
int xdp_dummy_cm(struct xdp_md *ctx)
{
	if (ctx->ingress_ifindex == IFINDEX_LO)
+1 −1
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ struct {
/* valid program on DEVMAP entry via SEC name;
 * has access to egress and ingress ifindex
 */
SEC("xdp_devmap/map_prog")
SEC("xdp/devmap")
int xdp_dummy_dm(struct xdp_md *ctx)
{
	return XDP_PASS;
+1 −1
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ int xdp_dummy_prog(struct xdp_md *ctx)
/* valid program on DEVMAP entry via SEC name;
 * has access to egress and ingress ifindex
 */
SEC("xdp_devmap/map_prog")
SEC("xdp/devmap")
int xdp_dummy_dm(struct xdp_md *ctx)
{
	char fmt[] = "devmap redirect: dev %u -> dev %u len %u\n";
+1 −1
Original line number Diff line number Diff line
@@ -70,7 +70,7 @@ int xdp_redirect_map_all_prog(struct xdp_md *ctx)
				BPF_F_BROADCAST | BPF_F_EXCLUDE_INGRESS);
}

SEC("xdp_devmap/map_prog")
SEC("xdp/devmap")
int xdp_devmap_prog(struct xdp_md *ctx)
{
	void *data_end = (void *)(long)ctx->data_end;