1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2018 Intel Corporation
5 #ifndef _IFCVF_OSDEP_H_
6 #define _IFCVF_OSDEP_H_
9 #include <linux/pci_regs.h>
11 #include <rte_cycles.h>
13 #include <rte_bus_pci.h>
17 #define DEBUGOUT(S, args...) RTE_LOG(DEBUG, PMD, S, ##args)
20 #define msec_delay rte_delay_ms
22 #define IFCVF_READ_REG8(reg) rte_read8(reg)
23 #define IFCVF_WRITE_REG8(val, reg) rte_write8((val), (reg))
24 #define IFCVF_READ_REG16(reg) rte_read16(reg)
25 #define IFCVF_WRITE_REG16(val, reg) rte_write16((val), (reg))
26 #define IFCVF_READ_REG32(reg) rte_read32(reg)
27 #define IFCVF_WRITE_REG32(val, reg) rte_write32((val), (reg))
29 typedef struct rte_pci_device PCI_DEV;
31 #define PCI_READ_CONFIG_BYTE(dev, val, where) \
32 rte_pci_read_config(dev, val, 1, where)
34 #define PCI_READ_CONFIG_DWORD(dev, val, where) \
35 rte_pci_read_config(dev, val, 4, where)
47 PCI_READ_CONFIG_RANGE(PCI_DEV *dev, uint32_t *val, int size, int where)
49 return rte_pci_read_config(dev, val, size, where);
52 #endif /* _IFCVF_OSDEP_H_ */