Commit cdb749ce authored by Jesper Dangaard Brouer's avatar Jesper Dangaard Brouer Committed by David S. Miller

bpf: fix samples xdp_tx_iptunnel and tc_l2_redirect with fake KBUILD_MODNAME

Fix build errors for samples/bpf xdp_tx_iptunnel and tc_l2_redirect,
when dynamic debugging is enabled (CONFIG_DYNAMIC_DEBUG) by defining a
fake KBUILD_MODNAME.

Just like Daniel Borkmann fixed other samples/bpf in commit
96a8eb1e ("bpf: fix samples to add fake KBUILD_MODNAME").

Fixes: 12d8bb64 ("bpf: xdp: Add XDP example for head adjustment")
Fixes: 90e02896 ("bpf: Add test for bpf_redirect to ipip/ip6tnl")
Signed-off-by: default avatarJesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent df384d43
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
* modify it under the terms of version 2 of the GNU General Public * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation. * License as published by the Free Software Foundation.
*/ */
#define KBUILD_MODNAME "foo"
#include <uapi/linux/bpf.h> #include <uapi/linux/bpf.h>
#include <uapi/linux/if_ether.h> #include <uapi/linux/if_ether.h>
#include <uapi/linux/if_packet.h> #include <uapi/linux/if_packet.h>
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
* encapsulating the incoming packet in an IPv4/v6 header * encapsulating the incoming packet in an IPv4/v6 header
* and then XDP_TX it out. * and then XDP_TX it out.
*/ */
#define KBUILD_MODNAME "foo"
#include <uapi/linux/bpf.h> #include <uapi/linux/bpf.h>
#include <linux/in.h> #include <linux/in.h>
#include <linux/if_ether.h> #include <linux/if_ether.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment