[RFC] bpf: change bpf syacall to use u64 temp variables

2015-10-19 Thread yalin wang
This patch change map_lookup_elem() and map_update_elem() function to use u64 temp variable if the key_size or value_size is less than u64, we don't need use kmalloc() for these small variables. Signed-off-by: yalin wang --- kernel/bpf/syscall.c | 30

Re: [RFC] bpf: change bpf syacall to use u64 temp variables

2015-10-19 Thread Daniel Borkmann
On 10/19/2015 09:10 AM, yalin wang wrote: This patch change map_lookup_elem() and map_update_elem() function to use u64 temp variable if the key_size or value_size is less than u64, we don't need use kmalloc() for these small variables. Signed-off-by: yalin wang

Re: [RFC] bpf: change bpf syacall to use u64 temp variables

2015-10-19 Thread Alexei Starovoitov
On Mon, Oct 19, 2015 at 03:10:46PM +0800, yalin wang wrote: > This patch change map_lookup_elem() and map_update_elem() function > to use u64 temp variable if the key_size or value_size is less than > u64, we don't need use kmalloc() for these small variables. > > Signed-off-by: yalin wang