summaryrefslogtreecommitdiff
path: root/samples/bpf/sockex1_user.c
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@plumgrid.com>2015-03-13 11:57:43 -0700
committerDavid S. Miller <davem@davemloft.net>2015-03-15 22:02:28 -0400
commit614cd3bd3758a806cea497d493b584e6157561f7 (patch)
tree3c294086671617614f672aeb0d14bd2496fdb23c /samples/bpf/sockex1_user.c
parent9bac3d6d548e5cc925570b263f35b70a00a00ffd (diff)
downloadlwn-614cd3bd3758a806cea497d493b584e6157561f7.tar.gz
lwn-614cd3bd3758a806cea497d493b584e6157561f7.zip
samples: bpf: add skb->field examples and tests
- modify sockex1 example to count number of bytes in outgoing packets - modify sockex2 example to count number of bytes and packets per flow - add 4 stress tests that exercise 'skb->field' code path of verifier Signed-off-by: Alexei Starovoitov <ast@plumgrid.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'samples/bpf/sockex1_user.c')
-rw-r--r--samples/bpf/sockex1_user.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/samples/bpf/sockex1_user.c b/samples/bpf/sockex1_user.c
index 34a443ff3831..678ce4693551 100644
--- a/samples/bpf/sockex1_user.c
+++ b/samples/bpf/sockex1_user.c
@@ -40,7 +40,7 @@ int main(int ac, char **argv)
key = IPPROTO_ICMP;
assert(bpf_lookup_elem(map_fd[0], &key, &icmp_cnt) == 0);
- printf("TCP %lld UDP %lld ICMP %lld packets\n",
+ printf("TCP %lld UDP %lld ICMP %lld bytes\n",
tcp_cnt, udp_cnt, icmp_cnt);
sleep(1);
}