net/mlx5: support new representor naming format
[dpdk.git] / drivers / net / mlx5 / mlx5.h
index 5384453..88ffb19 100644 (file)
@@ -60,6 +60,7 @@ enum {
 struct mlx5_switch_info {
        uint32_t master:1; /**< Master device. */
        uint32_t representor:1; /**< Representor device. */
+       uint32_t port_name_new:1; /**< Rep. port name is in new format. */
        int32_t port_name; /**< Representor port name. */
        uint64_t switch_id; /**< Switch identifier. */
 };
@@ -300,6 +301,8 @@ unsigned int mlx5_dev_to_port_id(const struct rte_device *dev,
                                 unsigned int port_list_n);
 int mlx5_sysfs_switch_info(unsigned int ifindex,
                           struct mlx5_switch_info *info);
+bool mlx5_translate_port_name(const char *port_name_in,
+                             struct mlx5_switch_info *port_info_out);
 
 /* mlx5_mac.c */