mlx5_query_nic_vport_vlans() is not used anymore. Hence remove it. This patch doesn't change any functionality.
Unified · Split
| @@ -371,67 +371,6 @@ int mlx5_modify_nic_vport_mac_list(struct mlx5_core_dev *dev, · 370 unmodified lines | ||
| 371 | 371 | } |
| 372 | 372 | EXPORT_SYMBOL_GPL(mlx5_modify_nic_vport_mac_list); |
| 373 | 373 | |
| 374 | −int mlx5_query_nic_vport_vlans(struct mlx5_core_dev *dev, | |
| 375 | − u16 vport, | |
| 376 | − u16 vlans[], | |
| 377 | − int *size) | |
| 378 | −{ | |
| 379 | − u32 in[MLX5_ST_SZ_DW(query_nic_vport_context_in)]; | |
| 380 | − void *nic_vport_ctx; | |
| 381 | − int req_list_size; | |
| 382 | − int max_list_size; | |
| 383 | − int out_sz; | |
| 384 | − void *out; | |
| 385 | − int err; | |
| 386 | − int i; | |
| 387 | − | |
| 388 | − req_list_size = *size; | |
| 389 | − max_list_size = 1 << MLX5_CAP_GEN(dev, log_max_vlan_list); | |
| 390 | − if (req_list_size > max_list_size) { | |
| 391 | − mlx5_core_warn(dev, "Requested list size (%d) > (%d) max list size\n", | |
| 392 | − req_list_size, max_list_size); | |
| 393 | − req_list_size = max_list_size; | |
| 394 | − } | |
| 395 | − | |
| 396 | − out_sz = MLX5_ST_SZ_BYTES(modify_nic_vport_context_in) + | |
| 397 | − req_list_size * MLX5_ST_SZ_BYTES(vlan_layout); | |
| 398 | − | |
| 399 | − memset(in, 0, sizeof(in)); | |
| 400 | − out = kzalloc(out_sz, GFP_KERNEL); | |
| 401 | − if (!out) | |
| 402 | − return -ENOMEM; | |
| 403 | − | |
| 404 | − MLX5_SET(query_nic_vport_context_in, in, opcode, | |
| 405 | − MLX5_CMD_OP_QUERY_NIC_VPORT_CONTEXT); | |
| 406 | − MLX5_SET(query_nic_vport_context_in, in, allowed_list_type, | |
| 407 | − MLX5_NVPRT_LIST_TYPE_VLAN); | |
| 408 | − MLX5_SET(query_nic_vport_context_in, in, vport_number, vport); | |
| 409 | − | |
| 410 | − if (vport) | |
| 411 | − MLX5_SET(query_nic_vport_context_in, in, other_vport, 1); | |
| 412 | − | |
| 413 | − err = mlx5_cmd_exec(dev, in, sizeof(in), out, out_sz); | |
| 414 | − if (err) | |
| 415 | − goto out; | |
| 416 | − | |
| 417 | − nic_vport_ctx = MLX5_ADDR_OF(query_nic_vport_context_out, out, | |
| 418 | − nic_vport_context); | |
| 419 | − req_list_size = MLX5_GET(nic_vport_context, nic_vport_ctx, | |
| 420 | − allowed_list_size); | |
| 421 | − | |
| 422 | − *size = req_list_size; | |
| 423 | − for (i = 0; i < req_list_size; i++) { | |
| 424 | − void *vlan_addr = MLX5_ADDR_OF(nic_vport_context, | |
| 425 | − nic_vport_ctx, | |
| 426 | − current_uc_mac_address[i]); | |
| 427 | − vlans[i] = MLX5_GET(vlan_layout, vlan_addr, vlan); | |
| 428 | − } | |
| 429 | −out: | |
| 430 | − kfree(out); | |
| 431 | − return err; | |
| 432 | −} | |
| 433 | −EXPORT_SYMBOL_GPL(mlx5_query_nic_vport_vlans); | |
| 434 | − | |
| 435 | 374 | int mlx5_modify_nic_vport_vlans(struct mlx5_core_dev *dev, |
| 436 | 375 | u16 vlans[], |
| 437 | 376 | int list_size) |
| @@ -118,10 +118,6 @@ int mlx5_modify_nic_vport_promisc(struct mlx5_core_dev *mdev, · 117 unmodified lines | ||
| 118 | 118 | int promisc_uc, |
| 119 | 119 | int promisc_mc, |
| 120 | 120 | int promisc_all); |
| 121 | −int mlx5_query_nic_vport_vlans(struct mlx5_core_dev *dev, | |
| 122 | − u16 vport, | |
| 123 | − u16 vlans[], | |
| 124 | − int *size); | |
| 125 | 121 | int mlx5_modify_nic_vport_vlans(struct mlx5_core_dev *dev, |
| 126 | 122 | u16 vlans[], |
| 127 | 123 | int list_size); |