* [PATCH mlx5-next 0/2] mlx5-next updates 2026-03-19
@ 2026-03-19 12:22 Tariq Toukan
2026-03-19 12:22 ` [PATCH mlx5-next 1/2] mlx5: Remove redundant iseg base Tariq Toukan
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Tariq Toukan @ 2026-03-19 12:22 UTC (permalink / raw)
To: Leon Romanovsky, Jason Gunthorpe, Saeed Mahameed, Tariq Toukan
Cc: Eric Dumazet, Jakub Kicinski, Paolo Abeni, Andrew Lunn,
David S. Miller, Mark Bloch, Parav Pandit, Simon Horman,
Shay Drori, linux-rdma, linux-kernel, netdev, Gal Pressman,
Dragos Tatulea, Moshe Shemesh, Alexei Lazar
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
--
2.44.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH mlx5-next 1/2] mlx5: Remove redundant iseg base
2026-03-19 12:22 [PATCH mlx5-next 0/2] mlx5-next updates 2026-03-19 Tariq Toukan
@ 2026-03-19 12:22 ` Tariq Toukan
2026-03-20 23:05 ` Joe Damato
2026-03-19 12:22 ` [PATCH mlx5-next 2/2] net/mlx5: Add vhca_id_type bit to alias context Tariq Toukan
2026-03-22 18:41 ` [PATCH mlx5-next 0/2] mlx5-next updates 2026-03-19 Leon Romanovsky
2 siblings, 1 reply; 6+ messages in thread
From: Tariq Toukan @ 2026-03-19 12:22 UTC (permalink / raw)
To: Leon Romanovsky, Jason Gunthorpe, Saeed Mahameed, Tariq Toukan
Cc: Eric Dumazet, Jakub Kicinski, Paolo Abeni, Andrew Lunn,
David S. Miller, Mark Bloch, Parav Pandit, Simon Horman,
Shay Drori, linux-rdma, linux-kernel, netdev, Gal Pressman,
Dragos Tatulea, Moshe Shemesh, Alexei Lazar
From: Parav Pandit <parav@nvidia.com>
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.
Signed-off-by: Parav Pandit <parav@nvidia.com>
Reviewed-by: Shay Drori <shayd@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
---
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(-)
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index 9fb0629978bd..5b8987ddaa8e 100644
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -2740,7 +2740,7 @@ static int mlx5_ib_mmap(struct ib_ucontext *ibcontext, struct vm_area_struct *vm
if (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,
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c b/drivers/net/ethernet/mellanox/mlx5/core/main.c
index b0bc4a7d4a93..661b211eeb95 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c
@@ -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");
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/sf/dev/driver.c b/drivers/net/ethernet/mellanox/mlx5/core/sf/dev/driver.c
index c45540fe7d9d..4391ef0bab5d 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/sf/dev/driver.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/sf/dev/driver.c
@@ -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;
diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h
index 04dcd09f7517..b8b5af78284d 100644
--- a/include/linux/mlx5/driver.h
+++ b/include/linux/mlx5/driver.h
@@ -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;
--
2.44.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH mlx5-next 2/2] net/mlx5: Add vhca_id_type bit to alias context
2026-03-19 12:22 [PATCH mlx5-next 0/2] mlx5-next updates 2026-03-19 Tariq Toukan
2026-03-19 12:22 ` [PATCH mlx5-next 1/2] mlx5: Remove redundant iseg base Tariq Toukan
@ 2026-03-19 12:22 ` Tariq Toukan
2026-03-20 23:07 ` Joe Damato
2026-03-22 18:41 ` [PATCH mlx5-next 0/2] mlx5-next updates 2026-03-19 Leon Romanovsky
2 siblings, 1 reply; 6+ messages in thread
From: Tariq Toukan @ 2026-03-19 12:22 UTC (permalink / raw)
To: Leon Romanovsky, Jason Gunthorpe, Saeed Mahameed, Tariq Toukan
Cc: Eric Dumazet, Jakub Kicinski, Paolo Abeni, Andrew Lunn,
David S. Miller, Mark Bloch, Parav Pandit, Simon Horman,
Shay Drori, linux-rdma, linux-kernel, netdev, Gal Pressman,
Dragos Tatulea, Moshe Shemesh, Alexei Lazar, Patrisious Haddad,
Leon Romanovsky
From: Patrisious Haddad <phaddad@nvidia.com>
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.
Signed-off-by: Patrisious Haddad <phaddad@nvidia.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
---
include/linux/mlx5/mlx5_ifc.h | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/include/linux/mlx5/mlx5_ifc.h b/include/linux/mlx5/mlx5_ifc.h
index 8fa4fb3d36cf..2400b4c38c77 100644
--- a/include/linux/mlx5/mlx5_ifc.h
+++ b/include/linux/mlx5/mlx5_ifc.h
@@ -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];
--
2.44.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH mlx5-next 1/2] mlx5: Remove redundant iseg base
2026-03-19 12:22 ` [PATCH mlx5-next 1/2] mlx5: Remove redundant iseg base Tariq Toukan
@ 2026-03-20 23:05 ` Joe Damato
0 siblings, 0 replies; 6+ messages in thread
From: Joe Damato @ 2026-03-20 23:05 UTC (permalink / raw)
To: Tariq Toukan
Cc: Leon Romanovsky, Jason Gunthorpe, Saeed Mahameed, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Andrew Lunn, David S. Miller,
Mark Bloch, Parav Pandit, Simon Horman, Shay Drori, linux-rdma,
linux-kernel, netdev, Gal Pressman, Dragos Tatulea, Moshe Shemesh,
Alexei Lazar
On Thu, Mar 19, 2026 at 02:22:10PM +0200, Tariq Toukan wrote:
> From: Parav Pandit <parav@nvidia.com>
>
> 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.
>
> Signed-off-by: Parav Pandit <parav@nvidia.com>
> Reviewed-by: Shay Drori <shayd@nvidia.com>
> Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
> ---
> 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(-)
Reviewed-by: Joe Damato <joe@dama.to>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH mlx5-next 2/2] net/mlx5: Add vhca_id_type bit to alias context
2026-03-19 12:22 ` [PATCH mlx5-next 2/2] net/mlx5: Add vhca_id_type bit to alias context Tariq Toukan
@ 2026-03-20 23:07 ` Joe Damato
0 siblings, 0 replies; 6+ messages in thread
From: Joe Damato @ 2026-03-20 23:07 UTC (permalink / raw)
To: Tariq Toukan
Cc: Leon Romanovsky, Jason Gunthorpe, Saeed Mahameed, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Andrew Lunn, David S. Miller,
Mark Bloch, Parav Pandit, Simon Horman, Shay Drori, linux-rdma,
linux-kernel, netdev, Gal Pressman, Dragos Tatulea, Moshe Shemesh,
Alexei Lazar, Patrisious Haddad, Leon Romanovsky
On Thu, Mar 19, 2026 at 02:22:11PM +0200, Tariq Toukan wrote:
> From: Patrisious Haddad <phaddad@nvidia.com>
>
> 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.
>
> Signed-off-by: Patrisious Haddad <phaddad@nvidia.com>
> Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
> Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
> ---
> include/linux/mlx5/mlx5_ifc.h | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
Reviewed-by: Joe Damato <joe@dama.to>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH mlx5-next 0/2] mlx5-next updates 2026-03-19
2026-03-19 12:22 [PATCH mlx5-next 0/2] mlx5-next updates 2026-03-19 Tariq Toukan
2026-03-19 12:22 ` [PATCH mlx5-next 1/2] mlx5: Remove redundant iseg base Tariq Toukan
2026-03-19 12:22 ` [PATCH mlx5-next 2/2] net/mlx5: Add vhca_id_type bit to alias context Tariq Toukan
@ 2026-03-22 18:41 ` Leon Romanovsky
2 siblings, 0 replies; 6+ messages in thread
From: Leon Romanovsky @ 2026-03-22 18:41 UTC (permalink / raw)
To: Jason Gunthorpe, Saeed Mahameed, Tariq Toukan
Cc: Eric Dumazet, Jakub Kicinski, Paolo Abeni, Andrew Lunn,
David S. Miller, Mark Bloch, Parav Pandit, Simon Horman,
Shay Drori, linux-rdma, linux-kernel, netdev, Gal Pressman,
Dragos Tatulea, Moshe Shemesh, Alexei Lazar
On Thu, 19 Mar 2026 14:22:09 +0200, Tariq Toukan wrote:
> This series contains mlx5 shared cleanups and updates.
>
> Regards,
> Tariq
>
> Parav 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,
--
Leon Romanovsky <leon@kernel.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-03-22 18:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-19 12:22 [PATCH mlx5-next 0/2] mlx5-next updates 2026-03-19 Tariq Toukan
2026-03-19 12:22 ` [PATCH mlx5-next 1/2] mlx5: Remove redundant iseg base Tariq Toukan
2026-03-20 23:05 ` Joe Damato
2026-03-19 12:22 ` [PATCH mlx5-next 2/2] net/mlx5: Add vhca_id_type bit to alias context Tariq Toukan
2026-03-20 23:07 ` Joe Damato
2026-03-22 18:41 ` [PATCH mlx5-next 0/2] mlx5-next updates 2026-03-19 Leon Romanovsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox