X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_rawdev%2Frte_rawdev_pmd.h;h=34dd7181b44a3253caa02b7cf984feb7bffc21fc;hb=31035e87b20772696aa0a697cf18cc0ea2d2f536;hp=5e6cf1d1649cc0e9dedf40b115d03eeea04cbe10;hpb=8bd5f07c7a1ac0c5b8d16758efc3ada3e16b0adc;p=dpdk.git diff --git a/lib/librte_rawdev/rte_rawdev_pmd.h b/lib/librte_rawdev/rte_rawdev_pmd.h index 5e6cf1d164..34dd7181b4 100644 --- a/lib/librte_rawdev/rte_rawdev_pmd.h +++ b/lib/librte_rawdev/rte_rawdev_pmd.h @@ -11,9 +11,6 @@ * @note * Driver facing APIs for a raw device. These are not to be called directly by * any application. - * - * @warning - * @b EXPERIMENTAL: this API may change without prior notice */ #ifdef __cplusplus @@ -141,12 +138,15 @@ rte_rawdev_pmd_is_valid_dev(uint8_t dev_id) * Raw device pointer * @param dev_info * Raw device information structure + * @param dev_private_size + * The size of the structure pointed to by dev_info->dev_private * * @return - * Returns 0 on success + * Returns 0 on success, negative error code on failure */ -typedef void (*rawdev_info_get_t)(struct rte_rawdev *dev, - rte_rawdev_obj_t dev_info); +typedef int (*rawdev_info_get_t)(struct rte_rawdev *dev, + rte_rawdev_obj_t dev_info, + size_t dev_private_size); /** * Configure a device. @@ -160,7 +160,8 @@ typedef void (*rawdev_info_get_t)(struct rte_rawdev *dev, * Returns 0 on success */ typedef int (*rawdev_configure_t)(const struct rte_rawdev *dev, - rte_rawdev_obj_t config); + rte_rawdev_obj_t config, + size_t config_size); /** * Start a configured device. @@ -214,10 +215,13 @@ typedef int (*rawdev_reset_t)(struct rte_rawdev *dev); * @param[out] queue_conf * Raw device queue configuration structure * + * @return + * Returns 0 on success, negative errno on failure */ -typedef void (*rawdev_queue_conf_get_t)(struct rte_rawdev *dev, +typedef int (*rawdev_queue_conf_get_t)(struct rte_rawdev *dev, uint16_t queue_id, - rte_rawdev_obj_t queue_conf); + rte_rawdev_obj_t queue_conf, + size_t queue_conf_size); /** * Setup an raw queue. @@ -234,7 +238,8 @@ typedef void (*rawdev_queue_conf_get_t)(struct rte_rawdev *dev, */ typedef int (*rawdev_queue_setup_t)(struct rte_rawdev *dev, uint16_t queue_id, - rte_rawdev_obj_t queue_conf); + rte_rawdev_obj_t queue_conf, + size_t queue_conf_size); /** * Release resources allocated by given raw queue. @@ -499,7 +504,7 @@ typedef int (*rawdev_firmware_unload_t)(struct rte_rawdev *dev); * @return * Return 0 on success */ -typedef int (*rawdev_selftest_t)(void); +typedef int (*rawdev_selftest_t)(uint16_t dev_id); /** Rawdevice operations function pointer table */ struct rte_rawdev_ops { @@ -568,7 +573,9 @@ struct rte_rawdev_ops { * @param name * Unique identifier name for each device * @param dev_private_size - * Private data allocated within rte_rawdev object. + * Size of private data memory allocated within rte_rawdev object. + * Set to 0 to disable internal memory allocation and allow for + * self-allocation. * @param socket_id * Socket to allocate resources on. * @return