diff options
author | Jesper Dangaard Brouer <brouer@redhat.com> | 2017-01-18 11:19:00 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-01-20 12:04:07 -0500 |
commit | cdb749cef16bceb74950fc8668f2632ff7cac9aa (patch) | |
tree | f648b48e85aa6cb2a3fdf32ab485dbd7800c63d9 | |
parent | df384d435a5c034c735df3d9ea87a03172c59b56 (diff) |
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
96a8eb1eeed2 ("bpf: fix samples to add fake KBUILD_MODNAME").
Fixes: 12d8bb64e3f6 ("bpf: xdp: Add XDP example for head adjustment")
Fixes: 90e02896f1a4 ("bpf: Add test for bpf_redirect to ipip/ip6tnl")
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | samples/bpf/tc_l2_redirect_kern.c | 1 | ||||
-rw-r--r-- | samples/bpf/xdp_tx_iptunnel_kern.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/samples/bpf/tc_l2_redirect_kern.c b/samples/bpf/tc_l2_redirect_kern.c index 92a44729dbe4..7ef2a12b25b2 100644 --- a/samples/bpf/tc_l2_redirect_kern.c +++ b/samples/bpf/tc_l2_redirect_kern.c | |||
@@ -4,6 +4,7 @@ | |||
4 | * modify it under the terms of version 2 of the GNU General Public | 4 | * modify it under the terms of version 2 of the GNU General Public |
5 | * License as published by the Free Software Foundation. | 5 | * License as published by the Free Software Foundation. |
6 | */ | 6 | */ |
7 | #define KBUILD_MODNAME "foo" | ||
7 | #include <uapi/linux/bpf.h> | 8 | #include <uapi/linux/bpf.h> |
8 | #include <uapi/linux/if_ether.h> | 9 | #include <uapi/linux/if_ether.h> |
9 | #include <uapi/linux/if_packet.h> | 10 | #include <uapi/linux/if_packet.h> |
diff --git a/samples/bpf/xdp_tx_iptunnel_kern.c b/samples/bpf/xdp_tx_iptunnel_kern.c index 85c38ecd3a2d..0f4f6e8c8611 100644 --- a/samples/bpf/xdp_tx_iptunnel_kern.c +++ b/samples/bpf/xdp_tx_iptunnel_kern.c | |||
@@ -8,6 +8,7 @@ | |||
8 | * encapsulating the incoming packet in an IPv4/v6 header | 8 | * encapsulating the incoming packet in an IPv4/v6 header |
9 | * and then XDP_TX it out. | 9 | * and then XDP_TX it out. |
10 | */ | 10 | */ |
11 | #define KBUILD_MODNAME "foo" | ||
11 | #include <uapi/linux/bpf.h> | 12 | #include <uapi/linux/bpf.h> |
12 | #include <linux/in.h> | 13 | #include <linux/in.h> |
13 | #include <linux/if_ether.h> | 14 | #include <linux/if_ether.h> |