net/mlx5: support sub-function representor
[dpdk.git] / drivers / net / mlx5 / linux / mlx5_ethdev_os.c
index 0e8de94..2127fcf 100644 (file)
@@ -1010,9 +1010,14 @@ mlx5_sysfs_check_switch_info(bool device_dir,
        case MLX5_PHYS_PORT_NAME_TYPE_PFHPF:
                /* Fallthrough */
        case MLX5_PHYS_PORT_NAME_TYPE_PFVF:
+               /* Fallthrough */
+       case MLX5_PHYS_PORT_NAME_TYPE_PFSF:
                /* New representors naming schema. */
                switch_info->representor = 1;
                break;
+       default:
+               switch_info->master = device_dir;
+               break;
        }
 }