diff options
| author | Leon Romanovsky <[email protected]> | 2022-12-02 18:41:28 +0000 |
|---|---|---|
| committer | Steffen Klassert <[email protected]> | 2022-12-05 09:32:44 +0000 |
| commit | 62f6eca5de103c6823f6ca2abbf2ee242e132207 (patch) | |
| tree | 0f12f6e5c4e0a97d25e1f7b1c29171c22ac94763 /drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c | |
| parent | xfrm: add new packet offload flag (diff) | |
| download | kernel-62f6eca5de103c6823f6ca2abbf2ee242e132207.tar.gz kernel-62f6eca5de103c6823f6ca2abbf2ee242e132207.zip | |
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 <[email protected]>
Signed-off-by: Leon Romanovsky <[email protected]>
Signed-off-by: Steffen Klassert <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c')
| -rw-r--r-- | drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c index 774de63dd93a..53a969e34883 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c @@ -585,6 +585,11 @@ static int ixgbe_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; + } + if (xs->xso.dir == XFRM_DEV_OFFLOAD_IN) { struct rx_sa rsa; |
