summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>2018-02-15 09:19:26 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-05-30 07:50:50 +0200
commit66380cb5b98fd7ec5a4e774f755156d8d88fc33b (patch)
treee99ae42abbaa6c0546930a2ffa4f0c4c5bf38599
parent5a8e209b2d9b72c197d079ccb3787d706763d756 (diff)
selftests/net: fixes psock_fanout eBPF test case
[ Upstream commit ddd0010392d9cbcb95b53d11b7cafc67b373ab56 ] eBPF test fails due to verifier failure because log_buf is too small. Fixed by increasing log_buf size Signed-off-by: Prashant Bhole <bhole_prashant_q7@lab.ntt.co.jp> Acked-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--tools/testing/selftests/net/psock_fanout.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/testing/selftests/net/psock_fanout.c b/tools/testing/selftests/net/psock_fanout.c
index 412459369686..9b654a070e7d 100644
--- a/tools/testing/selftests/net/psock_fanout.c
+++ b/tools/testing/selftests/net/psock_fanout.c
@@ -97,6 +97,8 @@ static int sock_fanout_open(uint16_t typeflags, int num_packets)
static void sock_fanout_set_ebpf(int fd)
{
+ static char log_buf[65536];
+
const int len_off = __builtin_offsetof(struct __sk_buff, len);
struct bpf_insn prog[] = {
{ BPF_ALU64 | BPF_MOV | BPF_X, 6, 1, 0, 0 },
@@ -109,7 +111,6 @@ static void sock_fanout_set_ebpf(int fd)
{ BPF_ALU | BPF_MOV | BPF_K, 0, 0, 0, 0 },
{ BPF_JMP | BPF_EXIT, 0, 0, 0, 0 }
};
- char log_buf[512];
union bpf_attr attr;
int pfd;