Repository navigation
Conversation
The _mlx5e_probe hunk added in ca769e4 declares 6 lines of old context but only carries 5, so patch(1) rejects the whole file as malformed and the mlx5 driver cannot be built at all. Add the missing trailing context line. Tested with MLNX_EN 24.10-4.1.4.0 on Ubuntu 24.04, 6.8.0-149-generic.
With --driver-suffix the mlx5 module is renamed to mlx5_core<suffix>, but two things were not adjusted: - The CONFIG_MLX5_TC_CT object line was kept as context instead of being renamed to mlx5_core$(NETMAP_DRIVER_SUFFIX)-..., so with TC_CT enabled the connection tracking objects are not linked and modpost fails with undefined mlx5_tc_ct_* symbols. - mlx5_core registers its auxiliary devices with the module name (KBUILD_MODNAME), while its auxiliary drivers match the hardcoded MLX5_ADEV_NAME "mlx5_core". The devices become mlx5_core<suffix>.eth.N and nothing binds them: no netdev is created and mlx5_init() warns that "mlx5_core name not in sync with kernel module name". Define MLX5_ADEV_NAME from the Makefile so that it follows the suffix for every object of the core directory (mlx5_dpll and the SF drivers included). Without a suffix the build is unchanged. Tested with MLNX_EN 24.10-4.1.4.0 and --driver-suffix=_gbtcp on Ubuntu 24.04, 6.8.0-149-generic: the ports come up and work in native netmap mode.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
mellanox--mlx5--24.10patch currently cannot be applied, and with--driver-suffixthe resulting driver neither links nor creates any netdev.This PR fixes both. Only
LINUX/final-patches/mellanox--mlx5--24.10changes.1. Malformed hunk (affects every MLNX_EN 24.10 build)
The
_mlx5e_probehunk added in ca769e4 declares 6 lines of old contextbut carries only 5, so
patchrejects the whole file:Fixed by adding the missing trailing context line.
2.
--driver-suffixsupportWith a suffix the module becomes
mlx5_core<suffix>, but two things didnot follow the rename:
CONFIG_MLX5_TC_CTobjects not renamed. Their Makefile line was keptas context instead of being changed to
mlx5_core$(NETMAP_DRIVER_SUFFIX)-...,so with TC_CT enabled modpost fails:
after
KBUILD_MODNAME(mlx5_core<suffix>.eth.N), while its auxiliarydrivers match the hardcoded
MLX5_ADEV_NAME"mlx5_core". No netdev iscreated, and
mlx5_init()warnsmlx5_core name not in sync with kernel module name.The Makefile now defines
MLX5_ADEV_NAMEas"mlx5_core$(NETMAP_DRIVER_SUFFIX)"for every object in the coredirectory (mlx5_dpll and the SF drivers included), and
driver.hkeeps"mlx5_core"only as an#ifndefdefault.Builds without a suffix are unchanged: the macro evaluates to
"mlx5_core".Testing
BlueField-2 (ConnectX-6 Dx)
./configure --drivers=mlx5 --driver-suffix=_gbtcp --select-version=mlx5:24.10-4.1.4.0builds.
mlx5_core_gbtcpbinds both ports, and netmap opens them innative mode (
admode=1;mlx5e_netmap_configure_rx_ringin dmesg).Related
Building MLNX_EN 24.10 on this kernel also needs a separate, independent
fix for
UDP_TUNNEL_NIC_INFO_MAY_SLEEP.