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

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'net-mlx5-misc-changes-2025-07-09'

Tariq Toukan says:

====================
net/mlx5: misc changes 2025-07-09

This series contains misc enhancements to the mlx5 driver.
====================

Link: https://patch.msgid.link/1752009387-13300-1-git-send-email-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+30 -38
-1
drivers/net/ethernet/mellanox/mlx5/core/en.h
··· 383 383 MLX5E_SQ_STATE_RECOVERING, 384 384 MLX5E_SQ_STATE_IPSEC, 385 385 MLX5E_SQ_STATE_DIM, 386 - MLX5E_SQ_STATE_VLAN_NEED_L2_INLINE, 387 386 MLX5E_SQ_STATE_PENDING_XSK_TX, 388 387 MLX5E_SQ_STATE_PENDING_TLS_RX_RESYNC, 389 388 MLX5E_NUM_SQ_STATES, /* Must be kept last */
-2
drivers/net/ethernet/mellanox/mlx5/core/en/ptp.c
··· 340 340 sq->stats = &c->priv->ptp_stats.sq[tc]; 341 341 sq->ptpsq = ptpsq; 342 342 INIT_WORK(&sq->recover_work, mlx5e_tx_err_cqe_work); 343 - if (!MLX5_CAP_ETH(mdev, wqe_vlan_insert)) 344 - set_bit(MLX5E_SQ_STATE_VLAN_NEED_L2_INLINE, &sq->state); 345 343 sq->stop_room = param->stop_room; 346 344 sq->ptp_cyc2time = mlx5_sq_ts_translator(mdev); 347 345
-1
drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c
··· 13 13 [MLX5E_SQ_STATE_RECOVERING] = "recovering", 14 14 [MLX5E_SQ_STATE_IPSEC] = "ipsec", 15 15 [MLX5E_SQ_STATE_DIM] = "dim", 16 - [MLX5E_SQ_STATE_VLAN_NEED_L2_INLINE] = "vlan_need_l2_inline", 17 16 [MLX5E_SQ_STATE_PENDING_XSK_TX] = "pending_xsk_tx", 18 17 [MLX5E_SQ_STATE_PENDING_TLS_RX_RESYNC] = "pending_tls_rx_resync", 19 18 };
+1 -3
drivers/net/ethernet/mellanox/mlx5/core/en/rx_res.c
··· 571 571 572 572 for (ix = 0; ix < nch; ix++) 573 573 mlx5e_rx_res_channel_activate_direct(res, chs, ix); 574 - for (ix = nch; ix < res->max_nch; ix++) 575 - mlx5e_rx_res_channel_deactivate_direct(res, ix); 576 574 577 575 if (res->features & MLX5E_RX_RES_FEATURE_PTP) { 578 576 u32 rqn; ··· 593 595 594 596 mlx5e_rx_res_rss_disable(res); 595 597 596 - for (ix = 0; ix < res->max_nch; ix++) 598 + for (ix = 0; ix < res->rss_nch; ix++) 597 599 mlx5e_rx_res_channel_deactivate_direct(res, ix); 598 600 599 601 if (res->features & MLX5E_RX_RES_FEATURE_PTP) {
+21 -20
drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/vlan.c
··· 94 94 struct net_device **out_dev, 95 95 struct netlink_ext_ack *extack) 96 96 { 97 - struct net_device *vlan_dev = *out_dev; 98 - struct flow_action_entry vlan_act = { 99 - .id = FLOW_ACTION_VLAN_PUSH, 100 - .vlan.vid = vlan_dev_vlan_id(vlan_dev), 101 - .vlan.proto = vlan_dev_vlan_proto(vlan_dev), 102 - .vlan.prio = 0, 103 - }; 104 - int err; 97 + do { 98 + struct net_device *vlan_dev = *out_dev; 99 + struct flow_action_entry vlan_act = { 100 + .id = FLOW_ACTION_VLAN_PUSH, 101 + .vlan.vid = vlan_dev_vlan_id(vlan_dev), 102 + .vlan.proto = vlan_dev_vlan_proto(vlan_dev), 103 + .vlan.prio = 0, 104 + }; 105 + int err; 105 106 106 - err = parse_tc_vlan_action(priv, &vlan_act, attr->esw_attr, &attr->action, extack, NULL); 107 - if (err) 108 - return err; 107 + err = parse_tc_vlan_action(priv, &vlan_act, attr->esw_attr, 108 + &attr->action, extack, NULL); 109 + if (err) 110 + return err; 109 111 110 - rcu_read_lock(); 111 - *out_dev = dev_get_by_index_rcu(dev_net(vlan_dev), dev_get_iflink(vlan_dev)); 112 - rcu_read_unlock(); 113 - if (!*out_dev) 114 - return -ENODEV; 112 + rcu_read_lock(); 113 + *out_dev = dev_get_by_index_rcu(dev_net(vlan_dev), 114 + dev_get_iflink(vlan_dev)); 115 + rcu_read_unlock(); 116 + if (!*out_dev) 117 + return -ENODEV; 118 + } while (is_vlan_dev(*out_dev)); 115 119 116 - if (is_vlan_dev(*out_dev)) 117 - err = mlx5e_tc_act_vlan_add_push_action(priv, attr, out_dev, extack); 118 - 119 - return err; 120 + return 0; 120 121 } 121 122 122 123 int
+4 -1
drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c
··· 1195 1195 struct flow_action_entry *meta_action; 1196 1196 unsigned long cookie = flow->cookie; 1197 1197 struct mlx5_ct_entry *entry; 1198 + bool has_nat; 1198 1199 int err; 1199 1200 1200 1201 meta_action = mlx5_tc_ct_get_ct_metadata_action(flow_rule); ··· 1237 1236 err = mlx5_tc_ct_rule_to_tuple_nat(&entry->tuple_nat, flow_rule); 1238 1237 if (err) 1239 1238 goto err_set; 1239 + has_nat = memcmp(&entry->tuple, &entry->tuple_nat, 1240 + sizeof(entry->tuple)); 1240 1241 1241 1242 spin_lock_bh(&ct_priv->ht_lock); 1242 1243 ··· 1247 1244 if (err) 1248 1245 goto err_entries; 1249 1246 1250 - if (memcmp(&entry->tuple, &entry->tuple_nat, sizeof(entry->tuple))) { 1247 + if (has_nat) { 1251 1248 err = rhashtable_lookup_insert_fast(&ct_priv->ct_tuples_nat_ht, 1252 1249 &entry->tuple_nat_node, 1253 1250 tuples_nat_ht_params);
-2
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
··· 1677 1677 sq->hw_mtu = MLX5E_SW2HW_MTU(params, params->sw_mtu); 1678 1678 sq->max_sq_mpw_wqebbs = mlx5e_get_max_sq_aligned_wqebbs(mdev); 1679 1679 INIT_WORK(&sq->recover_work, mlx5e_tx_err_cqe_work); 1680 - if (!MLX5_CAP_ETH(mdev, wqe_vlan_insert)) 1681 - set_bit(MLX5E_SQ_STATE_VLAN_NEED_L2_INLINE, &sq->state); 1682 1680 if (mlx5_ipsec_device_caps(c->priv->mdev)) 1683 1681 set_bit(MLX5E_SQ_STATE_IPSEC, &sq->state); 1684 1682 if (param->is_mpw)
+1 -8
drivers/net/ethernet/mellanox/mlx5/core/en_tx.c
··· 256 256 257 257 mode = sq->min_inline_mode; 258 258 259 - if (skb_vlan_tag_present(skb) && 260 - test_bit(MLX5E_SQ_STATE_VLAN_NEED_L2_INLINE, &sq->state)) 259 + if (skb_vlan_tag_present(skb)) 261 260 mode = max_t(u8, MLX5_INLINE_MODE_L2, mode); 262 261 263 262 return mode; ··· 482 483 } 483 484 eseg->inline_hdr.sz |= cpu_to_be16(ihs); 484 485 dseg += wqe_attr->ds_cnt_inl; 485 - } else if (skb_vlan_tag_present(skb)) { 486 - eseg->insert.type = cpu_to_be16(MLX5_ETH_WQE_INSERT_VLAN); 487 - if (skb->vlan_proto == cpu_to_be16(ETH_P_8021AD)) 488 - eseg->insert.type |= cpu_to_be16(MLX5_ETH_WQE_SVLAN); 489 - eseg->insert.vlan_tci = cpu_to_be16(skb_vlan_tag_get(skb)); 490 - stats->added_vlan_packets++; 491 486 } 492 487 493 488 dseg += wqe_attr->ds_cnt_ids;
+3
drivers/net/ethernet/mellanox/mlx5/core/wc.c
··· 378 378 mlx5_free_bfreg(mdev, &sq->bfreg); 379 379 err_alloc_bfreg: 380 380 kfree(sq); 381 + 382 + if (mdev->wc_state == MLX5_WC_STATE_UNSUPPORTED) 383 + mlx5_core_warn(mdev, "Write combining is not supported\n"); 381 384 } 382 385 383 386 bool mlx5_wc_support_get(struct mlx5_core_dev *mdev)