drivers: use SPDX tag for Cavium copyright files
[dpdk.git] / drivers / event / skeleton / skeleton_eventdev.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2016 Cavium, Inc
3  */
4
5 #ifndef __SKELETON_EVENTDEV_H__
6 #define __SKELETON_EVENTDEV_H__
7
8 #include <rte_eventdev_pmd_pci.h>
9 #include <rte_eventdev_pmd_vdev.h>
10
11 #ifdef RTE_LIBRTE_PMD_SKELETON_EVENTDEV_DEBUG
12 #define PMD_DRV_LOG(level, fmt, args...) \
13         RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
14 #define PMD_DRV_FUNC_TRACE() PMD_DRV_LOG(DEBUG, ">>")
15 #else
16 #define PMD_DRV_LOG(level, fmt, args...) do { } while (0)
17 #define PMD_DRV_FUNC_TRACE() do { } while (0)
18 #endif
19
20 #define PMD_DRV_ERR(fmt, args...) \
21         RTE_LOG(ERR, PMD, "%s(): " fmt "\n", __func__, ## args)
22
23 struct skeleton_eventdev {
24         uintptr_t reg_base;
25         uint16_t device_id;
26         uint16_t vendor_id;
27         uint16_t subsystem_device_id;
28         uint16_t subsystem_vendor_id;
29 } __rte_cache_aligned;
30
31 struct skeleton_port {
32         uint8_t port_id;
33 } __rte_cache_aligned;
34
35 static inline struct skeleton_eventdev *
36 skeleton_pmd_priv(const struct rte_eventdev *eventdev)
37 {
38         return eventdev->data->dev_private;
39 }
40
41 #endif /* __SKELETON_EVENTDEV_H__ */