Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'mlx5-misc-fixes-2025-12-25'

Mark Bloch says:

====================
mlx5 misc fixes 2025-12-25

This patchset provides misc bug fixes from the team to the mlx5 core and
Eth drivers.
====================

Link: https://patch.msgid.link/20251225132717.358820-1-mbloch@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+29 -12
+11 -3
drivers/net/ethernet/mellanox/mlx5/core/en_accel/psp.c
··· 44 44 struct mlx5_flow_table *ft; 45 45 struct mlx5_flow_group *miss_group; 46 46 struct mlx5_flow_handle *miss_rule; 47 + struct mlx5_modify_hdr *rx_modify_hdr; 47 48 struct mlx5_flow_destination default_dest; 48 49 struct mlx5e_psp_rx_err rx_err; 49 50 u32 refcnt; ··· 287 286 return err; 288 287 } 289 288 290 - static void accel_psp_fs_rx_fs_destroy(struct mlx5e_accel_fs_psp_prot *fs_prot) 289 + static void accel_psp_fs_rx_fs_destroy(struct mlx5e_psp_fs *fs, 290 + struct mlx5e_accel_fs_psp_prot *fs_prot) 291 291 { 292 292 if (fs_prot->def_rule) { 293 293 mlx5_del_flow_rules(fs_prot->def_rule); 294 294 fs_prot->def_rule = NULL; 295 + } 296 + 297 + if (fs_prot->rx_modify_hdr) { 298 + mlx5_modify_header_dealloc(fs->mdev, fs_prot->rx_modify_hdr); 299 + fs_prot->rx_modify_hdr = NULL; 295 300 } 296 301 297 302 if (fs_prot->miss_rule) { ··· 403 396 modify_hdr = NULL; 404 397 goto out_err; 405 398 } 399 + fs_prot->rx_modify_hdr = modify_hdr; 406 400 407 401 flow_act.action = MLX5_FLOW_CONTEXT_ACTION_FWD_DEST | 408 402 MLX5_FLOW_CONTEXT_ACTION_CRYPTO_DECRYPT | ··· 424 416 goto out; 425 417 426 418 out_err: 427 - accel_psp_fs_rx_fs_destroy(fs_prot); 419 + accel_psp_fs_rx_fs_destroy(fs, fs_prot); 428 420 out: 429 421 kvfree(flow_group_in); 430 422 kvfree(spec); ··· 441 433 /* The netdev unreg already happened, so all offloaded rule are already removed */ 442 434 fs_prot = &accel_psp->fs_prot[type]; 443 435 444 - accel_psp_fs_rx_fs_destroy(fs_prot); 436 + accel_psp_fs_rx_fs_destroy(fs, fs_prot); 445 437 446 438 accel_psp_fs_rx_err_destroy_ft(fs, &fs_prot->rx_err); 447 439
+5 -4
drivers/net/ethernet/mellanox/mlx5/core/en_stats.c
··· 1608 1608 { 1609 1609 int mode = fec_active_mode(priv->mdev); 1610 1610 1611 - if (mode == MLX5E_FEC_NOFEC || 1612 - !MLX5_CAP_PCAM_FEATURE(priv->mdev, ppcnt_statistical_group)) 1611 + if (mode == MLX5E_FEC_NOFEC) 1613 1612 return; 1614 1613 1615 - fec_set_corrected_bits_total(priv, fec_stats); 1616 - fec_set_block_stats(priv, mode, fec_stats); 1614 + if (MLX5_CAP_PCAM_FEATURE(priv->mdev, ppcnt_statistical_group)) { 1615 + fec_set_corrected_bits_total(priv, fec_stats); 1616 + fec_set_block_stats(priv, mode, fec_stats); 1617 + } 1617 1618 1618 1619 if (MLX5_CAP_PCAM_REG(priv->mdev, pphcr)) 1619 1620 fec_set_histograms_stats(priv, mode, hist);
+7 -2
drivers/net/ethernet/mellanox/mlx5/core/lag/mp.c
··· 173 173 } 174 174 175 175 /* Handle multipath entry with lower priority value */ 176 - if (mp->fib.mfi && mp->fib.mfi != fi && 176 + if (mp->fib.mfi && 177 177 (mp->fib.dst != fen_info->dst || mp->fib.dst_len != fen_info->dst_len) && 178 - fi->fib_priority >= mp->fib.priority) 178 + mp->fib.dst_len <= fen_info->dst_len && 179 + !(mp->fib.dst_len == fen_info->dst_len && 180 + fi->fib_priority < mp->fib.priority)) { 181 + mlx5_core_dbg(ldev->pf[idx].dev, 182 + "Multipath entry with lower priority was rejected\n"); 179 183 return; 184 + } 180 185 181 186 nh_dev0 = mlx5_lag_get_next_fib_dev(ldev, fi, NULL); 182 187 nh_dev1 = mlx5_lag_get_next_fib_dev(ldev, fi, nh_dev0);
+6 -3
drivers/net/ethernet/mellanox/mlx5/core/port.c
··· 393 393 if (err) 394 394 return err; 395 395 396 - *status = MLX5_GET(mcia_reg, out, status); 397 - if (*status) 396 + if (MLX5_GET(mcia_reg, out, status)) { 397 + if (status) 398 + *status = MLX5_GET(mcia_reg, out, status); 398 399 return -EIO; 400 + } 399 401 400 402 ptr = MLX5_ADDR_OF(mcia_reg, out, dword_0); 401 403 memcpy(data, ptr, size); ··· 431 429 mlx5_qsfp_eeprom_params_set(&query.i2c_address, &query.page, &offset); 432 430 break; 433 431 default: 434 - mlx5_core_err(dev, "Module ID not recognized: 0x%x\n", module_id); 432 + mlx5_core_dbg(dev, "Module ID not recognized: 0x%x\n", 433 + module_id); 435 434 return -EINVAL; 436 435 } 437 436