netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] samples/bpf: Fix compilation issue in redirect dummy program
@ 2017-08-31 11:16 Tariq Toukan
  2017-08-31 11:27 ` Jesper Dangaard Brouer
  2017-08-31 18:58 ` David Miller
  0 siblings, 2 replies; 7+ messages in thread
From: Tariq Toukan @ 2017-08-31 11:16 UTC (permalink / raw)
  To: David S. Miller
  Cc: netdev, Eran Ben Elisha, Jesper Dangaard Brouer, Tariq Toukan

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>
---
 samples/bpf/xdp_redirect_kern.c     | 2 +-
 samples/bpf/xdp_redirect_map_kern.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/samples/bpf/xdp_redirect_kern.c b/samples/bpf/xdp_redirect_kern.c
index 1c90288d0203..8abb151e385f 100644
--- a/samples/bpf/xdp_redirect_kern.c
+++ b/samples/bpf/xdp_redirect_kern.c
@@ -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;
 }
diff --git a/samples/bpf/xdp_redirect_map_kern.c b/samples/bpf/xdp_redirect_map_kern.c
index 79795d41ad0d..740a529ba84f 100644
--- a/samples/bpf/xdp_redirect_map_kern.c
+++ b/samples/bpf/xdp_redirect_map_kern.c
@@ -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;
 }
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-08-31 18:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-31 11:16 [PATCH net-next] samples/bpf: Fix compilation issue in redirect dummy program Tariq Toukan
2017-08-31 11:27 ` Jesper Dangaard Brouer
2017-08-31 11:43   ` Daniel Borkmann
2017-08-31 12:29     ` Tariq Toukan
2017-08-31 15:54     ` Y Song
2017-08-31 16:20       ` Daniel Borkmann
2017-08-31 18:58 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).