Skip to content

Commit

Permalink
selftests/bpf: remove useless bpf_trace_printk
Browse files Browse the repository at this point in the history
sockmap test is using two programs that use bpf_trace_printk()
which prints into trace_pipe, but nothing is reading it.
Remove it.

Fixes: 6f6d33f ("bpf: selftests add sockmap tests")
Signed-off-by: Alexei Starovoitov <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
4ast authored and davem330 committed Nov 1, 2017
1 parent 54df7ef commit 81ba4e1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
3 changes: 0 additions & 3 deletions tools/testing/selftests/bpf/sockmap_parse_prog.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ int bpf_prog1(struct __sk_buff *skb)
* fields.
*/
d[7] = 1;

bpf_printk("parse: data[0] = (%u): local_port %i remote %i\n",
d[0], lport, bpf_ntohl(rport));
return skb->len;
}

Expand Down
2 changes: 0 additions & 2 deletions tools/testing/selftests/bpf/sockmap_verdict_prog.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ int bpf_prog2(struct __sk_buff *skb)
d[6] = 0xe;
d[7] = 0xf;

bpf_printk("verdict: data[0] = redir(%u:%u)\n", map, sk);

if (!map)
return bpf_sk_redirect_map(skb, &sock_map_rx, sk, 0);
return bpf_sk_redirect_map(skb, &sock_map_tx, sk, 0);
Expand Down

0 comments on commit 81ba4e1

Please sign in to comment.