All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tariq Toukan <tariqt@mellanox.com>
To: Jesper Dangaard Brouer <brouer@redhat.com>, netdev@vger.kernel.org
Cc: John Fastabend <john.fastabend@gmail.com>,
	Eran Ben Elisha <eranbe@mellanox.com>
Subject: Re: [PATCH net-next 6/7] samples/bpf: xdp_redirect load XDP dummy prog on TX device
Date: Thu, 31 Aug 2017 13:08:22 +0300	[thread overview]
Message-ID: <be534824-72d9-5f58-70bd-45cca0877330@mellanox.com> (raw)
In-Reply-To: <150401748630.16384.478521489037692464.stgit@firesoul>

Hi Jesper,

On 29/08/2017 5:38 PM, Jesper Dangaard Brouer wrote:
>   
> +/* Redirect require an XDP bpf_prog loaded on the TX device */
> +SEC("xdp_redirect_dummy")
> +int xdp_redirect_dummy(struct xdp_md *ctx)
> +{
> +	return XDP_PASS;
> +}
> +

I get a compilation error related to this:

$ 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


It can be fixed by the following patch.
I can submit it in a separate mail if you want to.


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;
  }


Regards,
Tariq

  reply	other threads:[~2017-08-31 10:08 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-29 14:37 [PATCH net-next 0/7] XDP redirect tracepoints Jesper Dangaard Brouer
2017-08-29 14:37 ` [PATCH net-next 1/7] xdp: remove redundant argument to trace_xdp_redirect Jesper Dangaard Brouer
2017-08-29 14:37 ` [PATCH net-next 2/7] xdp: tracepoint xdp_redirect also need a map argument Jesper Dangaard Brouer
2017-08-29 14:37 ` [PATCH net-next 3/7] xdp: make xdp tracepoints report bpf prog id instead of prog_tag Jesper Dangaard Brouer
2017-08-29 14:37 ` [PATCH net-next 4/7] xdp: separate xdp_redirect tracepoint in error case Jesper Dangaard Brouer
2017-08-29 17:02   ` Alexei Starovoitov
2017-08-29 14:38 ` [PATCH net-next 5/7] xdp: separate xdp_redirect tracepoint in map case Jesper Dangaard Brouer
2017-08-29 14:38 ` [PATCH net-next 6/7] samples/bpf: xdp_redirect load XDP dummy prog on TX device Jesper Dangaard Brouer
2017-08-31 10:08   ` Tariq Toukan [this message]
2017-08-31 10:15     ` Jesper Dangaard Brouer
2017-08-29 14:38 ` [PATCH net-next 7/7] samples/bpf: xdp_monitor tool based on tracepoints Jesper Dangaard Brouer
2017-08-29 17:05   ` Alexei Starovoitov
2017-08-29 17:24     ` Daniel Borkmann
2017-08-29 17:51 ` [PATCH net-next 0/7] XDP redirect tracepoints David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=be534824-72d9-5f58-70bd-45cca0877330@mellanox.com \
    --to=tariqt@mellanox.com \
    --cc=brouer@redhat.com \
    --cc=eranbe@mellanox.com \
    --cc=john.fastabend@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.