summaryrefslogtreecommitdiffstats
path: root/samples/bpf/sockex1_user.c
diff options
context:
space:
mode:
authorAlexei Starovoitov2015-03-13 19:57:43 +0100
committerDavid S. Miller2015-03-16 03:02:28 +0100
commit614cd3bd3758a806cea497d493b584e6157561f7 (patch)
tree3c294086671617614f672aeb0d14bd2496fdb23c /samples/bpf/sockex1_user.c
parentbpf: allow extended BPF programs access skb fields (diff)
downloadkernel-qcow2-linux-614cd3bd3758a806cea497d493b584e6157561f7.tar.gz
kernel-qcow2-linux-614cd3bd3758a806cea497d493b584e6157561f7.tar.xz
kernel-qcow2-linux-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);
}