DPDK  18.11.11
rte_eventdev.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2016 Cavium, Inc.
3  * Copyright(c) 2016-2018 Intel Corporation.
4  * Copyright 2016 NXP
5  * All rights reserved.
6  */
7 
8 #ifndef _RTE_EVENTDEV_H_
9 #define _RTE_EVENTDEV_H_
10 
209 #ifdef __cplusplus
210 extern "C" {
211 #endif
212 
213 #include <rte_common.h>
214 #include <rte_config.h>
215 #include <rte_memory.h>
216 #include <rte_errno.h>
217 
218 struct rte_mbuf; /* we just use mbuf pointers; no need to include rte_mbuf.h */
219 struct rte_event;
220 
221 /* Event device capability bitmap flags */
222 #define RTE_EVENT_DEV_CAP_QUEUE_QOS (1ULL << 0)
223 
228 #define RTE_EVENT_DEV_CAP_EVENT_QOS (1ULL << 1)
229 
235 #define RTE_EVENT_DEV_CAP_DISTRIBUTED_SCHED (1ULL << 2)
236 
244 #define RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES (1ULL << 3)
245 
251 #define RTE_EVENT_DEV_CAP_BURST_MODE (1ULL << 4)
252 
259 #define RTE_EVENT_DEV_CAP_IMPLICIT_RELEASE_DISABLE (1ULL << 5)
260 
270 #define RTE_EVENT_DEV_CAP_NONSEQ_MODE (1ULL << 6)
271 
280 #define RTE_EVENT_DEV_CAP_RUNTIME_PORT_LINK (1ULL << 7)
281 
286 #define RTE_EVENT_DEV_CAP_MULTIPLE_QUEUE_PORT (1ULL << 8)
287 
292 /* Event device priority levels */
293 #define RTE_EVENT_DEV_PRIORITY_HIGHEST 0
294 
298 #define RTE_EVENT_DEV_PRIORITY_NORMAL 128
299 
303 #define RTE_EVENT_DEV_PRIORITY_LOWEST 255
304 
316 uint8_t
317 rte_event_dev_count(void);
318 
329 int
330 rte_event_dev_get_dev_id(const char *name);
331 
342 int
343 rte_event_dev_socket_id(uint8_t dev_id);
344 
349  const char *driver_name;
350  struct rte_device *dev;
381  int32_t max_num_events;
386  uint32_t event_dev_cap;
388 };
389 
405 int
406 rte_event_dev_info_get(uint8_t dev_id, struct rte_event_dev_info *dev_info);
407 
411 #define RTE_EVENT_DEV_ATTR_PORT_COUNT 0
412 
415 #define RTE_EVENT_DEV_ATTR_QUEUE_COUNT 1
416 
419 #define RTE_EVENT_DEV_ATTR_STARTED 2
420 
433 int
434 rte_event_dev_attr_get(uint8_t dev_id, uint32_t attr_id,
435  uint32_t *attr_value);
436 
437 
438 /* Event device configuration bitmap flags */
439 #define RTE_EVENT_DEV_CFG_PER_DEQUEUE_TIMEOUT (1ULL << 0)
440 
467  uint8_t nb_event_ports;
493  uint32_t event_dev_cfg;
495 };
496 
516 int
517 rte_event_dev_configure(uint8_t dev_id,
518  const struct rte_event_dev_config *dev_conf);
519 
520 
521 /* Event queue specific APIs */
522 
523 /* Event queue configuration bitmap flags */
524 #define RTE_EVENT_QUEUE_CFG_ALL_TYPES (1ULL << 0)
525 
530 #define RTE_EVENT_QUEUE_CFG_SINGLE_LINK (1ULL << 1)
531 
538  uint32_t nb_atomic_flows;
560  uint32_t event_queue_cfg;
562  uint8_t schedule_type;
567  uint8_t priority;
575 };
576 
599 int
600 rte_event_queue_default_conf_get(uint8_t dev_id, uint8_t queue_id,
601  struct rte_event_queue_conf *queue_conf);
602 
621 int
622 rte_event_queue_setup(uint8_t dev_id, uint8_t queue_id,
623  const struct rte_event_queue_conf *queue_conf);
624 
628 #define RTE_EVENT_QUEUE_ATTR_PRIORITY 0
629 
632 #define RTE_EVENT_QUEUE_ATTR_NB_ATOMIC_FLOWS 1
633 
636 #define RTE_EVENT_QUEUE_ATTR_NB_ATOMIC_ORDER_SEQUENCES 2
637 
640 #define RTE_EVENT_QUEUE_ATTR_EVENT_QUEUE_CFG 3
641 
644 #define RTE_EVENT_QUEUE_ATTR_SCHEDULE_TYPE 4
645 
666 int
667 rte_event_queue_attr_get(uint8_t dev_id, uint8_t queue_id, uint32_t attr_id,
668  uint32_t *attr_value);
669 
670 /* Event port specific APIs */
671 
687  uint16_t dequeue_depth;
693  uint16_t enqueue_depth;
706 };
707 
730 int
731 rte_event_port_default_conf_get(uint8_t dev_id, uint8_t port_id,
732  struct rte_event_port_conf *port_conf);
733 
754 int
755 rte_event_port_setup(uint8_t dev_id, uint8_t port_id,
756  const struct rte_event_port_conf *port_conf);
757 
761 #define RTE_EVENT_PORT_ATTR_ENQ_DEPTH 0
762 
765 #define RTE_EVENT_PORT_ATTR_DEQ_DEPTH 1
766 
769 #define RTE_EVENT_PORT_ATTR_NEW_EVENT_THRESHOLD 2
770 
787 int
788 rte_event_port_attr_get(uint8_t dev_id, uint8_t port_id, uint32_t attr_id,
789  uint32_t *attr_value);
790 
807 int
808 rte_event_dev_start(uint8_t dev_id);
809 
828 void
829 rte_event_dev_stop(uint8_t dev_id);
830 
831 typedef void (*eventdev_stop_flush_t)(uint8_t dev_id, struct rte_event event,
832  void *arg);
861 int
863  eventdev_stop_flush_t callback, void *userdata);
864 
876 int
877 rte_event_dev_close(uint8_t dev_id);
878 
879 /* Scheduler type definitions */
880 #define RTE_SCHED_TYPE_ORDERED 0
881 
907 #define RTE_SCHED_TYPE_ATOMIC 1
908 
926 #define RTE_SCHED_TYPE_PARALLEL 2
927 
939 /* Event types to classify the event source */
940 #define RTE_EVENT_TYPE_ETHDEV 0x0
941 
942 #define RTE_EVENT_TYPE_CRYPTODEV 0x1
943 
944 #define RTE_EVENT_TYPE_TIMER 0x2
945 
946 #define RTE_EVENT_TYPE_CPU 0x3
947 
950 #define RTE_EVENT_TYPE_ETH_RX_ADAPTER 0x4
951 
952 #define RTE_EVENT_TYPE_MAX 0x10
953 
955 /* Event enqueue operations */
956 #define RTE_EVENT_OP_NEW 0
957 
960 #define RTE_EVENT_OP_FORWARD 1
961 
968 #define RTE_EVENT_OP_RELEASE 2
969 
1006 struct rte_event {
1008  union {
1009  uint64_t event;
1011  struct {
1012  uint32_t flow_id:20;
1019  uint32_t sub_event_type:8;
1023  uint32_t event_type:4;
1027  uint8_t op:2;
1033  uint8_t rsvd:4;
1035  uint8_t sched_type:2;
1040  uint8_t queue_id;
1047  uint8_t priority;
1057  uint8_t impl_opaque;
1064  };
1065  };
1067  union {
1068  uint64_t u64;
1070  void *event_ptr;
1072  struct rte_mbuf *mbuf;
1074  };
1075 };
1076 
1077 /* Ethdev Rx adapter capability bitmap flags */
1078 #define RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT 0x1
1079 
1082 #define RTE_EVENT_ETH_RX_ADAPTER_CAP_MULTI_EVENTQ 0x2
1083 
1086 #define RTE_EVENT_ETH_RX_ADAPTER_CAP_OVERRIDE_FLOW_ID 0x4
1087 
1113 int
1114 rte_event_eth_rx_adapter_caps_get(uint8_t dev_id, uint16_t eth_port_id,
1115  uint32_t *caps);
1116 
1117 #define RTE_EVENT_TIMER_ADAPTER_CAP_INTERNAL_PORT (1ULL << 0)
1118 
1133 int __rte_experimental
1134 rte_event_timer_adapter_caps_get(uint8_t dev_id, uint32_t *caps);
1135 
1136 /* Crypto adapter capability bitmap flag */
1137 #define RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_NEW 0x1
1138 
1144 #define RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD 0x2
1145 
1151 #define RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_QP_EV_BIND 0x4
1152 
1156 #define RTE_EVENT_CRYPTO_ADAPTER_CAP_SESSION_PRIVATE_DATA 0x8
1157 
1184 int __rte_experimental
1185 rte_event_crypto_adapter_caps_get(uint8_t dev_id, uint8_t cdev_id,
1186  uint32_t *caps);
1187 
1188 /* Ethdev Tx adapter capability bitmap flags */
1189 #define RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT 0x1
1190 
1210 int __rte_experimental
1211 rte_event_eth_tx_adapter_caps_get(uint8_t dev_id, uint16_t eth_port_id,
1212  uint32_t *caps);
1213 
1214 struct rte_eventdev_ops;
1215 struct rte_eventdev;
1216 
1217 typedef uint16_t (*event_enqueue_t)(void *port, const struct rte_event *ev);
1220 typedef uint16_t (*event_enqueue_burst_t)(void *port,
1221  const struct rte_event ev[], uint16_t nb_events);
1224 typedef uint16_t (*event_dequeue_t)(void *port, struct rte_event *ev,
1225  uint64_t timeout_ticks);
1228 typedef uint16_t (*event_dequeue_burst_t)(void *port, struct rte_event ev[],
1229  uint16_t nb_events, uint64_t timeout_ticks);
1232 typedef uint16_t (*event_tx_adapter_enqueue)(void *port,
1233  struct rte_event ev[], uint16_t nb_events);
1236 #define RTE_EVENTDEV_NAME_MAX_LEN (64)
1237 
1246 struct rte_eventdev_data {
1247  int socket_id;
1249  uint8_t dev_id;
1251  uint8_t nb_queues;
1253  uint8_t nb_ports;
1255  void **ports;
1257  struct rte_event_port_conf *ports_cfg;
1259  struct rte_event_queue_conf *queues_cfg;
1261  uint16_t *links_map;
1263  void *dev_private;
1265  uint32_t event_dev_cap;
1267  struct rte_event_dev_config dev_conf;
1269  uint8_t service_inited;
1270  /* Service initialization state */
1271  uint32_t service_id;
1272  /* Service ID*/
1273  void *dev_stop_flush_arg;
1276  RTE_STD_C11
1277  uint8_t dev_started : 1;
1280  char name[RTE_EVENTDEV_NAME_MAX_LEN];
1283 
1285 struct rte_eventdev {
1286  event_enqueue_t enqueue;
1288  event_enqueue_burst_t enqueue_burst;
1290  event_enqueue_burst_t enqueue_new_burst;
1292  event_enqueue_burst_t enqueue_forward_burst;
1294  event_dequeue_t dequeue;
1296  event_dequeue_burst_t dequeue_burst;
1298  event_tx_adapter_enqueue txa_enqueue;
1300  struct rte_eventdev_data *data;
1302  struct rte_eventdev_ops *dev_ops;
1304  struct rte_device *dev;
1307  RTE_STD_C11
1308  uint8_t attached : 1;
1311 
1312 extern struct rte_eventdev *rte_eventdevs;
1315 static __rte_always_inline uint16_t
1316 __rte_event_enqueue_burst(uint8_t dev_id, uint8_t port_id,
1317  const struct rte_event ev[], uint16_t nb_events,
1318  const event_enqueue_burst_t fn)
1319 {
1320  const struct rte_eventdev *dev = &rte_eventdevs[dev_id];
1321 
1322 #ifdef RTE_LIBRTE_EVENTDEV_DEBUG
1323  if (dev_id >= RTE_EVENT_MAX_DEVS || !rte_eventdevs[dev_id].attached) {
1324  rte_errno = EINVAL;
1325  return 0;
1326  }
1327 
1328  if (port_id >= dev->data->nb_ports) {
1329  rte_errno = EINVAL;
1330  return 0;
1331  }
1332 #endif
1333  /*
1334  * Allow zero cost non burst mode routine invocation if application
1335  * requests nb_events as const one
1336  */
1337  if (nb_events == 1)
1338  return (*dev->enqueue)(dev->data->ports[port_id], ev);
1339  else
1340  return fn(dev->data->ports[port_id], ev, nb_events);
1341 }
1342 
1386 static inline uint16_t
1387 rte_event_enqueue_burst(uint8_t dev_id, uint8_t port_id,
1388  const struct rte_event ev[], uint16_t nb_events)
1389 {
1390  const struct rte_eventdev *dev = &rte_eventdevs[dev_id];
1391 
1392  return __rte_event_enqueue_burst(dev_id, port_id, ev, nb_events,
1393  dev->enqueue_burst);
1394 }
1395 
1437 static inline uint16_t
1438 rte_event_enqueue_new_burst(uint8_t dev_id, uint8_t port_id,
1439  const struct rte_event ev[], uint16_t nb_events)
1440 {
1441  const struct rte_eventdev *dev = &rte_eventdevs[dev_id];
1442 
1443  return __rte_event_enqueue_burst(dev_id, port_id, ev, nb_events,
1444  dev->enqueue_new_burst);
1445 }
1446 
1488 static inline uint16_t
1489 rte_event_enqueue_forward_burst(uint8_t dev_id, uint8_t port_id,
1490  const struct rte_event ev[], uint16_t nb_events)
1491 {
1492  const struct rte_eventdev *dev = &rte_eventdevs[dev_id];
1493 
1494  return __rte_event_enqueue_burst(dev_id, port_id, ev, nb_events,
1495  dev->enqueue_forward_burst);
1496 }
1497 
1523 int
1524 rte_event_dequeue_timeout_ticks(uint8_t dev_id, uint64_t ns,
1525  uint64_t *timeout_ticks);
1526 
1593 static inline uint16_t
1594 rte_event_dequeue_burst(uint8_t dev_id, uint8_t port_id, struct rte_event ev[],
1595  uint16_t nb_events, uint64_t timeout_ticks)
1596 {
1597  struct rte_eventdev *dev = &rte_eventdevs[dev_id];
1598 
1599 #ifdef RTE_LIBRTE_EVENTDEV_DEBUG
1600  if (dev_id >= RTE_EVENT_MAX_DEVS || !rte_eventdevs[dev_id].attached) {
1601  rte_errno = EINVAL;
1602  return 0;
1603  }
1604 
1605  if (port_id >= dev->data->nb_ports) {
1606  rte_errno = EINVAL;
1607  return 0;
1608  }
1609 #endif
1610 
1611  /*
1612  * Allow zero cost non burst mode routine invocation if application
1613  * requests nb_events as const one
1614  */
1615  if (nb_events == 1)
1616  return (*dev->dequeue)(
1617  dev->data->ports[port_id], ev, timeout_ticks);
1618  else
1619  return (*dev->dequeue_burst)(
1620  dev->data->ports[port_id], ev, nb_events,
1621  timeout_ticks);
1622 }
1623 
1684 int
1685 rte_event_port_link(uint8_t dev_id, uint8_t port_id,
1686  const uint8_t queues[], const uint8_t priorities[],
1687  uint16_t nb_links);
1688 
1728 int
1729 rte_event_port_unlink(uint8_t dev_id, uint8_t port_id,
1730  uint8_t queues[], uint16_t nb_unlinks);
1731 
1756 int __rte_experimental
1757 rte_event_port_unlinks_in_progress(uint8_t dev_id, uint8_t port_id);
1758 
1786 int
1787 rte_event_port_links_get(uint8_t dev_id, uint8_t port_id,
1788  uint8_t queues[], uint8_t priorities[]);
1789 
1805 int
1806 rte_event_dev_service_id_get(uint8_t dev_id, uint32_t *service_id);
1807 
1821 int
1822 rte_event_dev_dump(uint8_t dev_id, FILE *f);
1823 
1825 #define RTE_EVENT_DEV_XSTATS_NAME_SIZE 64
1826 
1831  RTE_EVENT_DEV_XSTATS_DEVICE,
1832  RTE_EVENT_DEV_XSTATS_PORT,
1833  RTE_EVENT_DEV_XSTATS_QUEUE,
1834 };
1835 
1843  char name[RTE_EVENT_DEV_XSTATS_NAME_SIZE];
1844 };
1845 
1878 int
1879 rte_event_dev_xstats_names_get(uint8_t dev_id,
1880  enum rte_event_dev_xstats_mode mode,
1881  uint8_t queue_port_id,
1882  struct rte_event_dev_xstats_name *xstats_names,
1883  unsigned int *ids,
1884  unsigned int size);
1885 
1912 int
1913 rte_event_dev_xstats_get(uint8_t dev_id,
1914  enum rte_event_dev_xstats_mode mode,
1915  uint8_t queue_port_id,
1916  const unsigned int ids[],
1917  uint64_t values[], unsigned int n);
1918 
1935 uint64_t
1936 rte_event_dev_xstats_by_name_get(uint8_t dev_id, const char *name,
1937  unsigned int *id);
1938 
1959 int
1960 rte_event_dev_xstats_reset(uint8_t dev_id,
1961  enum rte_event_dev_xstats_mode mode,
1962  int16_t queue_port_id,
1963  const uint32_t ids[],
1964  uint32_t nb_ids);
1965 
1976 int rte_event_dev_selftest(uint8_t dev_id);
1977 
1978 #ifdef __cplusplus
1979 }
1980 #endif
1981 
1982 #endif /* _RTE_EVENTDEV_H_ */
void rte_event_dev_stop(uint8_t dev_id)
uint32_t min_dequeue_timeout_ns
Definition: rte_eventdev.h:351
int rte_event_dequeue_timeout_ticks(uint8_t dev_id, uint64_t ns, uint64_t *timeout_ticks)
static uint16_t rte_event_enqueue_new_burst(uint8_t dev_id, uint8_t port_id, const struct rte_event ev[], uint16_t nb_events)
#define __rte_always_inline
Definition: rte_common.h:146
#define RTE_EVENT_DEV_XSTATS_NAME_SIZE
uint64_t u64
int rte_event_dev_attr_get(uint8_t dev_id, uint32_t attr_id, uint32_t *attr_value)
uint32_t flow_id
int rte_event_dev_stop_flush_callback_register(uint8_t dev_id, eventdev_stop_flush_t callback, void *userdata)
uint8_t priority
struct rte_device * dev
Definition: rte_eventdev.h:350
int rte_event_queue_setup(uint8_t dev_id, uint8_t queue_id, const struct rte_event_queue_conf *queue_conf)
int rte_event_queue_default_conf_get(uint8_t dev_id, uint8_t queue_id, struct rte_event_queue_conf *queue_conf)
int rte_event_port_default_conf_get(uint8_t dev_id, uint8_t port_id, struct rte_event_port_conf *port_conf)
uint32_t dequeue_timeout_ns
Definition: rte_eventdev.h:355
#define rte_errno
Definition: rte_errno.h:29
uint32_t event_type
uint32_t event_dev_cap
Definition: rte_eventdev.h:386
int rte_event_dev_socket_id(uint8_t dev_id)
uint32_t max_event_port_enqueue_depth
Definition: rte_eventdev.h:376
uint64_t rte_event_dev_xstats_by_name_get(uint8_t dev_id, const char *name, unsigned int *id)
int rte_event_dev_info_get(uint8_t dev_id, struct rte_event_dev_info *dev_info)
uint32_t nb_atomic_order_sequences
Definition: rte_eventdev.h:546
uint32_t nb_event_port_dequeue_depth
Definition: rte_eventdev.h:477
void * event_ptr
int rte_event_port_link(uint8_t dev_id, uint8_t port_id, const uint8_t queues[], const uint8_t priorities[], uint16_t nb_links)
int rte_event_queue_attr_get(uint8_t dev_id, uint8_t queue_id, uint32_t attr_id, uint32_t *attr_value)
uint8_t disable_implicit_release
Definition: rte_eventdev.h:699
rte_event_dev_xstats_mode
int rte_event_port_links_get(uint8_t dev_id, uint8_t port_id, uint8_t queues[], uint8_t priorities[])
int __rte_experimental rte_event_eth_tx_adapter_caps_get(uint8_t dev_id, uint16_t eth_port_id, uint32_t *caps)
int rte_event_dev_selftest(uint8_t dev_id)
static uint16_t rte_event_enqueue_burst(uint8_t dev_id, uint8_t port_id, const struct rte_event ev[], uint16_t nb_events)
int rte_event_dev_start(uint8_t dev_id)
int rte_event_port_setup(uint8_t dev_id, uint8_t port_id, const struct rte_event_port_conf *port_conf)
uint8_t max_event_port_dequeue_depth
Definition: rte_eventdev.h:371
int rte_event_port_attr_get(uint8_t dev_id, uint8_t port_id, uint32_t attr_id, uint32_t *attr_value)
uint32_t nb_event_port_enqueue_depth
Definition: rte_eventdev.h:485
const char * driver_name
Definition: rte_eventdev.h:349
uint8_t impl_opaque
uint8_t queue_id
static uint16_t rte_event_dequeue_burst(uint8_t dev_id, uint8_t port_id, struct rte_event ev[], uint16_t nb_events, uint64_t timeout_ticks)
int rte_event_dev_get_dev_id(const char *name)
int __rte_experimental rte_event_port_unlinks_in_progress(uint8_t dev_id, uint8_t port_id)
uint8_t rte_event_dev_count(void)
int rte_event_dev_close(uint8_t dev_id)
int __rte_experimental rte_event_crypto_adapter_caps_get(uint8_t dev_id, uint8_t cdev_id, uint32_t *caps)
int rte_event_dev_xstats_get(uint8_t dev_id, enum rte_event_dev_xstats_mode mode, uint8_t queue_port_id, const unsigned int ids[], uint64_t values[], unsigned int n)
int rte_event_dev_xstats_reset(uint8_t dev_id, enum rte_event_dev_xstats_mode mode, int16_t queue_port_id, const uint32_t ids[], uint32_t nb_ids)
#define RTE_STD_C11
Definition: rte_common.h:37
uint32_t dequeue_timeout_ns
Definition: rte_eventdev.h:446
int rte_event_dev_service_id_get(uint8_t dev_id, uint32_t *service_id)
static uint16_t rte_event_enqueue_forward_burst(uint8_t dev_id, uint8_t port_id, const struct rte_event ev[], uint16_t nb_events)
#define __rte_cache_aligned
Definition: rte_memory.h:66
int rte_event_dev_dump(uint8_t dev_id, FILE *f)
uint8_t rsvd
uint8_t op
int32_t new_event_threshold
Definition: rte_eventdev.h:674
uint8_t max_event_priority_levels
Definition: rte_eventdev.h:365
struct rte_mbuf * mbuf
uint32_t max_dequeue_timeout_ns
Definition: rte_eventdev.h:353
int __rte_experimental rte_event_timer_adapter_caps_get(uint8_t dev_id, uint32_t *caps)
uint32_t max_event_queue_flows
Definition: rte_eventdev.h:359
int rte_event_dev_configure(uint8_t dev_id, const struct rte_event_dev_config *dev_conf)
void(* eventdev_stop_flush_t)(uint8_t dev_id, struct rte_event event, void *arg)
Definition: rte_eventdev.h:831
uint32_t sub_event_type
uint8_t sched_type
uint8_t max_event_queues
Definition: rte_eventdev.h:357
uint8_t max_event_queue_priority_levels
Definition: rte_eventdev.h:361
int rte_event_port_unlink(uint8_t dev_id, uint8_t port_id, uint8_t queues[], uint16_t nb_unlinks)
int rte_event_eth_rx_adapter_caps_get(uint8_t dev_id, uint16_t eth_port_id, uint32_t *caps)
int rte_event_dev_xstats_names_get(uint8_t dev_id, enum rte_event_dev_xstats_mode mode, uint8_t queue_port_id, struct rte_event_dev_xstats_name *xstats_names, unsigned int *ids, unsigned int size)
uint32_t nb_event_queue_flows
Definition: rte_eventdev.h:472