mlx5-next updates 2026-03-19
Subsystems (5)
Tariq Toukan
maintainercover mlx5-next updates 2026-03-19
Hi,
This series contains mlx5 shared cleanups and updates.
Regards,
Tariq
Parav Pandit (1):
mlx5: Remove redundant iseg base
Patrisious Haddad (1):
net/mlx5: Add vhca_id_type bit to alias context
drivers/infiniband/hw/mlx5/main.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/main.c | 3 +-- drivers/net/ethernet/mellanox/mlx5/core/sf/dev/driver.c | 3 +-- include/linux/mlx5/driver.h | 1 - include/linux/mlx5/mlx5_ifc.h | 7 +++++-- 5 files changed, 8 insertions(+), 8 deletions(-)
base-commit: 4dd2115f43594da5271a1aa34fde6719b4259047
Signature · 1 line
2.44.0
Tariq Toukan
maintainerPATCH 1/2 mlx5: Remove redundant iseg base
From: Parav Pandit <[email protected]>
iseg_base and base_addr both point to BAR0, making iseg_base redundant. Remove iseg_base and rely on base_addr instead, reducing the size of struct mlx5_core_dev.
--- drivers/infiniband/hw/mlx5/main.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/main.c | 3 +-- drivers/net/ethernet/mellanox/mlx5/core/sf/dev/driver.c | 3 +-- include/linux/mlx5/driver.h | 1 - 4 files changed, 3 insertions(+), 6 deletions(-)
drivers/infiniband/hw/mlx5/main.c +1 -1
@@ -2740,7 +2740,7 @@ static int mlx5_ib_mmap(struct ib_ucontext *ibcontext, struct vm_area_struct *vmif (PAGE_SIZE >4096 )return -EOPNOTSUPP ; - pfn = (dev->mdev->iseg_base + + pfn = (dev->mdev->bar_addr + offsetof(struct mlx5_init_seg , internal_timer_h)) >>PAGE_SHIFT ; return rdma_user_mmap_io(&context->ibucontext, vma, pfn,
drivers/net/ethernet/mellanox/mlx5/core/main.c +1 -2
@@ -950,8 +950,7 @@ static int mlx5_pci_init(struct mlx5_core_dev *dev, struct pci_dev *pdev, pci_enable_atomic_ops_to_root(pdev, PCI_EXP_DEVCAP2_ATOMIC_COMP128))mlx5_core_dbg (dev,"Enabling pci atomics failed\n" ); - dev->iseg_base = dev->bar_addr; - dev->iseg =ioremap (dev->iseg_base,sizeof (*dev->iseg)); + dev->iseg =ioremap (dev->bar_addr,sizeof (*dev->iseg));if (!dev->iseg) { err = -ENOMEM ;mlx5_core_err (dev,"Failed mapping initialization segment, aborting\n" );
drivers/net/ethernet/mellanox/mlx5/core/sf/dev/driver.c +1 -2
@@ -37,7 +37,6 @@ static int mlx5_sf_dev_probe(struct auxiliary_device *adev, const struct auxilia mdev->device = &adev->dev; mdev->pdev = sf_dev->parent_mdev->pdev; mdev->bar_addr = sf_dev->bar_base_addr; - mdev->iseg_base = sf_dev->bar_base_addr; mdev->coredev_type =MLX5_COREDEV_SF ; mdev->priv.parent_mdev = sf_dev->parent_mdev; mdev->priv.adev_idx = adev->id;
@@ -53,7 +52,7 @@ static int mlx5_sf_dev_probe(struct auxiliary_device *adev, const struct auxilia goto mdev_err; } - mdev->iseg =ioremap (mdev->iseg_base,sizeof (*mdev->iseg)); + mdev->iseg =ioremap (mdev->bar_addr,sizeof (*mdev->iseg));if (!mdev->iseg) {mlx5_core_warn (mdev,"remap error\n" ); err = -ENOMEM ;
include/linux/mlx5/driver.h +0 -1
@@ -755,7 +755,6 @@ struct mlx5_core_dev { } caps;struct mlx5_timeouts *timeouts;u64 sys_image_guid; -phys_addr_t iseg_base;struct mlx5_init_seg __iomem *iseg;phys_addr_t bar_addr;enum mlx5_device_state state;
Signature · 1 line
2.44.0
Re: [PATCH mlx5-next 1/2] mlx5: Remove redundant iseg base
Quoted 9 lines · Tariq Toukan
From: Parav Pandit <[email protected]>
iseg_baseandbase_addrboth point to BAR0, makingiseg_baseredundant. Removeiseg_baseand rely onbase_addrinstead, reducing the size of structmlx5_core_dev.Signed-off-by Parav Pandit <[email protected]>Reviewed-by Shay Drori <[email protected]>Signed-off-by Tariq Toukan <[email protected]>
Quoted 6 lines
--- drivers/infiniband/hw/mlx5/main.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/main.c | 3 +-- drivers/net/ethernet/mellanox/mlx5/core/sf/dev/driver.c | 3 +-- include/linux/mlx5/driver.h | 1 - 4 files changed, 3 insertions(+), 6 deletions(-)
Tariq Toukan
maintainerPATCH 2/2 net/mlx5: Add vhca_id_type bit to alias context
In reply to Tariq ToukanFrom: Patrisious Haddad <[email protected]>
Add vhca_id_type bit to alias context which allows indicating the vhca_id_type to be passed at vhca_id_to_be_accessed, which can be either HW or SW, note that SW_VHCA_ID must be used to allow alias to work properly after migration.
--- include/linux/mlx5/mlx5_ifc.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
include/linux/mlx5/mlx5_ifc.h +5 -2
@@ -1968,7 +1968,8 @@ struct mlx5_ifc_cmd_hca_cap_bits {u8 reserved_at_360[0x3 ];u8 log_max_rq[0x5 ]; -u8 reserved_at_368[0x3 ]; +u8 ft_alias_sw_vhca_id[0x1 ]; +u8 reserved_at_369[0x2 ];u8 log_max_sq[0x5 ];u8 reserved_at_370[0x3 ];u8 log_max_tir[0x5 ];
@@ -6957,7 +6958,9 @@ struct mlx5_ifc_create_match_definer_out_bits {struct mlx5_ifc_alias_context_bits {u8 vhca_id_to_be_accessed[0x10 ]; -u8 reserved_at_10[0xd ]; +u8 reserved_at_10[0xb ]; +u8 vhca_id_type[0x1 ]; +u8 reserved_at_1c[0x1 ];u8 status[0x3 ];u8 object_id_to_be_accessed[0x20 ];u8 reserved_at_40[0x40 ];
Signature · 1 line
2.44.0
Re: [PATCH mlx5-next 2/2] net/mlx5: Add vhca_id_type bit to alias context
Quoted 7 lines · Tariq Toukan
From: Patrisious Haddad <[email protected]>
Add
vhca_id_typebit to alias context which allows indicating thevhca_id_typeto be passed atvhca_id_to_be_accessed, which can be either HW or SW, note thatSW_VHCA_IDmust be used to allow alias to work properly after migration.
Quoted 6 lines
Signed-off-by Patrisious Haddad <[email protected]>Reviewed-by Leon Romanovsky <[email protected]>Signed-off-by Tariq Toukan <[email protected]>--- include/linux/mlx5/mlx5_ifc.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
Leon Romanovsky
AppliedQuoted 9 lines · Tariq Toukan
This series contains mlx5 shared cleanups and updates.
Regards,
TariqParav Pandit (1):
mlx5: Remove redundant iseg base[...]
Applied, thanks!
[1/2] mlx5: Remove redundant iseg base
https://git.kernel.org/rdma/rdma/c/c0368933dd3d4a [2/2] net/mlx5: Add vhca_id_type bit to alias context https://git.kernel.org/rdma/rdma/c/26469110c750c8
Best regards,
Signature · 1 line
Leon Romanovsky <[email protected]>