Skip to content

Commit

Permalink
selftests/net: fixes psock_fanout eBPF test case
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Prashant Bhole authored and David S. Miller committed Feb 15, 2018
1 parent 68e813a commit ddd0010
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/testing/selftests/net/psock_fanout.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ static void sock_fanout_getopts(int fd, uint16_t *typeflags, uint16_t *group_id)

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 },
Expand All @@ -140,7 +142,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;

Expand Down

0 comments on commit ddd0010

Please sign in to comment.