mirror of
https://github.com/Dasharo/linux.git
synced 2026-03-06 15:25:10 -08:00
xfrm: allow state packet offload mode
Allow users to configure xfrm states with packet offload mode. The packet mode must be requested both for policy and state, and such requires us to do not implement fallback. We explicitly return an error if requested packet mode can't be configured. Reviewed-by: Raed Salem <raeds@nvidia.com> Signed-off-by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
This commit is contained in:
committed by
Steffen Klassert
parent
d14f28b8c1
commit
62f6eca5de
@@ -149,6 +149,11 @@ static int nsim_ipsec_add_sa(struct xfrm_state *xs)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (xs->xso.type != XFRM_DEV_OFFLOAD_CRYPTO) {
|
||||
netdev_err(dev, "Unsupported ipsec offload type\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* find the first unused index */
|
||||
ret = nsim_ipsec_find_empty_idx(ipsec);
|
||||
if (ret < 0) {
|
||||
|
||||
Reference in New Issue
Block a user