Skip to content

Commit 95f82b2

Browse files
committed
Merge branch 'mlx5-misc-fixes-2026-01-27'
Tariq Toukan says: ==================== mlx5 misc fixes 2026-01-27 [part] This patchset provides misc bug fixes from the team to the mlx5 core and Eth drivers. ==================== Link: https://patch.msgid.link/1769503961-124173-1-git-send-email-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2 parents 2aa1545 + 011be34 commit 95f82b2

6 files changed

Lines changed: 25 additions & 13 deletions

File tree

drivers/net/ethernet/mellanox/mlx5/core/debugfs.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -613,3 +613,19 @@ void mlx5_debug_cq_remove(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq)
613613
cq->dbg = NULL;
614614
}
615615
}
616+
617+
static int vhca_id_show(struct seq_file *file, void *priv)
618+
{
619+
struct mlx5_core_dev *dev = file->private;
620+
621+
seq_printf(file, "0x%x\n", MLX5_CAP_GEN(dev, vhca_id));
622+
return 0;
623+
}
624+
625+
DEFINE_SHOW_ATTRIBUTE(vhca_id);
626+
627+
void mlx5_vhca_debugfs_init(struct mlx5_core_dev *dev)
628+
{
629+
debugfs_create_file("vhca_id", 0400, dev->priv.dbg.dbg_root, dev,
630+
&vhca_id_fops);
631+
}

drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,8 @@ void mlx5e_ipsec_build_accel_xfrm_attrs(struct mlx5e_ipsec_sa_entry *sa_entry,
430430
attrs->replay_esn.esn = sa_entry->esn_state.esn;
431431
attrs->replay_esn.esn_msb = sa_entry->esn_state.esn_msb;
432432
attrs->replay_esn.overlap = sa_entry->esn_state.overlap;
433-
if (attrs->dir == XFRM_DEV_OFFLOAD_OUT)
433+
if (attrs->dir == XFRM_DEV_OFFLOAD_OUT ||
434+
x->xso.type != XFRM_DEV_OFFLOAD_PACKET)
434435
goto skip_replay_window;
435436

436437
switch (x->replay_esn->replay_window) {

drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1198,7 +1198,8 @@ int mlx5_fs_cmd_set_tx_flow_table_root(struct mlx5_core_dev *dev, u32 ft_id, boo
11981198
u32 out[MLX5_ST_SZ_DW(set_flow_table_root_out)] = {};
11991199
u32 in[MLX5_ST_SZ_DW(set_flow_table_root_in)] = {};
12001200

1201-
if (disconnect && MLX5_CAP_FLOWTABLE_NIC_TX(dev, reset_root_to_default))
1201+
if (disconnect &&
1202+
!MLX5_CAP_FLOWTABLE_NIC_TX(dev, reset_root_to_default))
12021203
return -EOPNOTSUPP;
12031204

12041205
MLX5_SET(set_flow_table_root_in, in, opcode,

drivers/net/ethernet/mellanox/mlx5/core/main.c

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1806,16 +1806,6 @@ static int mlx5_hca_caps_alloc(struct mlx5_core_dev *dev)
18061806
return -ENOMEM;
18071807
}
18081808

1809-
static int vhca_id_show(struct seq_file *file, void *priv)
1810-
{
1811-
struct mlx5_core_dev *dev = file->private;
1812-
1813-
seq_printf(file, "0x%x\n", MLX5_CAP_GEN(dev, vhca_id));
1814-
return 0;
1815-
}
1816-
1817-
DEFINE_SHOW_ATTRIBUTE(vhca_id);
1818-
18191809
static int mlx5_notifiers_init(struct mlx5_core_dev *dev)
18201810
{
18211811
int err;
@@ -1884,7 +1874,7 @@ int mlx5_mdev_init(struct mlx5_core_dev *dev, int profile_idx)
18841874
priv->numa_node = dev_to_node(mlx5_core_dma_dev(dev));
18851875
priv->dbg.dbg_root = debugfs_create_dir(dev_name(dev->device),
18861876
mlx5_debugfs_root);
1887-
debugfs_create_file("vhca_id", 0400, priv->dbg.dbg_root, dev, &vhca_id_fops);
1877+
18881878
INIT_LIST_HEAD(&priv->traps);
18891879

18901880
err = mlx5_cmd_init(dev);
@@ -2022,6 +2012,8 @@ static int probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
20222012
goto err_init_one;
20232013
}
20242014

2015+
mlx5_vhca_debugfs_init(dev);
2016+
20252017
pci_save_state(pdev);
20262018
return 0;
20272019

drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ int mlx5_wait_for_pages(struct mlx5_core_dev *dev, int *pages);
258258
void mlx5_cmd_flush(struct mlx5_core_dev *dev);
259259
void mlx5_cq_debugfs_init(struct mlx5_core_dev *dev);
260260
void mlx5_cq_debugfs_cleanup(struct mlx5_core_dev *dev);
261+
void mlx5_vhca_debugfs_init(struct mlx5_core_dev *dev);
261262

262263
int mlx5_query_pcam_reg(struct mlx5_core_dev *dev, u32 *pcam, u8 feature_group,
263264
u8 access_reg_group);

drivers/net/ethernet/mellanox/mlx5/core/sf/dev/driver.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ static int mlx5_sf_dev_probe(struct auxiliary_device *adev, const struct auxilia
7676
goto init_one_err;
7777
}
7878

79+
mlx5_vhca_debugfs_init(mdev);
7980
return 0;
8081

8182
init_one_err:

0 commit comments

Comments
 (0)