Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Tariq Toukan and committed by
David S. Miller
c778dd31 61c2491d

+11 -1
+5
drivers/net/ethernet/mellanox/mlx5/core/accel/ipsec.c
··· 74 74 return mlx5_fpga_ipsec_init(mdev); 75 75 } 76 76 77 + void mlx5_accel_ipsec_build_fs_cmds(void) 78 + { 79 + mlx5_fpga_ipsec_build_fs_cmds(); 80 + } 81 + 77 82 void mlx5_accel_ipsec_cleanup(struct mlx5_core_dev *mdev) 78 83 { 79 84 mlx5_fpga_ipsec_cleanup(mdev);
+5
drivers/net/ethernet/mellanox/mlx5/core/accel/ipsec.h
··· 54 54 void mlx5_accel_esp_free_hw_context(void *context); 55 55 56 56 int mlx5_accel_ipsec_init(struct mlx5_core_dev *mdev); 57 + void mlx5_accel_ipsec_build_fs_cmds(void); 57 58 void mlx5_accel_ipsec_cleanup(struct mlx5_core_dev *mdev); 58 59 59 60 #else ··· 78 77 static inline int mlx5_accel_ipsec_init(struct mlx5_core_dev *mdev) 79 78 { 80 79 return 0; 80 + } 81 + 82 + static inline void mlx5_accel_ipsec_build_fs_cmds(void) 83 + { 81 84 } 82 85 83 86 static inline void mlx5_accel_ipsec_cleanup(struct mlx5_core_dev *mdev)
+1 -1
drivers/net/ethernet/mellanox/mlx5/core/main.c
··· 1600 1600 get_random_bytes(&sw_owner_id, sizeof(sw_owner_id)); 1601 1601 1602 1602 mlx5_core_verify_params(); 1603 - mlx5_fpga_ipsec_build_fs_cmds(); 1603 + mlx5_accel_ipsec_build_fs_cmds(); 1604 1604 mlx5_register_debugfs(); 1605 1605 1606 1606 err = pci_register_driver(&mlx5_core_driver);