@@ -494,9 +494,11 @@ static struct sk_buff *mlx_tls_rx_handler(struct sk_buff *skb, u8 *rawpet,
static void mlx_tls_free(struct mlx_tls_dev *dev)
{
list_del(&dev->accel_dev_list);
+#if IS_ENABLED(CONFIG_MLX5_CORE_FPGA_QP_SIM)
#ifdef MLX_TLS_SADB_RDMA
kobject_put(&dev->kobj);
#endif
+#endif
dev_put(dev->netdev);
kfree(dev);
}
@@ -592,6 +594,7 @@ int mlx_tls_add_one(struct mlx_accel_core_device *accel_device)
goto err_netdev;
}
+#if IS_ENABLED(CONFIG_MLX5_CORE_FPGA_QP_SIM)
#ifdef MLX_TLS_SADB_RDMA
ret = tls_sysfs_init_and_add(&dev->kobj,
mlx_accel_core_kobj(dev->accel_device),
@@ -603,6 +606,7 @@ int mlx_tls_add_one(struct mlx_accel_core_device *accel_device)
goto err_ops_register;
}
#endif
+#endif
mutex_lock(&mlx_tls_mutex);
list_add(&dev->accel_dev_list, &mlx_tls_devs);
@@ -611,10 +615,12 @@ int mlx_tls_add_one(struct mlx_accel_core_device *accel_device)
dev->netdev->tlsdev_ops = &mlx_tls_ops;
goto out;
+#if IS_ENABLED(CONFIG_MLX5_CORE_FPGA_QP_SIM)
#ifdef MLX_TLS_SADB_RDMA
err_ops_register:
mlx_accel_core_client_ops_unregister(accel_device);
#endif
+#endif
err_netdev:
dev_put(netdev);
err_conn:
@@ -36,6 +36,7 @@
#include "tls_sysfs.h"
#include "tls_cmds.h"
+#if IS_ENABLED(CONFIG_MLX5_CORE_FPGA_QP_SIM)
#ifdef MLX_TLS_SADB_RDMA
struct mlx_tls_attribute {
struct attribute attr;
@@ -192,3 +193,4 @@ int tls_sysfs_init_and_add(struct kobject *kobj, struct kobject *parent,
fmt, arg);
}
#endif
+#endif
@@ -37,9 +37,11 @@
#include "tls.h"
+#if IS_ENABLED(CONFIG_MLX5_CORE_FPGA_QP_SIM)
#ifdef MLX_TLS_SADB_RDMA
int tls_sysfs_init_and_add(struct kobject *kobj, struct kobject *parent,
const char *fmt, char *arg);
#endif
+#endif
#endif /* __TLS_SYSFS_H__ */