]> git.baikalelectronics.ru Git - kernel.git/commit
bpf, samples: don't zero data when not needed
authorDaniel Borkmann <daniel@iogearbox.net>
Tue, 12 Apr 2016 22:10:53 +0000 (00:10 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 15 Apr 2016 01:40:42 +0000 (21:40 -0400)
commitb77452e1c73681eeb89546fea897ab80f571774d
tree8d656100a8e523f2f9a5256884f6c868c0ae94df
parent477c7e5faa017eb6e568de9048f3e74132d72a18
bpf, samples: don't zero data when not needed

Remove the zero initialization in the sample programs where appropriate.
Note that this is an optimization which is now possible, old programs
still doing the zero initialization are just fine as well. Also, make
sure we don't have padding issues when we don't memset() the entire
struct anymore.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
samples/bpf/offwaketime_kern.c
samples/bpf/tracex1_kern.c
samples/bpf/tracex2_kern.c
samples/bpf/tracex5_kern.c