net/octeontx_ep: add device init and uninit
[dpdk.git] / drivers / net / octeontx_ep / otx_ep_common.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(C) 2021 Marvell.
3  */
4 #ifndef _OTX_EP_COMMON_H_
5 #define _OTX_EP_COMMON_H_
6
7 #define otx_ep_info(fmt, args...)                               \
8         rte_log(RTE_LOG_INFO, otx_net_ep_logtype,               \
9                 "%s():%u " fmt "\n",                            \
10                 __func__, __LINE__, ##args)
11
12 #define otx_ep_err(fmt, args...)                                \
13         rte_log(RTE_LOG_ERR, otx_net_ep_logtype,                \
14                 "%s():%u " fmt "\n",                            \
15                 __func__, __LINE__, ##args)
16
17 #define otx_ep_dbg(fmt, args...)                                \
18         rte_log(RTE_LOG_DEBUG, otx_net_ep_logtype,              \
19                 "%s():%u " fmt "\n",                            \
20                 __func__, __LINE__, ##args)
21
22 /* OTX_EP EP VF device data structure */
23 struct otx_ep_device {
24         /* PCI device pointer */
25         struct rte_pci_device *pdev;
26         uint16_t chip_id;
27         struct rte_eth_dev *eth_dev;
28         int port_id;
29         /* Memory mapped h/w address */
30         uint8_t *hw_addr;
31 };
32
33 extern int otx_net_ep_logtype;
34 #endif  /* _OTX_EP_COMMON_H_ */