5 #ifndef _RTE_RAWDEV_PMD_H_
6 #define _RTE_RAWDEV_PMD_H_
32 extern int librawdev_logtype;
35 #define RTE_RDEV_LOG(level, fmt, args...) \
36 rte_log(RTE_LOG_ ## level, librawdev_logtype, "%s(): " fmt "\n", \
39 #define RTE_RDEV_ERR(fmt, args...) \
40 RTE_RDEV_LOG(ERR, fmt, ## args)
41 #define RTE_RDEV_DEBUG(fmt, args...) \
42 RTE_RDEV_LOG(DEBUG, fmt, ## args)
43 #define RTE_RDEV_INFO(fmt, args...) \
44 RTE_RDEV_LOG(INFO, fmt, ## args)
48 #define RTE_RAWDEV_VALID_DEVID_OR_ERR_RET(dev_id, retval) do { \
49 if (!rte_rawdev_pmd_is_valid_dev((dev_id))) { \
50 RTE_RDEV_ERR("Invalid dev_id=%d", dev_id); \
55 #define RTE_RAWDEV_VALID_DEVID_OR_RET(dev_id) do { \
56 if (!rte_rawdev_pmd_is_valid_dev((dev_id))) { \
57 RTE_RDEV_ERR("Invalid dev_id=%d", dev_id); \
62 #define RTE_RAWDEV_DETACHED (0)
63 #define RTE_RAWDEV_ATTACHED (1)
71 struct rte_rawdev_global {
76 extern struct rte_rawdev_global *rte_rawdev_globals;
78 extern struct rte_rawdev *rte_rawdevs;
90 static inline struct rte_rawdev *
93 struct rte_rawdev *dev;
99 for (i = 0; i < RTE_RAWDEV_MAX_DEVS; i++) {
100 dev = &rte_rawdevs[i];
101 if ((dev->attached == RTE_RAWDEV_ATTACHED) &&
102 (strcmp(dev->name, name) == 0))
118 static inline unsigned
121 struct rte_rawdev *dev;
123 if (dev_id >= RTE_RAWDEV_MAX_DEVS)
126 dev = &rte_rawdevs[dev_id];
127 if (dev->attached != RTE_RAWDEV_ATTACHED)
151 rte_rawdev_obj_t dev_info);
165 rte_rawdev_obj_t config);
222 rte_rawdev_obj_t queue_conf);
239 rte_rawdev_obj_t queue_conf);
276 struct rte_rawdev_buf **buffers,
278 rte_rawdev_obj_t context);
301 struct rte_rawdev_buf **buffers,
303 rte_rawdev_obj_t context);
335 const char *attr_name,
336 uint64_t *attr_value);
353 const char *attr_name,
354 const uint64_t attr_value);
373 const unsigned int ids[], uint64_t values[],
unsigned int n);
379 const uint32_t ids[],
433 rte_rawdev_obj_t status_info);
447 rte_rawdev_obj_t version_info);
464 rte_rawdev_obj_t firmware_buf);
559 struct rte_rawdev * __rte_experimental
571 int __rte_experimental
588 struct rte_rawdev * __rte_experimental
600 int __rte_experimental