From: Leon Romanovsky <leon@kernel.org>
To: Jason Gunthorpe <jgg@nvidia.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Saeed Mahameed <saeedm@nvidia.com>
Cc: Leon Romanovsky <leonro@nvidia.com>,
linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org,
netdev@vger.kernel.org, Raed Salem <raeds@nvidia.com>
Subject: [PATCH mlx5-next 13/17] net/mlx5: Remove not-needed IPsec config
Date: Wed, 6 Apr 2022 11:25:48 +0300 [thread overview]
Message-ID: <fd14492cbc01a0d51a5bfedde02bcd2154123fde.1649232994.git.leonro@nvidia.com> (raw)
In-Reply-To: <cover.1649232994.git.leonro@nvidia.com>
From: Leon Romanovsky <leonro@nvidia.com>
In current code, the CONFIG_MLX5_IPSEC and CONFIG_MLX5_EN_IPSEC are
the same. So remove useless indirection.
Reviewed-by: Raed Salem <raeds@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
---
.../net/ethernet/mellanox/mlx5/core/Kconfig | 16 +---------------
.../net/ethernet/mellanox/mlx5/core/Makefile | 4 ++--
.../mellanox/mlx5/core/accel/ipsec_offload.h | 18 ++----------------
include/linux/mlx5/accel.h | 4 ++--
include/linux/mlx5/driver.h | 2 +-
5 files changed, 8 insertions(+), 36 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/Kconfig b/drivers/net/ethernet/mellanox/mlx5/core/Kconfig
index e34e64a9ff4a..176883cf2827 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/Kconfig
+++ b/drivers/net/ethernet/mellanox/mlx5/core/Kconfig
@@ -142,28 +142,14 @@ config MLX5_CORE_IPOIB
help
MLX5 IPoIB offloads & acceleration support.
-config MLX5_IPSEC
+config MLX5_EN_IPSEC
bool "Mellanox Technologies IPsec Connect-X support"
depends on MLX5_CORE_EN
depends on XFRM_OFFLOAD
depends on INET_ESP_OFFLOAD || INET6_ESP_OFFLOAD
select MLX5_ACCEL
- help
- Build IPsec support for the Connect-X family of network cards by Mellanox
- Technologies.
- Note: If you select this option, the mlx5_core driver will include
- IPsec support for the Connect-X family.
-
-config MLX5_EN_IPSEC
- bool "IPSec XFRM cryptography-offload acceleration"
- depends on MLX5_CORE_EN
- depends on XFRM_OFFLOAD
- depends on INET_ESP_OFFLOAD || INET6_ESP_OFFLOAD
- depends on MLX5_IPSEC
help
Build support for IPsec cryptography-offload acceleration in the NIC.
- Note: Support for hardware with this capability needs to be selected
- for this option to become available.
config MLX5_EN_TLS
bool "Mellanox Technologies TLS Connect-X support"
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/Makefile b/drivers/net/ethernet/mellanox/mlx5/core/Makefile
index ad852703a3cb..9e715a1056f8 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/Makefile
+++ b/drivers/net/ethernet/mellanox/mlx5/core/Makefile
@@ -88,13 +88,13 @@ mlx5_core-$(CONFIG_MLX5_CORE_IPOIB) += ipoib/ipoib.o ipoib/ethtool.o ipoib/ipoib
#
# Accelerations & FPGA
#
-mlx5_core-$(CONFIG_MLX5_IPSEC) += accel/ipsec_offload.o
mlx5_core-$(CONFIG_MLX5_ACCEL) += lib/crypto.o
mlx5_core-$(CONFIG_MLX5_FPGA) += fpga/cmd.o fpga/core.o fpga/conn.o fpga/sdk.o
mlx5_core-$(CONFIG_MLX5_EN_IPSEC) += en_accel/ipsec.o en_accel/ipsec_rxtx.o \
- en_accel/ipsec_stats.o en_accel/ipsec_fs.o
+ en_accel/ipsec_stats.o en_accel/ipsec_fs.o \
+ accel/ipsec_offload.o
mlx5_core-$(CONFIG_MLX5_EN_TLS) += en_accel/ktls_stats.o \
en_accel/fs_tcp.o en_accel/ktls.o en_accel/ktls_txrx.o \
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/accel/ipsec_offload.h b/drivers/net/ethernet/mellanox/mlx5/core/accel/ipsec_offload.h
index 3d13e2c136b1..36e700b596d8 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/accel/ipsec_offload.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/accel/ipsec_offload.h
@@ -7,7 +7,7 @@
#include <linux/mlx5/driver.h>
#include <linux/mlx5/accel.h>
-#ifdef CONFIG_MLX5_IPSEC
+#ifdef CONFIG_MLX5_EN_IPSEC
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,
@@ -42,22 +42,8 @@ struct mlx5_accel_ipsec_ops {
};
#else
-
-static inline void *
-mlx5_accel_esp_create_hw_context(struct mlx5_core_dev *mdev,
- struct mlx5_accel_esp_xfrm *xfrm,
- u32 *sa_handle)
-{
- return NULL;
-}
-
-static inline void mlx5_accel_esp_free_hw_context(struct mlx5_core_dev *mdev,
- void *context)
-{
-}
-
static inline void mlx5_accel_ipsec_init(struct mlx5_core_dev *mdev) {}
static inline void mlx5_accel_ipsec_cleanup(struct mlx5_core_dev *mdev) {}
-#endif /* CONFIG_MLX5_IPSEC */
+#endif /* CONFIG_MLX5_EN_IPSEC */
#endif /* __MLX5_IPSEC_OFFLOAD_H__ */
diff --git a/include/linux/mlx5/accel.h b/include/linux/mlx5/accel.h
index 9145e2d37c0e..73e4d50a9f02 100644
--- a/include/linux/mlx5/accel.h
+++ b/include/linux/mlx5/accel.h
@@ -122,7 +122,7 @@ enum mlx5_accel_ipsec_cap {
MLX5_ACCEL_IPSEC_CAP_TX_IV_IS_ESN = 1 << 7,
};
-#ifdef CONFIG_MLX5_ACCEL
+#ifdef CONFIG_MLX5_EN_IPSEC
u32 mlx5_ipsec_device_caps(struct mlx5_core_dev *mdev);
@@ -152,5 +152,5 @@ static inline int
mlx5_accel_esp_modify_xfrm(struct mlx5_accel_esp_xfrm *xfrm,
const struct mlx5_accel_esp_xfrm_attrs *attrs) { return -EOPNOTSUPP; }
-#endif /* CONFIG_MLX5_ACCEL */
+#endif /* CONFIG_MLX5_EN_IPSEC */
#endif /* __MLX5_ACCEL_H__ */
diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h
index 9424503eb8d3..5af53c035949 100644
--- a/include/linux/mlx5/driver.h
+++ b/include/linux/mlx5/driver.h
@@ -778,7 +778,7 @@ struct mlx5_core_dev {
#ifdef CONFIG_MLX5_FPGA
struct mlx5_fpga_device *fpga;
#endif
-#ifdef CONFIG_MLX5_ACCEL
+#ifdef CONFIG_MLX5_EN_IPSEC
const struct mlx5_accel_ipsec_ops *ipsec_ops;
#endif
struct mlx5_clock clock;
--
2.35.1
next prev parent reply other threads:[~2022-04-06 11:37 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-06 8:25 [PATCH mlx5-next 00/17] Drop Mellanox FPGA IPsec support from the kernel Leon Romanovsky
2022-04-06 8:25 ` [PATCH mlx5-next 01/17] net/mlx5_fpga: Drop INNOVA IPsec support Leon Romanovsky
2022-04-06 8:25 ` [PATCH mlx5-next 02/17] net/mlx5: Delete metadata handling logic Leon Romanovsky
2022-04-06 8:25 ` [PATCH mlx5-next 03/17] net/mlx5: Remove not-used IDA field from IPsec struct Leon Romanovsky
2022-04-06 8:25 ` [PATCH mlx5-next 04/17] net/mlx5: Remove XFRM no_trailer flag Leon Romanovsky
2022-04-06 8:25 ` [PATCH mlx5-next 05/17] net/mlx5: Remove FPGA ipsec specific statistics Leon Romanovsky
2022-04-06 8:25 ` [PATCH mlx5-next 06/17] RDMA/mlx5: Delete never supported IPsec flow action Leon Romanovsky
2022-04-06 8:25 ` [PATCH mlx5-next 07/17] RDMA/mlx5: Drop crypto flow steering API Leon Romanovsky
2022-04-06 8:25 ` [PATCH mlx5-next 08/17] RDMA/core: Delete IPsec flow action logic from the core Leon Romanovsky
2022-04-07 16:03 ` Jason Gunthorpe
2022-04-06 8:25 ` [PATCH mlx5-next 09/17] net/mlx5: Remove ipsec vs. ipsec offload file separation Leon Romanovsky
2022-04-06 8:25 ` [PATCH mlx5-next 10/17] net/mlx5: Remove useless IPsec device checks Leon Romanovsky
2022-04-06 8:25 ` [PATCH mlx5-next 11/17] net/mlx5: Unify device IPsec capabilities check Leon Romanovsky
2022-04-06 8:25 ` [PATCH mlx5-next 12/17] net/mlx5: Align flow steering allocation namespace to common style Leon Romanovsky
2022-04-06 8:25 ` Leon Romanovsky [this message]
2022-04-06 8:25 ` [PATCH mlx5-next 14/17] net/mlx5: Move IPsec file to relevant directory Leon Romanovsky
2022-04-06 8:25 ` [PATCH mlx5-next 15/17] net/mlx5: Reduce kconfig complexity while building crypto support Leon Romanovsky
2022-04-06 8:25 ` [PATCH mlx5-next 16/17] net/mlx5: Remove ipsec_ops function table Leon Romanovsky
2022-04-06 8:25 ` [PATCH mlx5-next 17/17] net/mlx5: Remove not-implemented IPsec capabilities Leon Romanovsky
2022-04-09 5:37 ` [PATCH mlx5-next 00/17] Drop Mellanox FPGA IPsec support from the kernel Leon Romanovsky
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=fd14492cbc01a0d51a5bfedde02bcd2154123fde.1649232994.git.leonro@nvidia.com \
--to=leon@kernel.org \
--cc=jgg@nvidia.com \
--cc=kuba@kernel.org \
--cc=leonro@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=raeds@nvidia.com \
--cc=saeedm@nvidia.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
all inboxes | Powered by JetHome®