]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
xfrm: optimize ipv4 selector matching
authorAlexey Dobriyan <adobriyan@gmail.com>
Tue, 22 Nov 2011 06:46:02 +0000 (06:46 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 22 Nov 2011 20:27:18 +0000 (15:27 -0500)
commit26bff940dd975499c6c47438d4395d7d215911e8
tree7b6774138e3033d7ab6df080419740083caee2ae
parent3ee32fee65ef6a4a8a4188e913be7dd90ba9e058
xfrm: optimize ipv4 selector matching

Current addr_match() is errh, under-optimized.

Compiler doesn't know that memcmp() branch doesn't trigger for IPv4.
Also, pass addresses by value -- they fit into register.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/xfrm.h
net/xfrm/xfrm_policy.c