summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorLeon Romanovsky <leonro@nvidia.com>2022-12-02 21:41:32 +0300
committerSteffen Klassert <steffen.klassert@secunet.com>2022-12-05 12:37:33 +0300
commit3c611d40c6923c81e6a83a67156cd30a9503c155 (patch)
tree535689219b595440932c512b1755aae2f8d3784a /security
parent5958372ddf628fe6f4c3e49425734ad32fcfb13c (diff)
downloadlinux-3c611d40c6923c81e6a83a67156cd30a9503c155.tar.xz
xfrm: speed-up lookup of HW policies
Devices that implement IPsec packet offload mode should offload SA and policies too. In RX path, it causes to the situation that HW will always have higher priority over any SW policies. It means that we don't need to perform any search of inexact policies and/or priority checks if HW policy was discovered. In such situation, the HW will catch the packets anyway and HW can still implement inexact lookups. In case specific policy is not found, we will continue with packet lookup and check for existence of HW policies in inexact list. HW policies are added to the head of SPD to ensure fast lookup, as XFRM iterates over all policies in the loop. The same solution of adding HW SAs at the begging of the list is applied to SA database too. However, we don't need to change lookups as they are sorted by insertion order and not priority. Signed-off-by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'security')
0 files changed, 0 insertions, 0 deletions