X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_regexdev%2Frte_regexdev_core.h;h=a5576d353f1e37c64dd6aed5722711a5a7e151cf;hb=a8cdfc69c84b7740646368a46bbd3d4d6ddf97b0;hp=c46438fffdc024cf836d2a8824c340d83a952307;hpb=9c26771bc58d7d91231b53128511a8e1e3e4cb77;p=dpdk.git diff --git a/lib/librte_regexdev/rte_regexdev_core.h b/lib/librte_regexdev/rte_regexdev_core.h index c46438fffd..a5576d353f 100644 --- a/lib/librte_regexdev/rte_regexdev_core.h +++ b/lib/librte_regexdev/rte_regexdev_core.h @@ -127,6 +127,17 @@ struct rte_regexdev_ops { regexdev_dump_t dev_dump; }; +/** + * Possible states of a RegEx device. + */ +enum rte_regexdev_state { + RTE_REGEXDEV_UNUSED = 0, /**< Device is unused. */ + RTE_REGEXDEV_REGISTERED, + /**< Device is registered, but not ready to be used. */ + RTE_REGEXDEV_READY, + /**< Device is ready for use. This is set by the PMD. */ +}; + /** * @internal * The data part, with no function pointers, associated with each RegEx device. @@ -136,6 +147,10 @@ struct rte_regexdev_ops { */ struct rte_regexdev_data { void *dev_private; /**< PMD-specific private data. */ + char dev_name[RTE_REGEXDEV_NAME_MAX_LEN]; /**< Unique identifier name */ + uint16_t dev_id; /**< Device [external] identifier. */ + struct rte_regexdev_config dev_conf; /**< RegEx configuration. */ + uint8_t dev_started : 1; /**< Device started to work. */ } __rte_cache_aligned; /** @@ -154,7 +169,15 @@ struct rte_regexdev { const struct rte_regexdev_ops *dev_ops; /**< Functions exported by PMD */ struct rte_device *device; /**< Backing device */ + enum rte_regexdev_state state; /**< The device state. */ struct rte_regexdev_data *data; /**< Pointer to device data. */ } __rte_cache_aligned; +/** + * @internal + * The pool of *rte_regexdev* structures. The size of the pool + * is configured at compile-time in the file. + */ +extern struct rte_regexdev rte_regex_devices[]; + #endif /* _RTE_REGEX_CORE_H_ */