CFLAGS += -I$(RTE_SDK)/drivers/common/mlx5
CFLAGS += -I$(RTE_SDK)/drivers/common/mlx5/linux
CFLAGS += -I$(RTE_SDK)/drivers/net/mlx5
+CFLAGS += -I$(RTE_SDK)/drivers/net/mlx5/linux
CFLAGS += -I$(BUILDDIR)/drivers/common/mlx5
CFLAGS += -D_BSD_SOURCE
CFLAGS += -D_DEFAULT_SOURCE
--- /dev/null
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright 2015 6WIND S.A.
+ * Copyright 2020 Mellanox Technologies, Ltd
+ */
+
+#ifndef RTE_PMD_MLX5_OS_H_
+#define RTE_PMD_MLX5_OS_H_
+
+/* verb enumerations translations to local enums. */
+enum {
+ DEV_SYSFS_NAME_MAX = IBV_SYSFS_NAME_MAX,
+ DEV_SYSFS_PATH_MAX = IBV_SYSFS_PATH_MAX
+};
+
+#define PCI_DRV_FLAGS (RTE_PCI_DRV_INTR_LSC | \
+ RTE_PCI_DRV_INTR_RMV | \
+ RTE_PCI_DRV_PROBE_AGAIN)
+#endif /* RTE_PMD_MLX5_OS_H_ */
.remove = mlx5_pci_remove,
.dma_map = mlx5_dma_map,
.dma_unmap = mlx5_dma_unmap,
- .drv_flags = RTE_PCI_DRV_INTR_LSC | RTE_PCI_DRV_INTR_RMV |
- RTE_PCI_DRV_PROBE_AGAIN,
+ .drv_flags = PCI_DRV_FLAGS,
};
/**
#include "mlx5_defs.h"
#include "mlx5_utils.h"
+#include "mlx5_os.h"
#include "mlx5_autoconf.h"
enum mlx5_ipool_index {
void *pd; /* Protection Domain. */
uint32_t pdn; /* Protection Domain number. */
uint32_t tdn; /* Transport Domain number. */
- char ibdev_name[IBV_SYSFS_NAME_MAX]; /* IB device name. */
- char ibdev_path[IBV_SYSFS_PATH_MAX]; /* IB device path for secondary */
+ char ibdev_name[DEV_SYSFS_NAME_MAX]; /* SYSFS dev name. */
+ char ibdev_path[DEV_SYSFS_PATH_MAX]; /* SYSFS dev path for secondary */
struct mlx5_dev_attr device_attr; /* Device properties. */
LIST_ENTRY(mlx5_dev_ctx_shared) mem_event_cb;
/**< Called by memory event callback. */