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

Merge branch 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux

Tariq Toukan says:

====================
mlx5-next updates 2025-11-13

The following pull-request contains common mlx5 updates

* 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux:
net/mlx5: Expose definition for 1600Gbps link mode
net/mlx5: fs, set non default device per namespace
net/mlx5: fs, Add other_eswitch support for steering tables
net/mlx5: Add OTHER_ESWITCH HW capabilities
net/mlx5: Add direct ST mode support for RDMA
PCI/TPH: Expose pcie_tph_get_st_table_loc()
{rdma,net}/mlx5: Query vports mac address from device
====================

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

+216 -78
+1 -1
drivers/infiniband/hw/mlx5/main.c
··· 842 842 break; 843 843 844 844 case MLX5_VPORT_ACCESS_METHOD_NIC: 845 - err = mlx5_query_nic_vport_node_guid(dev->mdev, &tmp); 845 + err = mlx5_query_nic_vport_node_guid(dev->mdev, 0, false, &tmp); 846 846 break; 847 847 848 848 default:
+7 -13
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
··· 875 875 vport_num, 1, 876 876 vport->info.link_state); 877 877 878 - /* Host PF has its own mac/guid. */ 879 - if (vport_num) { 880 - mlx5_modify_nic_vport_mac_address(esw->dev, vport_num, 881 - vport->info.mac); 882 - mlx5_modify_nic_vport_node_guid(esw->dev, vport_num, 883 - vport->info.node_guid); 884 - } 878 + mlx5_query_nic_vport_mac_address(esw->dev, vport_num, true, 879 + vport->info.mac); 880 + mlx5_query_nic_vport_node_guid(esw->dev, vport_num, true, 881 + &vport->info.node_guid); 885 882 886 883 flags = (vport->info.vlan || vport->info.qos) ? 887 884 SET_VLAN_STRIP | SET_VLAN_INSERT : 0; ··· 943 946 if (ret) 944 947 goto err_vhca_mapping; 945 948 } 946 - 947 - /* External controller host PF has factory programmed MAC. 948 - * Read it from the device. 949 - */ 950 - if (mlx5_core_is_ecpf(esw->dev) && vport_num == MLX5_VPORT_PF) 951 - mlx5_query_nic_vport_mac_address(esw->dev, vport_num, true, vport->info.mac); 952 949 953 950 esw_vport_change_handle_locked(vport); 954 951 ··· 2226 2235 ivi->vf = vport - 1; 2227 2236 2228 2237 mutex_lock(&esw->state_lock); 2238 + 2239 + mlx5_query_nic_vport_mac_address(esw->dev, vport, true, 2240 + evport->info.mac); 2229 2241 ether_addr_copy(ivi->mac, evport->info.mac); 2230 2242 ivi->linkstate = evport->info.link_state; 2231 2243 ivi->vlan = evport->info.vlan;
+3
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
··· 4491 4491 struct mlx5_vport *vport = mlx5_devlink_port_vport_get(port); 4492 4492 4493 4493 mutex_lock(&esw->state_lock); 4494 + 4495 + mlx5_query_nic_vport_mac_address(esw->dev, vport->vport, true, 4496 + vport->info.mac); 4494 4497 ether_addr_copy(hw_addr, vport->info.mac); 4495 4498 *hw_addr_len = ETH_ALEN; 4496 4499 mutex_unlock(&esw->state_lock);
+31
drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c
··· 239 239 MLX5_SET(set_flow_table_root_in, in, vport_number, ft->vport); 240 240 MLX5_SET(set_flow_table_root_in, in, other_vport, 241 241 !!(ft->flags & MLX5_FLOW_TABLE_OTHER_VPORT)); 242 + MLX5_SET(set_flow_table_root_in, in, eswitch_owner_vhca_id, 243 + ft->esw_owner_vhca_id); 244 + MLX5_SET(set_flow_table_root_in, in, other_eswitch, 245 + !!(ft->flags & MLX5_FLOW_TABLE_OTHER_ESWITCH)); 242 246 243 247 err = mlx5_cmd_exec_in(dev, set_flow_table_root, in); 244 248 if (!err && ··· 306 302 MLX5_SET(create_flow_table_in, in, vport_number, ft->vport); 307 303 MLX5_SET(create_flow_table_in, in, other_vport, 308 304 !!(ft->flags & MLX5_FLOW_TABLE_OTHER_VPORT)); 305 + MLX5_SET(create_flow_table_in, in, eswitch_owner_vhca_id, 306 + ft->esw_owner_vhca_id); 307 + MLX5_SET(create_flow_table_in, in, other_eswitch, 308 + !!(ft->flags & MLX5_FLOW_TABLE_OTHER_ESWITCH)); 309 309 310 310 MLX5_SET(create_flow_table_in, in, flow_table_context.decap_en, 311 311 en_decap); ··· 368 360 MLX5_SET(destroy_flow_table_in, in, vport_number, ft->vport); 369 361 MLX5_SET(destroy_flow_table_in, in, other_vport, 370 362 !!(ft->flags & MLX5_FLOW_TABLE_OTHER_VPORT)); 363 + MLX5_SET(destroy_flow_table_in, in, eswitch_owner_vhca_id, 364 + ft->esw_owner_vhca_id); 365 + MLX5_SET(destroy_flow_table_in, in, other_eswitch, 366 + !!(ft->flags & MLX5_FLOW_TABLE_OTHER_ESWITCH)); 371 367 372 368 err = mlx5_cmd_exec_in(dev, destroy_flow_table, in); 373 369 if (!err) ··· 406 394 MLX5_SET(modify_flow_table_in, in, vport_number, ft->vport); 407 395 MLX5_SET(modify_flow_table_in, in, other_vport, 408 396 !!(ft->flags & MLX5_FLOW_TABLE_OTHER_VPORT)); 397 + MLX5_SET(modify_flow_table_in, in, eswitch_owner_vhca_id, 398 + ft->esw_owner_vhca_id); 399 + MLX5_SET(modify_flow_table_in, in, other_eswitch, 400 + !!(ft->flags & MLX5_FLOW_TABLE_OTHER_ESWITCH)); 409 401 MLX5_SET(modify_flow_table_in, in, modify_field_select, 410 402 MLX5_MODIFY_FLOW_TABLE_MISS_TABLE_ID); 411 403 if (next_ft) { ··· 445 429 MLX5_SET(create_flow_group_in, in, vport_number, ft->vport); 446 430 MLX5_SET(create_flow_group_in, in, other_vport, 447 431 !!(ft->flags & MLX5_FLOW_TABLE_OTHER_VPORT)); 432 + MLX5_SET(create_flow_group_in, in, eswitch_owner_vhca_id, 433 + ft->esw_owner_vhca_id); 434 + MLX5_SET(create_flow_group_in, in, other_eswitch, 435 + !!(ft->flags & MLX5_FLOW_TABLE_OTHER_ESWITCH)); 448 436 err = mlx5_cmd_exec_inout(dev, create_flow_group, in, out); 449 437 if (!err) 450 438 fg->id = MLX5_GET(create_flow_group_out, out, ··· 471 451 MLX5_SET(destroy_flow_group_in, in, vport_number, ft->vport); 472 452 MLX5_SET(destroy_flow_group_in, in, other_vport, 473 453 !!(ft->flags & MLX5_FLOW_TABLE_OTHER_VPORT)); 454 + MLX5_SET(destroy_flow_group_in, in, eswitch_owner_vhca_id, 455 + ft->esw_owner_vhca_id); 456 + MLX5_SET(destroy_flow_group_in, in, other_eswitch, 457 + !!(ft->flags & MLX5_FLOW_TABLE_OTHER_ESWITCH)); 474 458 return mlx5_cmd_exec_in(dev, destroy_flow_group, in); 475 459 } 476 460 ··· 583 559 MLX5_SET(set_fte_in, in, vport_number, ft->vport); 584 560 MLX5_SET(set_fte_in, in, other_vport, 585 561 !!(ft->flags & MLX5_FLOW_TABLE_OTHER_VPORT)); 562 + MLX5_SET(set_fte_in, in, eswitch_owner_vhca_id, ft->esw_owner_vhca_id); 563 + MLX5_SET(set_fte_in, in, other_eswitch, 564 + !!(ft->flags & MLX5_FLOW_TABLE_OTHER_ESWITCH)); 586 565 587 566 in_flow_context = MLX5_ADDR_OF(set_fte_in, in, flow_context); 588 567 MLX5_SET(flow_context, in_flow_context, group_id, group_id); ··· 815 788 MLX5_SET(delete_fte_in, in, vport_number, ft->vport); 816 789 MLX5_SET(delete_fte_in, in, other_vport, 817 790 !!(ft->flags & MLX5_FLOW_TABLE_OTHER_VPORT)); 791 + MLX5_SET(delete_fte_in, in, eswitch_owner_vhca_id, 792 + ft->esw_owner_vhca_id); 793 + MLX5_SET(delete_fte_in, in, other_eswitch, 794 + !!(ft->flags & MLX5_FLOW_TABLE_OTHER_ESWITCH)); 818 795 819 796 return mlx5_cmd_exec_in(dev, delete_fte, in); 820 797 }
+64 -10
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
··· 939 939 return fg; 940 940 } 941 941 942 - static struct mlx5_flow_table *alloc_flow_table(int level, u16 vport, 943 - enum fs_flow_table_type table_type, 944 - enum fs_flow_table_op_mod op_mod, 945 - u32 flags) 942 + static struct mlx5_flow_table * 943 + alloc_flow_table(struct mlx5_flow_table_attr *ft_attr, u16 vport, 944 + enum fs_flow_table_type table_type, 945 + enum fs_flow_table_op_mod op_mod) 946 946 { 947 947 struct mlx5_flow_table *ft; 948 948 int ret; ··· 957 957 return ERR_PTR(ret); 958 958 } 959 959 960 - ft->level = level; 960 + ft->level = ft_attr->level; 961 961 ft->node.type = FS_TYPE_FLOW_TABLE; 962 962 ft->op_mod = op_mod; 963 963 ft->type = table_type; 964 964 ft->vport = vport; 965 - ft->flags = flags; 965 + ft->esw_owner_vhca_id = ft_attr->esw_owner_vhca_id; 966 + ft->flags = ft_attr->flags; 966 967 INIT_LIST_HEAD(&ft->fwd_rules); 967 968 mutex_init(&ft->lock); 968 969 ··· 1371 1370 /* The level is related to the 1372 1371 * priority level range. 1373 1372 */ 1374 - ft = alloc_flow_table(ft_attr->level, 1375 - vport, 1376 - root->table_type, 1377 - op_mod, ft_attr->flags); 1373 + ft = alloc_flow_table(ft_attr, vport, root->table_type, op_mod); 1378 1374 if (IS_ERR(ft)) { 1379 1375 err = PTR_ERR(ft); 1380 1376 goto unlock_root; ··· 3307 3309 cleanup_root_ns(root_ns); 3308 3310 return ret; 3309 3311 } 3312 + 3313 + static bool mlx5_fs_ns_is_empty(struct mlx5_flow_namespace *ns) 3314 + { 3315 + struct fs_prio *iter_prio; 3316 + 3317 + fs_for_each_prio(iter_prio, ns) { 3318 + if (iter_prio->num_ft) 3319 + return false; 3320 + } 3321 + 3322 + return true; 3323 + } 3324 + 3325 + int mlx5_fs_set_root_dev(struct mlx5_core_dev *dev, 3326 + struct mlx5_core_dev *new_dev, 3327 + enum fs_flow_table_type table_type) 3328 + { 3329 + struct mlx5_flow_root_namespace **root; 3330 + int total_vports; 3331 + int i; 3332 + 3333 + switch (table_type) { 3334 + case FS_FT_RDMA_TRANSPORT_TX: 3335 + root = dev->priv.steering->rdma_transport_tx_root_ns; 3336 + total_vports = dev->priv.steering->rdma_transport_tx_vports; 3337 + break; 3338 + case FS_FT_RDMA_TRANSPORT_RX: 3339 + root = dev->priv.steering->rdma_transport_rx_root_ns; 3340 + total_vports = dev->priv.steering->rdma_transport_rx_vports; 3341 + break; 3342 + default: 3343 + WARN_ON_ONCE(true); 3344 + return -EINVAL; 3345 + } 3346 + 3347 + for (i = 0; i < total_vports; i++) { 3348 + mutex_lock(&root[i]->chain_lock); 3349 + if (!mlx5_fs_ns_is_empty(&root[i]->ns)) { 3350 + mutex_unlock(&root[i]->chain_lock); 3351 + goto err; 3352 + } 3353 + root[i]->dev = new_dev; 3354 + mutex_unlock(&root[i]->chain_lock); 3355 + } 3356 + return 0; 3357 + err: 3358 + while (i--) { 3359 + mutex_lock(&root[i]->chain_lock); 3360 + root[i]->dev = dev; 3361 + mutex_unlock(&root[i]->chain_lock); 3362 + } 3363 + /* If you hit this error try destroying all flow tables and try again */ 3364 + mlx5_core_err(dev, "Failed to set root device for RDMA TRANSPORT\n"); 3365 + return -EINVAL; 3366 + } 3367 + EXPORT_SYMBOL(mlx5_fs_set_root_dev); 3310 3368 3311 3369 static int init_rdma_transport_rx_root_ns(struct mlx5_flow_steering *steering) 3312 3370 {
+1 -18
drivers/net/ethernet/mellanox/mlx5/core/fs_core.h
··· 103 103 FS_TYPE_FLOW_DEST 104 104 }; 105 105 106 - enum fs_flow_table_type { 107 - FS_FT_NIC_RX = 0x0, 108 - FS_FT_NIC_TX = 0x1, 109 - FS_FT_ESW_EGRESS_ACL = 0x2, 110 - FS_FT_ESW_INGRESS_ACL = 0x3, 111 - FS_FT_FDB = 0X4, 112 - FS_FT_SNIFFER_RX = 0X5, 113 - FS_FT_SNIFFER_TX = 0X6, 114 - FS_FT_RDMA_RX = 0X7, 115 - FS_FT_RDMA_TX = 0X8, 116 - FS_FT_PORT_SEL = 0X9, 117 - FS_FT_FDB_RX = 0xa, 118 - FS_FT_FDB_TX = 0xb, 119 - FS_FT_RDMA_TRANSPORT_RX = 0xd, 120 - FS_FT_RDMA_TRANSPORT_TX = 0xe, 121 - FS_FT_MAX_TYPE = FS_FT_RDMA_TRANSPORT_TX, 122 - }; 123 - 124 106 enum fs_flow_table_op_mod { 125 107 FS_FT_OP_MOD_NORMAL, 126 108 FS_FT_OP_MOD_LAG_DEMUX, ··· 187 205 }; 188 206 u32 id; 189 207 u16 vport; 208 + u16 esw_owner_vhca_id; 190 209 unsigned int max_fte; 191 210 unsigned int level; 192 211 enum fs_flow_table_type type;
+25 -4
drivers/net/ethernet/mellanox/mlx5/core/lib/st.c
··· 19 19 struct mutex lock; 20 20 struct xa_limit index_limit; 21 21 struct xarray idx_xa; /* key == index, value == struct mlx5_st_idx_data */ 22 + u8 direct_mode : 1; 22 23 }; 23 24 24 25 struct mlx5_st *mlx5_st_create(struct mlx5_core_dev *dev) 25 26 { 26 27 struct pci_dev *pdev = dev->pdev; 27 28 struct mlx5_st *st; 29 + u8 direct_mode = 0; 28 30 u16 num_entries; 31 + u32 tbl_loc; 29 32 int ret; 30 33 31 34 if (!MLX5_CAP_GEN(dev, mkey_pcie_tph)) ··· 43 40 if (!pdev->tph_cap) 44 41 return NULL; 45 42 46 - num_entries = pcie_tph_get_st_table_size(pdev); 47 - /* We need a reserved entry for non TPH cases */ 48 - if (num_entries < 2) 49 - return NULL; 43 + tbl_loc = pcie_tph_get_st_table_loc(pdev); 44 + if (tbl_loc == PCI_TPH_LOC_NONE) 45 + direct_mode = 1; 46 + 47 + if (!direct_mode) { 48 + num_entries = pcie_tph_get_st_table_size(pdev); 49 + /* We need a reserved entry for non TPH cases */ 50 + if (num_entries < 2) 51 + return NULL; 52 + } 50 53 51 54 /* The OS doesn't support ST */ 52 55 ret = pcie_enable_tph(pdev, PCI_TPH_ST_DS_MODE); ··· 65 56 66 57 mutex_init(&st->lock); 67 58 xa_init_flags(&st->idx_xa, XA_FLAGS_ALLOC); 59 + st->direct_mode = direct_mode; 60 + if (st->direct_mode) 61 + return st; 62 + 68 63 /* entry 0 is reserved for non TPH cases */ 69 64 st->index_limit.min = MLX5_MKC_PCIE_TPH_NO_STEERING_TAG_INDEX + 1; 70 65 st->index_limit.max = num_entries - 1; ··· 108 95 ret = pcie_tph_get_cpu_st(dev->pdev, mem_type, cpu_uid, &tag); 109 96 if (ret) 110 97 return ret; 98 + 99 + if (st->direct_mode) { 100 + *st_index = tag; 101 + return 0; 102 + } 111 103 112 104 mutex_lock(&st->lock); 113 105 ··· 162 144 163 145 if (!st) 164 146 return -EOPNOTSUPP; 147 + 148 + if (st->direct_mode) 149 + return 0; 165 150 166 151 mutex_lock(&st->lock); 167 152 idx_data = xa_load(&st->idx_xa, st_index);
+12 -12
drivers/net/ethernet/mellanox/mlx5/core/vport.c
··· 78 78 } 79 79 80 80 static int mlx5_query_nic_vport_context(struct mlx5_core_dev *mdev, u16 vport, 81 - u32 *out) 81 + bool other_vport, u32 *out) 82 82 { 83 83 u32 in[MLX5_ST_SZ_DW(query_nic_vport_context_in)] = {}; 84 84 85 85 MLX5_SET(query_nic_vport_context_in, in, opcode, 86 86 MLX5_CMD_OP_QUERY_NIC_VPORT_CONTEXT); 87 87 MLX5_SET(query_nic_vport_context_in, in, vport_number, vport); 88 - if (vport) 89 - MLX5_SET(query_nic_vport_context_in, in, other_vport, 1); 88 + MLX5_SET(query_nic_vport_context_in, in, other_vport, other_vport); 90 89 91 90 return mlx5_cmd_exec_inout(mdev, query_nic_vport_context, in, out); 92 91 } ··· 96 97 u32 out[MLX5_ST_SZ_DW(query_nic_vport_context_out)] = {}; 97 98 int err; 98 99 99 - err = mlx5_query_nic_vport_context(mdev, vport, out); 100 + err = mlx5_query_nic_vport_context(mdev, vport, vport > 0, out); 100 101 if (!err) 101 102 *min_inline = MLX5_GET(query_nic_vport_context_out, out, 102 103 nic_vport_context.min_wqe_inline_mode); ··· 218 219 if (!out) 219 220 return -ENOMEM; 220 221 221 - err = mlx5_query_nic_vport_context(mdev, 0, out); 222 + err = mlx5_query_nic_vport_context(mdev, 0, false, out); 222 223 if (!err) 223 224 *mtu = MLX5_GET(query_nic_vport_context_out, out, 224 225 nic_vport_context.mtu); ··· 428 429 if (!out) 429 430 return -ENOMEM; 430 431 431 - err = mlx5_query_nic_vport_context(mdev, 0, out); 432 + err = mlx5_query_nic_vport_context(mdev, 0, false, out); 432 433 if (err) 433 434 goto out; 434 435 ··· 450 451 if (!out) 451 452 return -ENOMEM; 452 453 453 - err = mlx5_query_nic_vport_context(mdev, 0, out); 454 + err = mlx5_query_nic_vport_context(mdev, 0, false, out); 454 455 if (err) 455 456 goto out; 456 457 ··· 461 462 return err; 462 463 } 463 464 464 - int mlx5_query_nic_vport_node_guid(struct mlx5_core_dev *mdev, u64 *node_guid) 465 + int mlx5_query_nic_vport_node_guid(struct mlx5_core_dev *mdev, 466 + u16 vport, bool other_vport, u64 *node_guid) 465 467 { 466 468 u32 *out; 467 469 int outlen = MLX5_ST_SZ_BYTES(query_nic_vport_context_out); ··· 472 472 if (!out) 473 473 return -ENOMEM; 474 474 475 - err = mlx5_query_nic_vport_context(mdev, 0, out); 475 + err = mlx5_query_nic_vport_context(mdev, vport, other_vport, out); 476 476 if (err) 477 477 goto out; 478 478 ··· 529 529 if (!out) 530 530 return -ENOMEM; 531 531 532 - err = mlx5_query_nic_vport_context(mdev, 0, out); 532 + err = mlx5_query_nic_vport_context(mdev, 0, false, out); 533 533 if (err) 534 534 goto out; 535 535 ··· 804 804 if (!out) 805 805 return -ENOMEM; 806 806 807 - err = mlx5_query_nic_vport_context(mdev, vport, out); 807 + err = mlx5_query_nic_vport_context(mdev, vport, vport > 0, out); 808 808 if (err) 809 809 goto out; 810 810 ··· 908 908 if (!out) 909 909 return -ENOMEM; 910 910 911 - err = mlx5_query_nic_vport_context(mdev, 0, out); 911 + err = mlx5_query_nic_vport_context(mdev, 0, false, out); 912 912 if (err) 913 913 goto out; 914 914
+13 -3
drivers/pci/tph.c
··· 155 155 return reg; 156 156 } 157 157 158 - static u32 get_st_table_loc(struct pci_dev *pdev) 158 + /** 159 + * pcie_tph_get_st_table_loc - Return the device's ST table location 160 + * @pdev: PCI device to query 161 + * 162 + * Return: 163 + * PCI_TPH_LOC_NONE - Not present 164 + * PCI_TPH_LOC_CAP - Located in the TPH Requester Extended Capability 165 + * PCI_TPH_LOC_MSIX - Located in the MSI-X Table 166 + */ 167 + u32 pcie_tph_get_st_table_loc(struct pci_dev *pdev) 159 168 { 160 169 u32 reg; 161 170 ··· 172 163 173 164 return FIELD_GET(PCI_TPH_CAP_LOC_MASK, reg); 174 165 } 166 + EXPORT_SYMBOL(pcie_tph_get_st_table_loc); 175 167 176 168 /* 177 169 * Return the size of ST table. If ST table is not in TPH Requester Extended ··· 184 174 u32 loc; 185 175 186 176 /* Check ST table location first */ 187 - loc = get_st_table_loc(pdev); 177 + loc = pcie_tph_get_st_table_loc(pdev); 188 178 189 179 /* Convert loc to match with PCI_TPH_LOC_* defined in pci_regs.h */ 190 180 loc = FIELD_PREP(PCI_TPH_CAP_LOC_MASK, loc); ··· 309 299 */ 310 300 set_ctrl_reg_req_en(pdev, PCI_TPH_REQ_DISABLE); 311 301 312 - loc = get_st_table_loc(pdev); 302 + loc = pcie_tph_get_st_table_loc(pdev); 313 303 /* Convert loc to match with PCI_TPH_LOC_* */ 314 304 loc = FIELD_PREP(PCI_TPH_CAP_LOC_MASK, loc); 315 305
+24
include/linux/mlx5/fs.h
··· 71 71 MLX5_FLOW_TABLE_UNMANAGED = BIT(3), 72 72 MLX5_FLOW_TABLE_OTHER_VPORT = BIT(4), 73 73 MLX5_FLOW_TABLE_UPLINK_VPORT = BIT(5), 74 + MLX5_FLOW_TABLE_OTHER_ESWITCH = BIT(6), 74 75 }; 75 76 76 77 #define LEFTOVERS_RULE_NUM 2 ··· 127 126 FDB_SLOW_PATH, 128 127 FDB_CRYPTO_EGRESS, 129 128 FDB_PER_VPORT, 129 + }; 130 + 131 + enum fs_flow_table_type { 132 + FS_FT_NIC_RX = 0x0, 133 + FS_FT_NIC_TX = 0x1, 134 + FS_FT_ESW_EGRESS_ACL = 0x2, 135 + FS_FT_ESW_INGRESS_ACL = 0x3, 136 + FS_FT_FDB = 0X4, 137 + FS_FT_SNIFFER_RX = 0X5, 138 + FS_FT_SNIFFER_TX = 0X6, 139 + FS_FT_RDMA_RX = 0X7, 140 + FS_FT_RDMA_TX = 0X8, 141 + FS_FT_PORT_SEL = 0X9, 142 + FS_FT_FDB_RX = 0xa, 143 + FS_FT_FDB_TX = 0xb, 144 + FS_FT_RDMA_TRANSPORT_RX = 0xd, 145 + FS_FT_RDMA_TRANSPORT_TX = 0xe, 146 + FS_FT_MAX_TYPE = FS_FT_RDMA_TRANSPORT_TX, 130 147 }; 131 148 132 149 struct mlx5_pkt_reformat; ··· 228 209 u32 flags; 229 210 u16 uid; 230 211 u16 vport; 212 + u16 esw_owner_vhca_id; 231 213 struct mlx5_flow_table *next_ft; 232 214 233 215 struct { ··· 374 354 375 355 struct mlx5_flow_root_namespace * 376 356 mlx5_get_root_namespace(struct mlx5_core_dev *dev, enum mlx5_flow_namespace_type ns_type); 357 + 358 + int mlx5_fs_set_root_dev(struct mlx5_core_dev *dev, 359 + struct mlx5_core_dev *new_dev, 360 + enum fs_flow_table_type table_type); 377 361 #endif
+31 -16
include/linux/mlx5/mlx5_ifc.h
··· 5251 5251 u8 op_mod[0x10]; 5252 5252 5253 5253 u8 other_vport[0x1]; 5254 - u8 reserved_at_41[0xf]; 5254 + u8 other_eswitch[0x1]; 5255 + u8 reserved_at_42[0xe]; 5255 5256 u8 vport_number[0x10]; 5256 5257 5257 5258 u8 reserved_at_60[0x20]; 5258 5259 5259 5260 u8 table_type[0x8]; 5260 - u8 reserved_at_88[0x18]; 5261 + u8 reserved_at_88[0x8]; 5262 + u8 eswitch_owner_vhca_id[0x10]; 5261 5263 5262 5264 u8 reserved_at_a0[0x8]; 5263 5265 u8 table_id[0x18]; ··· 8811 8809 u8 op_mod[0x10]; 8812 8810 8813 8811 u8 other_vport[0x1]; 8814 - u8 reserved_at_41[0xf]; 8812 + u8 other_eswitch[0x1]; 8813 + u8 reserved_at_42[0xe]; 8815 8814 u8 vport_number[0x10]; 8816 8815 8817 8816 u8 reserved_at_60[0x20]; 8818 8817 8819 8818 u8 table_type[0x8]; 8820 - u8 reserved_at_88[0x18]; 8819 + u8 reserved_at_88[0x8]; 8820 + u8 eswitch_owner_vhca_id[0x10]; 8821 8821 8822 8822 u8 reserved_at_a0[0x8]; 8823 8823 u8 table_id[0x18]; ··· 8844 8840 u8 op_mod[0x10]; 8845 8841 8846 8842 u8 other_vport[0x1]; 8847 - u8 reserved_at_41[0xf]; 8843 + u8 other_eswitch[0x1]; 8844 + u8 reserved_at_42[0xe]; 8848 8845 u8 vport_number[0x10]; 8849 8846 8850 8847 u8 reserved_at_60[0x20]; 8851 8848 8852 8849 u8 table_type[0x8]; 8853 - u8 reserved_at_88[0x18]; 8850 + u8 reserved_at_88[0x8]; 8851 + u8 eswitch_owner_vhca_id[0x10]; 8854 8852 8855 8853 u8 reserved_at_a0[0x8]; 8856 8854 u8 table_id[0x18]; ··· 8991 8985 u8 op_mod[0x10]; 8992 8986 8993 8987 u8 other_vport[0x1]; 8994 - u8 reserved_at_41[0xf]; 8988 + u8 other_eswitch[0x1]; 8989 + u8 reserved_at_42[0xe]; 8995 8990 u8 vport_number[0x10]; 8996 8991 8997 8992 u8 reserved_at_60[0x20]; 8998 8993 8999 8994 u8 table_type[0x8]; 9000 - u8 reserved_at_88[0x18]; 8995 + u8 reserved_at_88[0x8]; 8996 + u8 eswitch_owner_vhca_id[0x10]; 9001 8997 9002 8998 u8 reserved_at_a0[0x8]; 9003 8999 u8 table_id[0x18]; ··· 9543 9535 u8 op_mod[0x10]; 9544 9536 9545 9537 u8 other_vport[0x1]; 9546 - u8 reserved_at_41[0xf]; 9538 + u8 other_eswitch[0x1]; 9539 + u8 reserved_at_42[0xe]; 9547 9540 u8 vport_number[0x10]; 9548 9541 9549 9542 u8 reserved_at_60[0x20]; 9550 9543 9551 9544 u8 table_type[0x8]; 9552 - u8 reserved_at_88[0x18]; 9545 + u8 reserved_at_88[0x8]; 9546 + u8 eswitch_owner_vhca_id[0x10]; 9553 9547 9554 9548 u8 reserved_at_a0[0x20]; 9555 9549 ··· 9590 9580 u8 op_mod[0x10]; 9591 9581 9592 9582 u8 other_vport[0x1]; 9593 - u8 reserved_at_41[0xf]; 9583 + u8 other_eswitch[0x1]; 9584 + u8 reserved_at_42[0xe]; 9594 9585 u8 vport_number[0x10]; 9595 9586 9596 9587 u8 reserved_at_60[0x20]; ··· 9599 9588 u8 table_type[0x8]; 9600 9589 u8 reserved_at_88[0x4]; 9601 9590 u8 group_type[0x4]; 9602 - u8 reserved_at_90[0x10]; 9591 + u8 eswitch_owner_vhca_id[0x10]; 9603 9592 9604 9593 u8 reserved_at_a0[0x8]; 9605 9594 u8 table_id[0x18]; ··· 11889 11878 u8 op_mod[0x10]; 11890 11879 11891 11880 u8 other_vport[0x1]; 11892 - u8 reserved_at_41[0xf]; 11881 + u8 other_eswitch[0x1]; 11882 + u8 reserved_at_42[0xe]; 11893 11883 u8 vport_number[0x10]; 11894 11884 11895 - u8 reserved_at_60[0x20]; 11885 + u8 reserved_at_60[0x10]; 11886 + u8 eswitch_owner_vhca_id[0x10]; 11896 11887 11897 11888 u8 table_type[0x8]; 11898 11889 u8 reserved_at_88[0x7]; ··· 11934 11921 u8 op_mod[0x10]; 11935 11922 11936 11923 u8 other_vport[0x1]; 11937 - u8 reserved_at_41[0xf]; 11924 + u8 other_eswitch[0x1]; 11925 + u8 reserved_at_42[0xe]; 11938 11926 u8 vport_number[0x10]; 11939 11927 11940 11928 u8 reserved_at_60[0x10]; 11941 11929 u8 modify_field_select[0x10]; 11942 11930 11943 11931 u8 table_type[0x8]; 11944 - u8 reserved_at_88[0x18]; 11932 + u8 reserved_at_88[0x8]; 11933 + u8 eswitch_owner_vhca_id[0x10]; 11945 11934 11946 11935 u8 reserved_at_a0[0x8]; 11947 11936 u8 table_id[0x18];
+1
include/linux/mlx5/port.h
··· 112 112 MLX5E_400GAUI_2_400GBASE_CR2_KR2 = 17, 113 113 MLX5E_800GAUI_8_800GBASE_CR8_KR8 = 19, 114 114 MLX5E_800GAUI_4_800GBASE_CR4_KR4 = 20, 115 + MLX5E_1600TAUI_8_1600TBASE_CR8_KR8 = 23, 115 116 MLX5E_EXT_LINK_MODES_NUMBER, 116 117 }; 117 118
+2 -1
include/linux/mlx5/vport.h
··· 73 73 int mlx5_query_nic_vport_system_image_guid(struct mlx5_core_dev *mdev, 74 74 u64 *system_image_guid); 75 75 int mlx5_query_nic_vport_sd_group(struct mlx5_core_dev *mdev, u8 *sd_group); 76 - int mlx5_query_nic_vport_node_guid(struct mlx5_core_dev *mdev, u64 *node_guid); 76 + int mlx5_query_nic_vport_node_guid(struct mlx5_core_dev *mdev, 77 + u16 vport, bool other_vport, u64 *node_guid); 77 78 int mlx5_modify_nic_vport_node_guid(struct mlx5_core_dev *mdev, 78 79 u16 vport, u64 node_guid); 79 80 int mlx5_query_nic_vport_qkey_viol_cntr(struct mlx5_core_dev *mdev,
+1
include/linux/pci-tph.h
··· 29 29 void pcie_disable_tph(struct pci_dev *pdev); 30 30 int pcie_enable_tph(struct pci_dev *pdev, int mode); 31 31 u16 pcie_tph_get_st_table_size(struct pci_dev *pdev); 32 + u32 pcie_tph_get_st_table_loc(struct pci_dev *pdev); 32 33 #else 33 34 static inline int pcie_tph_set_st_entry(struct pci_dev *pdev, 34 35 unsigned int index, u16 tag)