const struct mlx5_glue *mlx5_glue;
#endif
-/**
- * Get PCI information by sysfs device path.
- *
- * @param dev_path
- * Pointer to device sysfs folder name.
- * @param[out] pci_addr
- * PCI bus address output buffer.
- *
- * @return
- * 0 on success, a negative errno value otherwise and rte_errno is set.
- */
int
mlx5_dev_to_pci_addr(const char *dev_path,
struct rte_pci_addr *pci_addr)
port_info_out->name_type = MLX5_PHYS_PORT_NAME_TYPE_UNKNOWN;
}
-/**
- * Get kernel interface name from IB device path.
- *
- * @param[in] ibdev_path
- * Pointer to IB device path.
- * @param[out] ifname
- * Interface name output buffer.
- *
- * @return
- * 0 on success, a negative errno value otherwise and rte_errno is set.
- */
int
mlx5_get_ifname_sysfs(const char *ibdev_path, char *ifname)
{
return MLX5_CQE_STATUS_SW_OWN;
}
+/*
+ * Get PCI address from sysfs of a PCI-related device.
+ *
+ * @param[in] dev_path
+ * The sysfs path should not point to the direct plain PCI device.
+ * Instead, the node "/device/" is used to access the real device.
+ * @param[out] pci_addr
+ * Parsed PCI address.
+ *
+ * @return
+ * - 0 on success.
+ * - Negative value and rte_errno is set otherwise.
+ */
__rte_internal
int mlx5_dev_to_pci_addr(const char *dev_path, struct rte_pci_addr *pci_addr);
+
+/*
+ * Get kernel network interface name from sysfs IB device path.
+ *
+ * @param[in] ibdev_path
+ * The sysfs path to IB device.
+ * @param[out] ifname
+ * Interface name output of size IF_NAMESIZE.
+ *
+ * @return
+ * - 0 on success.
+ * - Negative value and rte_errno is set otherwise.
+ */
__rte_internal
int mlx5_get_ifname_sysfs(const char *ibdev_path, char *ifname);