diff options
author | Aviad Yehezkel <aviadye@mellanox.com> | 2018-01-29 16:05:50 +0300 |
---|---|---|
committer | Saeed Mahameed <saeedm@mellanox.com> | 2018-03-08 02:54:30 +0300 |
commit | 1d2005e2040b95af4c861e40cf806ff44cd7c883 (patch) | |
tree | 10d7c1c9935493caab818e17adcd82b7e4d26c09 /drivers/net/ethernet/mellanox/mlx5/core/accel | |
parent | 65802f480008066636a43173b12388bb3fb7bd3a (diff) | |
download | linux-1d2005e2040b95af4c861e40cf806ff44cd7c883.tar.xz |
net/mlx5: Export ipsec capabilities
We will need that for ipsec verbs.
Signed-off-by: Aviad Yehezkel <aviadye@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/accel')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/accel/ipsec.c | 3 | ||||
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/accel/ipsec.h | 14 |
2 files changed, 4 insertions, 13 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/accel/ipsec.c b/drivers/net/ethernet/mellanox/mlx5/core/accel/ipsec.c index b88ae12d9066..375ba438e7cf 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/accel/ipsec.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/accel/ipsec.c @@ -45,7 +45,7 @@ void *mlx5_accel_ipsec_sa_cmd_exec(struct mlx5_core_dev *mdev, if (!MLX5_IPSEC_DEV(mdev)) return ERR_PTR(-EOPNOTSUPP); - if (mlx5_accel_ipsec_device_caps(mdev) & MLX5_ACCEL_IPSEC_V2_CMD) + if (mlx5_accel_ipsec_device_caps(mdev) & MLX5_ACCEL_IPSEC_CAP_V2_CMD) cmd_size = sizeof(*cmd); else cmd_size = sizeof(cmd->ipsec_sa_v1); @@ -62,6 +62,7 @@ u32 mlx5_accel_ipsec_device_caps(struct mlx5_core_dev *mdev) { return mlx5_fpga_ipsec_device_caps(mdev); } +EXPORT_SYMBOL_GPL(mlx5_accel_ipsec_device_caps); unsigned int mlx5_accel_ipsec_counters_count(struct mlx5_core_dev *mdev) { diff --git a/drivers/net/ethernet/mellanox/mlx5/core/accel/ipsec.h b/drivers/net/ethernet/mellanox/mlx5/core/accel/ipsec.h index 14a2e95e82c3..421ed71a029b 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/accel/ipsec.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/accel/ipsec.h @@ -35,18 +35,10 @@ #define __MLX5_ACCEL_IPSEC_H__ #include <linux/mlx5/driver.h> +#include <linux/mlx5/accel.h> #ifdef CONFIG_MLX5_ACCEL -enum { - MLX5_ACCEL_IPSEC_DEVICE = BIT(1), - MLX5_ACCEL_IPSEC_IPV6 = BIT(2), - MLX5_ACCEL_IPSEC_ESP = BIT(3), - MLX5_ACCEL_IPSEC_LSO = BIT(4), - MLX5_ACCEL_IPSEC_NO_TRAILER = BIT(5), - MLX5_ACCEL_IPSEC_V2_CMD = BIT(7), -}; - #define MLX5_IPSEC_SADB_IP_AH BIT(7) #define MLX5_IPSEC_SADB_IP_ESP BIT(6) #define MLX5_IPSEC_SADB_SA_VALID BIT(5) @@ -70,7 +62,7 @@ enum mlx5_accel_ipsec_enc_mode { }; #define MLX5_IPSEC_DEV(mdev) (mlx5_accel_ipsec_device_caps(mdev) & \ - MLX5_ACCEL_IPSEC_DEVICE) + MLX5_ACCEL_IPSEC_CAP_DEVICE) struct mlx5_accel_ipsec_sa_v1 { __be32 cmd; @@ -126,8 +118,6 @@ void *mlx5_accel_ipsec_sa_cmd_exec(struct mlx5_core_dev *mdev, */ int mlx5_accel_ipsec_sa_cmd_wait(void *context); -u32 mlx5_accel_ipsec_device_caps(struct mlx5_core_dev *mdev); - unsigned int mlx5_accel_ipsec_counters_count(struct mlx5_core_dev *mdev); int mlx5_accel_ipsec_counters_read(struct mlx5_core_dev *mdev, u64 *counters, unsigned int count); |