|
35 | 35 | #include <linux/mlx5/driver.h>
|
36 | 36 | #include <linux/mlx5/cmd.h>
|
37 | 37 | #include "mlx5_core.h"
|
| 38 | +#ifdef CONFIG_MLX5_CORE_EN |
| 39 | +#include "eswitch.h" |
| 40 | +#endif |
38 | 41 |
|
39 | 42 | enum {
|
40 | 43 | MLX5_EQE_SIZE = sizeof(struct mlx5_eqe),
|
@@ -287,6 +290,11 @@ static int mlx5_eq_int(struct mlx5_core_dev *dev, struct mlx5_eq *eq)
|
287 | 290 | break;
|
288 | 291 | #endif
|
289 | 292 |
|
| 293 | +#ifdef CONFIG_MLX5_CORE_EN |
| 294 | + case MLX5_EVENT_TYPE_NIC_VPORT_CHANGE: |
| 295 | + mlx5_eswitch_vport_event(dev->priv.eswitch, eqe); |
| 296 | + break; |
| 297 | +#endif |
290 | 298 | default:
|
291 | 299 | mlx5_core_warn(dev, "Unhandled event 0x%x on EQ 0x%x\n",
|
292 | 300 | eqe->type, eq->eqn);
|
@@ -459,6 +467,11 @@ int mlx5_start_eqs(struct mlx5_core_dev *dev)
|
459 | 467 | if (MLX5_CAP_GEN(dev, pg))
|
460 | 468 | async_event_mask |= (1ull << MLX5_EVENT_TYPE_PAGE_FAULT);
|
461 | 469 |
|
| 470 | + if (MLX5_CAP_GEN(dev, port_type) == MLX5_CAP_PORT_TYPE_ETH && |
| 471 | + MLX5_CAP_GEN(dev, vport_group_manager) && |
| 472 | + mlx5_core_is_pf(dev)) |
| 473 | + async_event_mask |= (1ull << MLX5_EVENT_TYPE_NIC_VPORT_CHANGE); |
| 474 | + |
462 | 475 | err = mlx5_create_map_eq(dev, &table->cmd_eq, MLX5_EQ_VEC_CMD,
|
463 | 476 | MLX5_NUM_CMD_EQE, 1ull << MLX5_EVENT_TYPE_CMD,
|
464 | 477 | "mlx5_cmd_eq", &dev->priv.uuari.uars[0]);
|
|
0 commit comments