From: Aviad Yehezkel <aviadye@mellanox.com>
To: davem@davemloft.net, aviadye@mellanox.com, ilyal@mellanox.com,
borisp@mellanox.com, davejwatson@fb.com, netdev@vger.kernel.org
Cc: matanb@mellanox.com, liranl@mellanox.com, haggaie@mellanox.com,
tom@herbertland.com, herbert@gondor.apana.org.au,
nmav@gnults.org, fridolin.pokorny@gmail.com, ilant@mellanox.com,
kliteyn@mellanox.com, linux-crypto@vger.kernel.org,
saeedm@mellanox.com, aviadye@dev.mellanox.co.il
Subject: [RFC TLS Offload Support 12/15] mlx/tls: Enable MLX5_CORE_QP_SIM mode for tls
Date: Tue, 28 Mar 2017 16:26:29 +0300 [thread overview]
Message-ID: <1490707592-1430-13-git-send-email-aviadye@mellanox.com> (raw)
In-Reply-To: <1490707592-1430-1-git-send-email-aviadye@mellanox.com>
Signed-off-by: Aviad Yehezkel <aviadye@mellanox.com>
Signed-off-by: Ilya Lesokhin <ilyal@mellanox.com>
---
drivers/net/ethernet/mellanox/accelerator/tls/tls.c | 6 ++++++
drivers/net/ethernet/mellanox/accelerator/tls/tls_sysfs.c | 2 ++
drivers/net/ethernet/mellanox/accelerator/tls/tls_sysfs.h | 2 ++
3 files changed, 10 insertions(+)
diff --git a/drivers/net/ethernet/mellanox/accelerator/tls/tls.c b/drivers/net/ethernet/mellanox/accelerator/tls/tls.c
index 07a4b67..3560f784 100644
--- a/drivers/net/ethernet/mellanox/accelerator/tls/tls.c
+++ b/drivers/net/ethernet/mellanox/accelerator/tls/tls.c
@@ -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:
diff --git a/drivers/net/ethernet/mellanox/accelerator/tls/tls_sysfs.c b/drivers/net/ethernet/mellanox/accelerator/tls/tls_sysfs.c
index 2860fc3..76ba784 100644
--- a/drivers/net/ethernet/mellanox/accelerator/tls/tls_sysfs.c
+++ b/drivers/net/ethernet/mellanox/accelerator/tls/tls_sysfs.c
@@ -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
diff --git a/drivers/net/ethernet/mellanox/accelerator/tls/tls_sysfs.h b/drivers/net/ethernet/mellanox/accelerator/tls/tls_sysfs.h
index bfaa857..d7c3185 100644
--- a/drivers/net/ethernet/mellanox/accelerator/tls/tls_sysfs.h
+++ b/drivers/net/ethernet/mellanox/accelerator/tls/tls_sysfs.h
@@ -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__ */
--
2.7.4
next prev parent reply other threads:[~2017-03-28 13:26 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-28 13:26 [RFC TLS Offload Support 00/15] cover letter Aviad Yehezkel
2017-03-28 13:26 ` [RFC TLS Offload Support 01/15] tcp: Add clean acked data hook Aviad Yehezkel
2017-03-28 13:26 ` [RFC TLS Offload Support 02/15] tcp: export do_tcp_sendpages function Aviad Yehezkel
2017-03-28 13:26 ` [RFC TLS Offload Support 03/15] tcp: export tcp_rate_check_app_limited function Aviad Yehezkel
2017-03-28 13:26 ` [RFC TLS Offload Support 04/15] net: Add TLS offload netdevice and socket support Aviad Yehezkel
2017-03-28 13:26 ` [RFC TLS Offload Support 05/15] tcp: Add TLS socket options for TCP sockets Aviad Yehezkel
2017-03-28 14:56 ` Tom Herbert
2017-03-28 13:26 ` [RFC TLS Offload Support 06/15] tls: tls offload support Aviad Yehezkel
2017-03-28 13:26 ` [RFC TLS Offload Support 07/15] mlx/mlx5_core: Allow sending multiple packets Aviad Yehezkel
2017-03-28 13:26 ` [RFC TLS Offload Support 08/15] mlx/tls: Hardware interface Aviad Yehezkel
2017-03-28 13:26 ` [RFC TLS Offload Support 09/15] mlx/tls: Sysfs configuration interface Configure the driver/hardware interface via sysfs Aviad Yehezkel
2017-03-28 13:26 ` [RFC TLS Offload Support 10/15] mlx/tls: Add mlx_accel offload driver for TLS Aviad Yehezkel
2017-03-28 13:26 ` [RFC TLS Offload Support 11/15] mlx/tls: TLS offload driver Add the main module entrypoints and tie the module into the build system Aviad Yehezkel
2017-03-28 13:26 ` Aviad Yehezkel [this message]
2017-03-28 13:26 ` [RFC TLS Offload Support 13/15] crypto: Add gcm template for rfc5288 Aviad Yehezkel
2017-03-28 13:26 ` [RFC TLS Offload Support 14/15] crypto: rfc5288 aesni optimized intel routines Aviad Yehezkel
2017-03-28 13:26 ` [RFC TLS Offload Support 15/15] net/tls: Add software offload Aviad Yehezkel
2017-03-29 17:41 ` [RFC TLS Offload Support 00/15] cover letter David Miller
2017-03-29 18:03 ` Hannes Frederic Sowa
2017-03-30 6:49 ` Boris Pismenny
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1490707592-1430-13-git-send-email-aviadye@mellanox.com \
--to=aviadye@mellanox.com \
--cc=aviadye@dev.mellanox.co.il \
--cc=borisp@mellanox.com \
--cc=davejwatson@fb.com \
--cc=davem@davemloft.net \
--cc=fridolin.pokorny@gmail.com \
--cc=haggaie@mellanox.com \
--cc=herbert@gondor.apana.org.au \
--cc=ilant@mellanox.com \
--cc=ilyal@mellanox.com \
--cc=kliteyn@mellanox.com \
--cc=linux-crypto@vger.kernel.org \
--cc=liranl@mellanox.com \
--cc=matanb@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=nmav@gnults.org \
--cc=saeedm@mellanox.com \
--cc=tom@herbertland.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox