common/mlx5: share devices information
authorMatan Azrad <matan@mellanox.com>
Wed, 29 Jan 2020 12:38:30 +0000 (12:38 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 5 Feb 2020 08:51:20 +0000 (09:51 +0100)
Move the vendor information, vendor ID and device IDs from net/mlx5 PMD
to the common mlx5 file.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
drivers/common/mlx5/mlx5_common.h
drivers/net/mlx5/mlx5.h
drivers/net/mlx5/mlx5_txq.c

index 107ab8d..0f57a27 100644 (file)
@@ -86,6 +86,27 @@ pmd_drv_log_basename(const char *s)
        \
        snprintf(name, sizeof(name), "" __VA_ARGS__)
 
+enum {
+       PCI_VENDOR_ID_MELLANOX = 0x15b3,
+};
+
+enum {
+       PCI_DEVICE_ID_MELLANOX_CONNECTX4 = 0x1013,
+       PCI_DEVICE_ID_MELLANOX_CONNECTX4VF = 0x1014,
+       PCI_DEVICE_ID_MELLANOX_CONNECTX4LX = 0x1015,
+       PCI_DEVICE_ID_MELLANOX_CONNECTX4LXVF = 0x1016,
+       PCI_DEVICE_ID_MELLANOX_CONNECTX5 = 0x1017,
+       PCI_DEVICE_ID_MELLANOX_CONNECTX5VF = 0x1018,
+       PCI_DEVICE_ID_MELLANOX_CONNECTX5EX = 0x1019,
+       PCI_DEVICE_ID_MELLANOX_CONNECTX5EXVF = 0x101a,
+       PCI_DEVICE_ID_MELLANOX_CONNECTX5BF = 0xa2d2,
+       PCI_DEVICE_ID_MELLANOX_CONNECTX5BFVF = 0xa2d3,
+       PCI_DEVICE_ID_MELLANOX_CONNECTX6 = 0x101b,
+       PCI_DEVICE_ID_MELLANOX_CONNECTX6VF = 0x101c,
+       PCI_DEVICE_ID_MELLANOX_CONNECTX6DX = 0x101d,
+       PCI_DEVICE_ID_MELLANOX_CONNECTX6DXVF = 0x101e,
+};
+
 int mlx5_dev_to_pci_addr(const char *dev_path, struct rte_pci_addr *pci_addr);
 
 #endif /* RTE_PMD_MLX5_COMMON_H_ */
index 261a8fc..3daf0db 100644 (file)
 #include "mlx5_mr.h"
 #include "mlx5_autoconf.h"
 
-enum {
-       PCI_VENDOR_ID_MELLANOX = 0x15b3,
-};
-
-enum {
-       PCI_DEVICE_ID_MELLANOX_CONNECTX4 = 0x1013,
-       PCI_DEVICE_ID_MELLANOX_CONNECTX4VF = 0x1014,
-       PCI_DEVICE_ID_MELLANOX_CONNECTX4LX = 0x1015,
-       PCI_DEVICE_ID_MELLANOX_CONNECTX4LXVF = 0x1016,
-       PCI_DEVICE_ID_MELLANOX_CONNECTX5 = 0x1017,
-       PCI_DEVICE_ID_MELLANOX_CONNECTX5VF = 0x1018,
-       PCI_DEVICE_ID_MELLANOX_CONNECTX5EX = 0x1019,
-       PCI_DEVICE_ID_MELLANOX_CONNECTX5EXVF = 0x101a,
-       PCI_DEVICE_ID_MELLANOX_CONNECTX5BF = 0xa2d2,
-       PCI_DEVICE_ID_MELLANOX_CONNECTX5BFVF = 0xa2d3,
-       PCI_DEVICE_ID_MELLANOX_CONNECTX6 = 0x101b,
-       PCI_DEVICE_ID_MELLANOX_CONNECTX6VF = 0x101c,
-       PCI_DEVICE_ID_MELLANOX_CONNECTX6DX = 0x101d,
-       PCI_DEVICE_ID_MELLANOX_CONNECTX6DXVF = 0x101e,
-};
-
 /* Request types for IPC. */
 enum mlx5_mp_req_type {
        MLX5_MP_REQ_VERBS_CMD_FD = 1,
index 1d2ba8a..7bff769 100644 (file)
@@ -30,6 +30,7 @@
 
 #include <mlx5_glue.h>
 #include <mlx5_devx_cmds.h>
+#include <mlx5_common.h>
 
 #include "mlx5_defs.h"
 #include "mlx5_utils.h"