public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] net/mlx5: Add MLX5_VXLAN config option
@ 2026-04-28 22:44 Marc Harvey
  2026-04-29  1:46 ` Jakub Kicinski
  0 siblings, 1 reply; 7+ messages in thread
From: Marc Harvey @ 2026-04-28 22:44 UTC (permalink / raw)
  To: Saeed Mahameed, Leon Romanovsky, Tariq Toukan, Mark Bloch,
	Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni
  Cc: netdev, linux-rdma, linux-kernel, Kuniyuki Iwashima, Marc Harvey

Currently, there is no way to disable mlx5 vxlan offloading if vxlan
is enabled. We've (possibly) seen some minor udp rr and udp stream
regressions when enabling vxlan, and want a way to disable this
offloading. Also coupling vxlan offloading with vxlan enablement
generally limits the flexability of vxlan setups.

Add a new config option for mlx5 vxlan offloading specifically, so
that users can use vxlan without automatically opting in to the
offloading.

To keep the same behavior as before, the new config option is enabled
by default if vxlan is enabled.

Signed-off-by: Marc Harvey <marcharvey@google.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/Kconfig     | 11 +++++++++++
 drivers/net/ethernet/mellanox/mlx5/core/Makefile    |  2 +-
 drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.h |  2 +-
 3 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/Kconfig b/drivers/net/ethernet/mellanox/mlx5/core/Kconfig
index 3c3e84100d5a..d2e091bdbafc 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/Kconfig
+++ b/drivers/net/ethernet/mellanox/mlx5/core/Kconfig
@@ -218,3 +218,14 @@ config MLX5_EN_PSP
 	  interfaces to PSP Stack which supports PSP crypto offload.
 
 	  If unsure, say Y.
+
+config MLX5_VXLAN
+	bool "Mellanox Technologies vxlan offloading"
+	depends on VXLAN
+	depends on MLX5_CORE_EN
+	default y
+	help
+	  mlx5 device offload support for vxlan. Makes the mlx5 driver always
+	  attempt to initialize device handling of vxlan packets.
+
+	  If unsure, say Y.
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/Makefile b/drivers/net/ethernet/mellanox/mlx5/core/Makefile
index d39fe9c4a87c..6f2cc5414d07 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/Makefile
+++ b/drivers/net/ethernet/mellanox/mlx5/core/Makefile
@@ -86,7 +86,7 @@ mlx5_core-$(CONFIG_MLX5_BRIDGE)    += esw/bridge.o esw/bridge_mcast.o esw/bridge
 
 mlx5_core-$(CONFIG_HWMON)          += hwmon.o
 mlx5_core-$(CONFIG_MLX5_MPFS)      += lib/mpfs.o
-ifneq ($(CONFIG_VXLAN),)
+ifneq ($(CONFIG_MLX5_VXLAN),)
 	mlx5_core-y		   += lib/vxlan.o
 endif
 mlx5_core-$(CONFIG_PTP_1588_CLOCK) += lib/clock.o
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.h b/drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.h
index 34ef662da35e..67d0c126c2ae 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.h
@@ -50,7 +50,7 @@ static inline bool mlx5_vxlan_allowed(struct mlx5_vxlan *vxlan)
 	return !IS_ERR_OR_NULL(vxlan);
 }
 
-#if IS_ENABLED(CONFIG_VXLAN)
+#if IS_ENABLED(CONFIG_MLX5_VXLAN)
 struct mlx5_vxlan *mlx5_vxlan_create(struct mlx5_core_dev *mdev);
 void mlx5_vxlan_destroy(struct mlx5_vxlan *vxlan);
 int mlx5_vxlan_add_port(struct mlx5_vxlan *vxlan, u16 port);

---
base-commit: 790ead9394860e7d70c5e0e50a35b243e909a618
change-id: 20260427-mlx5_vxlan-715699b8bbea

Best regards,
-- 
Marc Harvey <marcharvey@google.com>


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-05-05  6:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-28 22:44 [PATCH net-next] net/mlx5: Add MLX5_VXLAN config option Marc Harvey
2026-04-29  1:46 ` Jakub Kicinski
2026-04-30  0:46   ` Marc Harvey
2026-04-30  2:01     ` Jakub Kicinski
2026-05-04 22:44       ` Marc Harvey
2026-05-05  1:10         ` Jakub Kicinski
2026-05-05  6:21           ` Gal Pressman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox