net/mlx5: Accel, Expose accel wrapper for IPsec FPGA function

Do not directly call fpga version of IPsec function from main.c.
Wrap it by an accel version, and call the wrapper.

This will allow deprecating the FPGA IPsec stubs in downstream
patch.

Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Reviewed-by: Boris Pismenny <borisp@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Tariq Toukan 2019-07-05 18:30:11 +03:00 committed by David S. Miller
parent 61c2491db7
commit c778dd31ac
3 changed files with 11 additions and 1 deletions

View File

@ -74,6 +74,11 @@ int mlx5_accel_ipsec_init(struct mlx5_core_dev *mdev)
return mlx5_fpga_ipsec_init(mdev); return mlx5_fpga_ipsec_init(mdev);
} }
void mlx5_accel_ipsec_build_fs_cmds(void)
{
mlx5_fpga_ipsec_build_fs_cmds();
}
void mlx5_accel_ipsec_cleanup(struct mlx5_core_dev *mdev) void mlx5_accel_ipsec_cleanup(struct mlx5_core_dev *mdev)
{ {
mlx5_fpga_ipsec_cleanup(mdev); mlx5_fpga_ipsec_cleanup(mdev);

View File

@ -54,6 +54,7 @@ void *mlx5_accel_esp_create_hw_context(struct mlx5_core_dev *mdev,
void mlx5_accel_esp_free_hw_context(void *context); void mlx5_accel_esp_free_hw_context(void *context);
int mlx5_accel_ipsec_init(struct mlx5_core_dev *mdev); int mlx5_accel_ipsec_init(struct mlx5_core_dev *mdev);
void mlx5_accel_ipsec_build_fs_cmds(void);
void mlx5_accel_ipsec_cleanup(struct mlx5_core_dev *mdev); void mlx5_accel_ipsec_cleanup(struct mlx5_core_dev *mdev);
#else #else
@ -79,6 +80,10 @@ static inline int mlx5_accel_ipsec_init(struct mlx5_core_dev *mdev)
return 0; return 0;
} }
static inline void mlx5_accel_ipsec_build_fs_cmds(void)
{
}
static inline void mlx5_accel_ipsec_cleanup(struct mlx5_core_dev *mdev) static inline void mlx5_accel_ipsec_cleanup(struct mlx5_core_dev *mdev)
{ {
} }

View File

@ -1600,7 +1600,7 @@ static int __init init(void)
get_random_bytes(&sw_owner_id, sizeof(sw_owner_id)); get_random_bytes(&sw_owner_id, sizeof(sw_owner_id));
mlx5_core_verify_params(); mlx5_core_verify_params();
mlx5_fpga_ipsec_build_fs_cmds(); mlx5_accel_ipsec_build_fs_cmds();
mlx5_register_debugfs(); mlx5_register_debugfs();
err = pci_register_driver(&mlx5_core_driver); err = pci_register_driver(&mlx5_core_driver);