samples/bpf: Fix compilation issue in redirect dummy program
authorTariq Toukan <tariqt@mellanox.com>
Thu, 31 Aug 2017 11:16:39 +0000 (14:16 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 31 Aug 2017 18:56:57 +0000 (11:56 -0700)
Fix compilation error below:

$ make samples/bpf/

LLVM ERROR: 'xdp_redirect_dummy' label emitted multiple times to
assembly file
make[1]: *** [samples/bpf/xdp_redirect_kern.o] Error 1
make: *** [samples/bpf/] Error 2

Fixes: 306da4e685b4 ("samples/bpf: xdp_redirect load XDP dummy prog on TX device")
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
samples/bpf/xdp_redirect_kern.c
samples/bpf/xdp_redirect_map_kern.c

index 1c90288d02035be648363363364d6f063ae555b8..8abb151e385f9cc8775cfdb929b2800c17d61c70 100644 (file)
@@ -82,7 +82,7 @@ int xdp_redirect_prog(struct xdp_md *ctx)
 
 /* Redirect require an XDP bpf_prog loaded on the TX device */
 SEC("xdp_redirect_dummy")
-int xdp_redirect_dummy(struct xdp_md *ctx)
+int xdp_redirect_dummy_prog(struct xdp_md *ctx)
 {
        return XDP_PASS;
 }
index 79795d41ad0d9f1ba1dae6c4939b694000ec7312..740a529ba84f238c91d5195614fe47f10a623bef 100644 (file)
@@ -84,7 +84,7 @@ int xdp_redirect_map_prog(struct xdp_md *ctx)
 
 /* Redirect require an XDP bpf_prog loaded on the TX device */
 SEC("xdp_redirect_dummy")
-int xdp_redirect_dummy(struct xdp_md *ctx)
+int xdp_redirect_dummy_prog(struct xdp_md *ctx)
 {
        return XDP_PASS;
 }