Skip to content

Commit

Permalink
net/mlx5: Added required metadata capability for ipsec
Browse files Browse the repository at this point in the history
Currently our device requires additional metadata in packet
to perform ipsec crypto offload.

Signed-off-by: Aviad Yehezkel <aviadye@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
  • Loading branch information
Aviad Yehezkel authored and Saeed Mahameed committed Mar 7, 2018
1 parent 1d2005e commit af9fe19
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/net/ethernet/mellanox/mlx5/core/fpga/ipsec.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,10 +256,12 @@ u32 mlx5_fpga_ipsec_device_caps(struct mlx5_core_dev *mdev)
struct mlx5_fpga_device *fdev = mdev->fpga;
u32 ret = 0;

if (mlx5_fpga_is_ipsec_device(mdev))
if (mlx5_fpga_is_ipsec_device(mdev)) {
ret |= MLX5_ACCEL_IPSEC_CAP_DEVICE;
else
ret |= MLX5_ACCEL_IPSEC_CAP_REQUIRED_METADATA;
} else {
return ret;
}

if (!fdev->ipsec)
return ret;
Expand Down
1 change: 1 addition & 0 deletions include/linux/mlx5/accel.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@

enum mlx5_accel_ipsec_caps {
MLX5_ACCEL_IPSEC_CAP_DEVICE = 1 << 0,
MLX5_ACCEL_IPSEC_CAP_REQUIRED_METADATA = 1 << 1,
MLX5_ACCEL_IPSEC_CAP_ESP = 1 << 2,
MLX5_ACCEL_IPSEC_CAP_IPV6 = 1 << 3,
MLX5_ACCEL_IPSEC_CAP_LSO = 1 << 4,
Expand Down

0 comments on commit af9fe19

Please sign in to comment.