From 77b7b81e32e94e79d2a65b259769ae11725be8bf Mon Sep 17 00:00:00 2001 From: Neil Horman Date: Sun, 21 Jan 2018 20:48:06 -0500 Subject: [PATCH] add experimental tag to appropriate functions Append the __rte_experimental tag to api calls appearing in the EXPERIMENTAL section of their libraries version map Signed-off-by: Neil Horman Acked-by: Thomas Monjalon --- drivers/net/dpaa/dpaa_ethdev.c | 12 ++-- drivers/net/dpaa/dpaa_ethdev.h | 4 +- drivers/net/dpaa/rte_pmd_dpaa.h | 2 +- lib/librte_bbdev/rte_bbdev.c | 53 ++++++++-------- lib/librte_bbdev/rte_bbdev.h | 41 ++++++------- lib/librte_bbdev/rte_bbdev_pmd.h | 8 +-- lib/librte_eal/bsdapp/eal/eal.c | 4 +- lib/librte_eal/common/eal_common_dev.c | 6 +- lib/librte_eal/common/eal_common_devargs.c | 7 ++- lib/librte_eal/common/include/rte_dev.h | 6 +- lib/librte_eal/common/include/rte_devargs.h | 8 ++- lib/librte_eal/common/include/rte_eal.h | 3 +- lib/librte_eal/common/include/rte_service.h | 53 ++++++++-------- .../common/include/rte_service_component.h | 16 ++--- lib/librte_eal/common/rte_service.c | 60 ++++++++++--------- lib/librte_eal/linuxapp/eal/eal.c | 4 +- lib/librte_ether/rte_ethdev.c | 6 +- lib/librte_ether/rte_ethdev.h | 7 ++- lib/librte_ether/rte_mtr.c | 25 ++++---- lib/librte_ether/rte_mtr.h | 26 ++++---- lib/librte_flow_classify/rte_flow_classify.c | 15 ++--- lib/librte_flow_classify/rte_flow_classify.h | 15 ++--- lib/librte_mbuf/rte_mbuf.c | 3 +- lib/librte_mbuf/rte_mbuf.h | 3 +- lib/librte_mbuf/rte_mbuf_pool_ops.c | 11 ++-- lib/librte_mbuf/rte_mbuf_pool_ops.h | 12 ++-- lib/librte_net/rte_arp.c | 2 +- lib/librte_net/rte_arp.h | 2 +- lib/librte_security/rte_security.c | 20 +++---- lib/librte_security/rte_security.h | 27 +++++---- 30 files changed, 250 insertions(+), 211 deletions(-) diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index bf5eb96ed6..453c9f6c0a 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -548,8 +548,9 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, return 0; } -int dpaa_eth_eventq_attach(const struct rte_eth_dev *dev, - int eth_rx_queue_id, +int __rte_experimental +dpaa_eth_eventq_attach(const struct rte_eth_dev *dev, + int eth_rx_queue_id, u16 ch_id, const struct rte_event_eth_rx_adapter_queue_conf *queue_conf) { @@ -610,8 +611,9 @@ int dpaa_eth_eventq_attach(const struct rte_eth_dev *dev, return ret; } -int dpaa_eth_eventq_detach(const struct rte_eth_dev *dev, - int eth_rx_queue_id) +int __rte_experimental +dpaa_eth_eventq_detach(const struct rte_eth_dev *dev, + int eth_rx_queue_id) { struct qm_mcc_initfq opts; int ret; @@ -875,7 +877,7 @@ is_dpaa_supported(struct rte_eth_dev *dev) return is_device_supported(dev, &rte_dpaa_pmd); } -int +int __rte_experimental rte_pmd_dpaa_set_tx_loopback(uint8_t port, uint8_t on) { struct rte_eth_dev *dev; diff --git a/drivers/net/dpaa/dpaa_ethdev.h b/drivers/net/dpaa/dpaa_ethdev.h index 92aec253c2..c051ae32a2 100644 --- a/drivers/net/dpaa/dpaa_ethdev.h +++ b/drivers/net/dpaa/dpaa_ethdev.h @@ -160,12 +160,12 @@ struct dpaa_if_stats { uint64_t tund; /** #include +#include #include #include #include @@ -160,7 +161,7 @@ find_free_dev_id(void) return RTE_BBDEV_MAX_DEVS; } -struct rte_bbdev * +struct rte_bbdev * __rte_experimental rte_bbdev_allocate(const char *name) { int ret; @@ -219,7 +220,7 @@ rte_bbdev_allocate(const char *name) return bbdev; } -int +int __rte_experimental rte_bbdev_release(struct rte_bbdev *bbdev) { uint16_t dev_id; @@ -253,7 +254,7 @@ rte_bbdev_release(struct rte_bbdev *bbdev) return 0; } -struct rte_bbdev * +struct rte_bbdev * __rte_experimental rte_bbdev_get_named_dev(const char *name) { unsigned int i; @@ -273,13 +274,13 @@ rte_bbdev_get_named_dev(const char *name) return NULL; } -uint16_t +uint16_t __rte_experimental rte_bbdev_count(void) { return num_devs; } -bool +bool __rte_experimental rte_bbdev_is_valid(uint16_t dev_id) { if ((dev_id < RTE_BBDEV_MAX_DEVS) && @@ -288,7 +289,7 @@ rte_bbdev_is_valid(uint16_t dev_id) return false; } -uint16_t +uint16_t __rte_experimental rte_bbdev_find_next(uint16_t dev_id) { dev_id++; @@ -298,7 +299,7 @@ rte_bbdev_find_next(uint16_t dev_id) return dev_id; } -int +int __rte_experimental rte_bbdev_setup_queues(uint16_t dev_id, uint16_t num_queues, int socket_id) { unsigned int i; @@ -388,7 +389,7 @@ error: return ret; } -int +int __rte_experimental rte_bbdev_intr_enable(uint16_t dev_id) { int ret; @@ -420,7 +421,7 @@ rte_bbdev_intr_enable(uint16_t dev_id) return -ENOTSUP; } -int +int __rte_experimental rte_bbdev_queue_configure(uint16_t dev_id, uint16_t queue_id, const struct rte_bbdev_queue_conf *conf) { @@ -529,7 +530,7 @@ rte_bbdev_queue_configure(uint16_t dev_id, uint16_t queue_id, return 0; } -int +int __rte_experimental rte_bbdev_start(uint16_t dev_id) { int i; @@ -561,7 +562,7 @@ rte_bbdev_start(uint16_t dev_id) return 0; } -int +int __rte_experimental rte_bbdev_stop(uint16_t dev_id) { struct rte_bbdev *dev = get_dev(dev_id); @@ -582,7 +583,7 @@ rte_bbdev_stop(uint16_t dev_id) return 0; } -int +int __rte_experimental rte_bbdev_close(uint16_t dev_id) { int ret; @@ -627,7 +628,7 @@ rte_bbdev_close(uint16_t dev_id) return 0; } -int +int __rte_experimental rte_bbdev_queue_start(uint16_t dev_id, uint16_t queue_id) { struct rte_bbdev *dev = get_dev(dev_id); @@ -657,7 +658,7 @@ rte_bbdev_queue_start(uint16_t dev_id, uint16_t queue_id) return 0; } -int +int __rte_experimental rte_bbdev_queue_stop(uint16_t dev_id, uint16_t queue_id) { struct rte_bbdev *dev = get_dev(dev_id); @@ -717,7 +718,7 @@ reset_stats_in_queues(struct rte_bbdev *dev) rte_bbdev_log_debug("Reset stats on %u", dev->data->dev_id); } -int +int __rte_experimental rte_bbdev_stats_get(uint16_t dev_id, struct rte_bbdev_stats *stats) { struct rte_bbdev *dev = get_dev(dev_id); @@ -740,7 +741,7 @@ rte_bbdev_stats_get(uint16_t dev_id, struct rte_bbdev_stats *stats) return 0; } -int +int __rte_experimental rte_bbdev_stats_reset(uint16_t dev_id) { struct rte_bbdev *dev = get_dev(dev_id); @@ -757,7 +758,7 @@ rte_bbdev_stats_reset(uint16_t dev_id) return 0; } -int +int __rte_experimental rte_bbdev_info_get(uint16_t dev_id, struct rte_bbdev_info *dev_info) { struct rte_bbdev *dev = get_dev(dev_id); @@ -785,7 +786,7 @@ rte_bbdev_info_get(uint16_t dev_id, struct rte_bbdev_info *dev_info) return 0; } -int +int __rte_experimental rte_bbdev_queue_info_get(uint16_t dev_id, uint16_t queue_id, struct rte_bbdev_queue_info *queue_info) { @@ -850,7 +851,7 @@ bbdev_op_init(struct rte_mempool *mempool, void *arg, void *element, } } -struct rte_mempool * +struct rte_mempool * __rte_experimental rte_bbdev_op_pool_create(const char *name, enum rte_bbdev_op_type type, unsigned int num_elements, unsigned int cache_size, int socket_id) @@ -897,7 +898,7 @@ rte_bbdev_op_pool_create(const char *name, enum rte_bbdev_op_type type, return mp; } -int +int __rte_experimental rte_bbdev_callback_register(uint16_t dev_id, enum rte_bbdev_event_type event, rte_bbdev_cb_fn cb_fn, void *cb_arg) { @@ -942,7 +943,7 @@ rte_bbdev_callback_register(uint16_t dev_id, enum rte_bbdev_event_type event, return (user_cb == NULL) ? -ENOMEM : 0; } -int +int __rte_experimental rte_bbdev_callback_unregister(uint16_t dev_id, enum rte_bbdev_event_type event, rte_bbdev_cb_fn cb_fn, void *cb_arg) { @@ -987,7 +988,7 @@ rte_bbdev_callback_unregister(uint16_t dev_id, enum rte_bbdev_event_type event, return ret; } -void +void __rte_experimental rte_bbdev_pmd_callback_process(struct rte_bbdev *dev, enum rte_bbdev_event_type event, void *ret_param) { @@ -1029,7 +1030,7 @@ rte_bbdev_pmd_callback_process(struct rte_bbdev *dev, rte_spinlock_unlock(&rte_bbdev_cb_lock); } -int +int __rte_experimental rte_bbdev_queue_intr_enable(uint16_t dev_id, uint16_t queue_id) { struct rte_bbdev *dev = get_dev(dev_id); @@ -1040,7 +1041,7 @@ rte_bbdev_queue_intr_enable(uint16_t dev_id, uint16_t queue_id) return dev->dev_ops->queue_intr_enable(dev, queue_id); } -int +int __rte_experimental rte_bbdev_queue_intr_disable(uint16_t dev_id, uint16_t queue_id) { struct rte_bbdev *dev = get_dev(dev_id); @@ -1051,7 +1052,7 @@ rte_bbdev_queue_intr_disable(uint16_t dev_id, uint16_t queue_id) return dev->dev_ops->queue_intr_disable(dev, queue_id); } -int +int __rte_experimental rte_bbdev_queue_intr_ctl(uint16_t dev_id, uint16_t queue_id, int epfd, int op, void *data) { @@ -1088,7 +1089,7 @@ rte_bbdev_queue_intr_ctl(uint16_t dev_id, uint16_t queue_id, int epfd, int op, } -const char * +const char * __rte_experimental rte_bbdev_op_type_str(enum rte_bbdev_op_type op_type) { static const char * const op_types[] = { diff --git a/lib/librte_bbdev/rte_bbdev.h b/lib/librte_bbdev/rte_bbdev.h index 37a0d05550..767a1e1a29 100644 --- a/lib/librte_bbdev/rte_bbdev.h +++ b/lib/librte_bbdev/rte_bbdev.h @@ -31,6 +31,7 @@ extern "C" { #include #include +#include #include #include #include @@ -54,7 +55,7 @@ enum rte_bbdev_state { * @return * The total number of usable devices. */ -uint16_t +uint16_t __rte_experimental rte_bbdev_count(void); /** @@ -66,7 +67,7 @@ rte_bbdev_count(void); * @return * true if device ID is valid and device is attached, false otherwise. */ -bool +bool __rte_experimental rte_bbdev_is_valid(uint16_t dev_id); /** @@ -79,7 +80,7 @@ rte_bbdev_is_valid(uint16_t dev_id); * - The next device, or * - RTE_BBDEV_MAX_DEVS if none found */ -uint16_t +uint16_t __rte_experimental rte_bbdev_find_next(uint16_t dev_id); /** Iterate through all enabled devices */ @@ -108,7 +109,7 @@ rte_bbdev_find_next(uint16_t dev_id); * - -EBUSY if the identified device has already started * - -ENOMEM if unable to allocate memory */ -int +int __rte_experimental rte_bbdev_setup_queues(uint16_t dev_id, uint16_t num_queues, int socket_id); /** @@ -125,7 +126,7 @@ rte_bbdev_setup_queues(uint16_t dev_id, uint16_t num_queues, int socket_id); * - -EBUSY if the identified device has already started * - -ENOTSUP if the interrupts are not supported by the device */ -int +int __rte_experimental rte_bbdev_intr_enable(uint16_t dev_id); /** Device queue configuration structure */ @@ -154,7 +155,7 @@ struct rte_bbdev_queue_conf { * - EINVAL if the identified queue size or priority are invalid * - EBUSY if the identified queue or its device have already started */ -int +int __rte_experimental rte_bbdev_queue_configure(uint16_t dev_id, uint16_t queue_id, const struct rte_bbdev_queue_conf *conf); @@ -169,7 +170,7 @@ rte_bbdev_queue_configure(uint16_t dev_id, uint16_t queue_id, * - 0 on success * - negative value on failure - as returned from PMD driver */ -int +int __rte_experimental rte_bbdev_start(uint16_t dev_id); /** @@ -182,7 +183,7 @@ rte_bbdev_start(uint16_t dev_id); * @return * - 0 on success */ -int +int __rte_experimental rte_bbdev_stop(uint16_t dev_id); /** @@ -195,7 +196,7 @@ rte_bbdev_stop(uint16_t dev_id); * @return * - 0 on success */ -int +int __rte_experimental rte_bbdev_close(uint16_t dev_id); /** @@ -212,7 +213,7 @@ rte_bbdev_close(uint16_t dev_id); * - 0 on success * - negative value on failure - as returned from PMD driver */ -int +int __rte_experimental rte_bbdev_queue_start(uint16_t dev_id, uint16_t queue_id); /** @@ -227,7 +228,7 @@ rte_bbdev_queue_start(uint16_t dev_id, uint16_t queue_id); * - 0 on success * - negative value on failure - as returned from PMD driver */ -int +int __rte_experimental rte_bbdev_queue_stop(uint16_t dev_id, uint16_t queue_id); /** Device statistics. */ @@ -253,7 +254,7 @@ struct rte_bbdev_stats { * - 0 on success * - EINVAL if invalid parameter pointer is provided */ -int +int __rte_experimental rte_bbdev_stats_get(uint16_t dev_id, struct rte_bbdev_stats *stats); /** @@ -264,7 +265,7 @@ rte_bbdev_stats_get(uint16_t dev_id, struct rte_bbdev_stats *stats); * @return * - 0 on success */ -int +int __rte_experimental rte_bbdev_stats_reset(uint16_t dev_id); /** Device information supplied by the device's driver */ @@ -322,7 +323,7 @@ struct rte_bbdev_info { * - 0 on success * - EINVAL if invalid parameter pointer is provided */ -int +int __rte_experimental rte_bbdev_info_get(uint16_t dev_id, struct rte_bbdev_info *dev_info); /** Queue information */ @@ -348,7 +349,7 @@ struct rte_bbdev_queue_info { * - 0 on success * - EINVAL if invalid parameter pointer is provided */ -int +int __rte_experimental rte_bbdev_queue_info_get(uint16_t dev_id, uint16_t queue_id, struct rte_bbdev_queue_info *queue_info); @@ -618,7 +619,7 @@ typedef void (*rte_bbdev_cb_fn)(uint16_t dev_id, * @return * Zero on success, negative value on failure. */ -int +int __rte_experimental rte_bbdev_callback_register(uint16_t dev_id, enum rte_bbdev_event_type event, rte_bbdev_cb_fn cb_fn, void *cb_arg); @@ -641,7 +642,7 @@ rte_bbdev_callback_register(uint16_t dev_id, enum rte_bbdev_event_type event, * - EINVAL if invalid parameter pointer is provided * - EAGAIN if the provided callback pointer does not exist */ -int +int __rte_experimental rte_bbdev_callback_unregister(uint16_t dev_id, enum rte_bbdev_event_type event, rte_bbdev_cb_fn cb_fn, void *cb_arg); @@ -661,7 +662,7 @@ rte_bbdev_callback_unregister(uint16_t dev_id, enum rte_bbdev_event_type event, * - 0 on success * - negative value on failure - as returned from PMD driver */ -int +int __rte_experimental rte_bbdev_queue_intr_enable(uint16_t dev_id, uint16_t queue_id); /** @@ -677,7 +678,7 @@ rte_bbdev_queue_intr_enable(uint16_t dev_id, uint16_t queue_id); * - 0 on success * - negative value on failure - as returned from PMD driver */ -int +int __rte_experimental rte_bbdev_queue_intr_disable(uint16_t dev_id, uint16_t queue_id); /** @@ -704,7 +705,7 @@ rte_bbdev_queue_intr_disable(uint16_t dev_id, uint16_t queue_id); * - ENOTSUP if interrupts are not supported by the identified device * - negative value on failure - as returned from PMD driver */ -int +int __rte_experimental rte_bbdev_queue_intr_ctl(uint16_t dev_id, uint16_t queue_id, int epfd, int op, void *data); diff --git a/lib/librte_bbdev/rte_bbdev_pmd.h b/lib/librte_bbdev/rte_bbdev_pmd.h index 7d1b240d17..db9a04cdf9 100644 --- a/lib/librte_bbdev/rte_bbdev_pmd.h +++ b/lib/librte_bbdev/rte_bbdev_pmd.h @@ -43,7 +43,7 @@ extern "C" { * @return * - Slot in the rte_bbdev array for a new device; */ -struct rte_bbdev * +struct rte_bbdev * __rte_experimental rte_bbdev_allocate(const char *name); /** @@ -55,7 +55,7 @@ rte_bbdev_allocate(const char *name); * @return * - 0 on success, negative on error */ -int +int __rte_experimental rte_bbdev_release(struct rte_bbdev *bbdev); /** @@ -69,7 +69,7 @@ rte_bbdev_release(struct rte_bbdev *bbdev); * - NULL otherwise * */ -struct rte_bbdev * +struct rte_bbdev * __rte_experimental rte_bbdev_get_named_dev(const char *name); /** @@ -187,7 +187,7 @@ struct rte_bbdev_ops { * @param ret_param * To pass data back to user application. */ -void +void __rte_experimental rte_bbdev_pmd_callback_process(struct rte_bbdev *dev, enum rte_bbdev_event_type event, void *ret_param); diff --git a/lib/librte_eal/bsdapp/eal/eal.c b/lib/librte_eal/bsdapp/eal/eal.c index 3ca7c7d7a9..0bac6cf4d1 100644 --- a/lib/librte_eal/bsdapp/eal/eal.c +++ b/lib/librte_eal/bsdapp/eal/eal.c @@ -48,6 +48,7 @@ #include #include +#include #include #include #include @@ -709,7 +710,8 @@ rte_eal_init(int argc, char **argv) return fctret; } -int rte_eal_cleanup(void) +int __rte_experimental +rte_eal_cleanup(void) { rte_service_finalize(); return 0; diff --git a/lib/librte_eal/common/eal_common_dev.c b/lib/librte_eal/common/eal_common_dev.c index dda8f58352..0de1c5d628 100644 --- a/lib/librte_eal/common/eal_common_dev.c +++ b/lib/librte_eal/common/eal_common_dev.c @@ -37,6 +37,7 @@ #include #include +#include #include #include #include @@ -133,7 +134,7 @@ full_dev_name(const char *bus, const char *dev, const char *args) return name; } -int rte_eal_hotplug_add(const char *busname, const char *devname, +int __rte_experimental rte_eal_hotplug_add(const char *busname, const char *devname, const char *devargs) { struct rte_bus *bus; @@ -203,7 +204,8 @@ err_name: return ret; } -int rte_eal_hotplug_remove(const char *busname, const char *devname) +int __rte_experimental +rte_eal_hotplug_remove(const char *busname, const char *devname) { struct rte_bus *bus; struct rte_device *dev; diff --git a/lib/librte_eal/common/eal_common_devargs.c b/lib/librte_eal/common/eal_common_devargs.c index 6ac88d6ab7..3db07ee999 100644 --- a/lib/librte_eal/common/eal_common_devargs.c +++ b/lib/librte_eal/common/eal_common_devargs.c @@ -40,6 +40,7 @@ #include #include +#include #include #include #include @@ -85,7 +86,7 @@ bus_name_cmp(const struct rte_bus *bus, const void *name) return strncmp(bus->name, name, strlen(bus->name)); } -int +int __rte_experimental rte_eal_devargs_parse(const char *dev, struct rte_devargs *da) { struct rte_bus *bus = NULL; @@ -139,7 +140,7 @@ rte_eal_devargs_parse(const char *dev, struct rte_devargs *da) return 0; } -int +int __rte_experimental rte_eal_devargs_insert(struct rte_devargs *da) { int ret; @@ -188,7 +189,7 @@ fail: return -1; } -int +int __rte_experimental rte_eal_devargs_remove(const char *busname, const char *devname) { struct rte_devargs *d; diff --git a/lib/librte_eal/common/include/rte_dev.h b/lib/librte_eal/common/include/rte_dev.h index 8088dcc538..d1598fdedb 100644 --- a/lib/librte_eal/common/include/rte_dev.h +++ b/lib/librte_eal/common/include/rte_dev.h @@ -50,6 +50,7 @@ extern "C" { #include #include +#include #include __attribute__((format(printf, 2, 0))) @@ -210,7 +211,7 @@ int rte_eal_dev_detach(struct rte_device *dev); * @return * 0 on success, negative on error. */ -int rte_eal_hotplug_add(const char *busname, const char *devname, +int __rte_experimental rte_eal_hotplug_add(const char *busname, const char *devname, const char *devargs); /** @@ -226,7 +227,8 @@ int rte_eal_hotplug_add(const char *busname, const char *devname, * @return * 0 on success, negative on error. */ -int rte_eal_hotplug_remove(const char *busname, const char *devname); +int __rte_experimental rte_eal_hotplug_remove(const char *busname, + const char *devname); /** * Device comparison function. diff --git a/lib/librte_eal/common/include/rte_devargs.h b/lib/librte_eal/common/include/rte_devargs.h index 58d585df62..e7579f82a2 100644 --- a/lib/librte_eal/common/include/rte_devargs.h +++ b/lib/librte_eal/common/include/rte_devargs.h @@ -50,6 +50,7 @@ extern "C" { #include #include +#include #include /** @@ -136,7 +137,7 @@ int rte_eal_parse_devargs_str(const char *devargs_str, * - 0 on success. * - Negative errno on error. */ -int +int __rte_experimental rte_eal_devargs_parse(const char *dev, struct rte_devargs *da); @@ -150,7 +151,7 @@ rte_eal_devargs_parse(const char *dev, * - 0 on success * - Negative on error. */ -int +int __rte_experimental rte_eal_devargs_insert(struct rte_devargs *da); /** @@ -193,7 +194,8 @@ int rte_eal_devargs_add(enum rte_devtype devtype, const char *devargs_str); * <0 on error. * >0 if the devargs was not within the user device list. */ -int rte_eal_devargs_remove(const char *busname, const char *devname); +int __rte_experimental rte_eal_devargs_remove(const char *busname, + const char *devname); /** * Count the number of user devices of a specified type diff --git a/lib/librte_eal/common/include/rte_eal.h b/lib/librte_eal/common/include/rte_eal.h index 8b36feabcb..1f37c7a54e 100644 --- a/lib/librte_eal/common/include/rte_eal.h +++ b/lib/librte_eal/common/include/rte_eal.h @@ -15,6 +15,7 @@ #include #include +#include #include #include @@ -183,7 +184,7 @@ int rte_eal_init(int argc, char **argv); * @return 0 Successfully released all internal EAL resources * @return -EFAULT There was an error in releasing all resources. */ -int rte_eal_cleanup(void); +int __rte_experimental rte_eal_cleanup(void); /** * Check if a primary process is currently alive diff --git a/lib/librte_eal/common/include/rte_service.h b/lib/librte_eal/common/include/rte_service.h index 02b1512f64..211eb376d5 100644 --- a/lib/librte_eal/common/include/rte_service.h +++ b/lib/librte_eal/common/include/rte_service.h @@ -57,7 +57,7 @@ extern "C" { * * @return The number of services registered. */ -uint32_t rte_service_get_count(void); +uint32_t __rte_experimental rte_service_get_count(void); /** * @warning @@ -84,7 +84,8 @@ uint32_t rte_service_get_count(void); * @retval -EINVAL Null *service_id* pointer provided * @retval -ENODEV No such service registered */ -int32_t rte_service_get_by_name(const char *name, uint32_t *service_id); +int32_t __rte_experimental rte_service_get_by_name(const char *name, + uint32_t *service_id); /** * @warning @@ -95,7 +96,7 @@ int32_t rte_service_get_by_name(const char *name, uint32_t *service_id); * @return A pointer to the name of the service. The returned pointer remains * in ownership of the service, and the application must not free it. */ -const char *rte_service_get_name(uint32_t id); +const char __rte_experimental *rte_service_get_name(uint32_t id); /** * @warning @@ -108,7 +109,8 @@ const char *rte_service_get_name(uint32_t id); * @retval 1 Capability supported by this service instance * @retval 0 Capability not supported by this service instance */ -int32_t rte_service_probe_capability(uint32_t id, uint32_t capability); +int32_t __rte_experimental rte_service_probe_capability(uint32_t id, + uint32_t capability); /** * @warning @@ -132,8 +134,8 @@ int32_t rte_service_probe_capability(uint32_t id, uint32_t capability); * @retval 0 lcore map updated successfully * @retval -EINVAL An invalid service or lcore was provided. */ -int32_t rte_service_map_lcore_set(uint32_t service_id, uint32_t lcore, - uint32_t enable); +int32_t __rte_experimental rte_service_map_lcore_set(uint32_t service_id, + uint32_t lcore, uint32_t enable); /** * @warning @@ -148,7 +150,8 @@ int32_t rte_service_map_lcore_set(uint32_t service_id, uint32_t lcore, * @retval 0 lcore is not mapped to service * @retval -EINVAL An invalid service or lcore was provided. */ -int32_t rte_service_map_lcore_get(uint32_t service_id, uint32_t lcore); +int32_t __rte_experimental rte_service_map_lcore_get(uint32_t service_id, + uint32_t lcore); /** * @warning @@ -165,7 +168,7 @@ int32_t rte_service_map_lcore_get(uint32_t service_id, uint32_t lcore); * @retval 0 The service was successfully started * @retval -EINVAL Invalid service id */ -int32_t rte_service_runstate_set(uint32_t id, uint32_t runstate); +int32_t __rte_experimental rte_service_runstate_set(uint32_t id, uint32_t runstate); /** * @warning @@ -183,7 +186,7 @@ int32_t rte_service_runstate_set(uint32_t id, uint32_t runstate); * @retval 0 Service is stopped * @retval -EINVAL Invalid service id */ -int32_t rte_service_runstate_get(uint32_t id); +int32_t __rte_experimental rte_service_runstate_get(uint32_t id); /** * @warning @@ -199,7 +202,8 @@ int32_t rte_service_runstate_get(uint32_t id); * @retval 0 Success * @retval -EINVAL Invalid service ID */ -int32_t rte_service_set_runstate_mapped_check(uint32_t id, int32_t enable); +int32_t __rte_experimental rte_service_set_runstate_mapped_check(uint32_t id, + int32_t enable); /** * @warning @@ -237,7 +241,7 @@ int32_t rte_service_set_runstate_mapped_check(uint32_t id, int32_t enable); * @retval -ENOEXEC Service is not in a run-able state * @retval -EINVAL Invalid service id */ -int32_t rte_service_run_iter_on_app_lcore(uint32_t id, +int32_t __rte_experimental rte_service_run_iter_on_app_lcore(uint32_t id, uint32_t serialize_multithread_unsafe); /** @@ -255,7 +259,7 @@ int32_t rte_service_run_iter_on_app_lcore(uint32_t id, * @retval -EINVAL Failed to start core. The *lcore_id* passed in is not * currently assigned to be a service core. */ -int32_t rte_service_lcore_start(uint32_t lcore_id); +int32_t __rte_experimental rte_service_lcore_start(uint32_t lcore_id); /** * @warning @@ -274,7 +278,7 @@ int32_t rte_service_lcore_start(uint32_t lcore_id); * The application must stop the service first, and then stop the * lcore. */ -int32_t rte_service_lcore_stop(uint32_t lcore_id); +int32_t __rte_experimental rte_service_lcore_stop(uint32_t lcore_id); /** * @warning @@ -290,7 +294,7 @@ int32_t rte_service_lcore_stop(uint32_t lcore_id); * @retval -EALREADY lcore is already added to the service core list * @retval -EINVAL Invalid lcore provided */ -int32_t rte_service_lcore_add(uint32_t lcore); +int32_t __rte_experimental rte_service_lcore_add(uint32_t lcore); /** * @warning @@ -304,7 +308,7 @@ int32_t rte_service_lcore_add(uint32_t lcore); * @retval -EBUSY Lcore is not stopped, stop service core before removing. * @retval -EINVAL failed to add lcore to service core mask. */ -int32_t rte_service_lcore_del(uint32_t lcore); +int32_t __rte_experimental rte_service_lcore_del(uint32_t lcore); /** * @warning @@ -321,7 +325,7 @@ int32_t rte_service_lcore_del(uint32_t lcore); * * @return The number of service cores currently configured. */ -int32_t rte_service_lcore_count(void); +int32_t __rte_experimental rte_service_lcore_count(void); /** * @warning @@ -333,7 +337,7 @@ int32_t rte_service_lcore_count(void); * * @retval 0 Success */ -int32_t rte_service_lcore_reset_all(void); +int32_t __rte_experimental rte_service_lcore_reset_all(void); /** * @warning @@ -347,7 +351,8 @@ int32_t rte_service_lcore_reset_all(void); * @retval 0 Success * @retval -EINVAL Invalid service pointer passed */ -int32_t rte_service_set_stats_enable(uint32_t id, int32_t enable); +int32_t __rte_experimental rte_service_set_stats_enable(uint32_t id, + int32_t enable); /** * @warning @@ -368,7 +373,7 @@ int32_t rte_service_set_stats_enable(uint32_t id, int32_t enable); * service core list. No items have been populated, call this function * with a size of at least *rte_service_core_count* items. */ -int32_t rte_service_lcore_list(uint32_t array[], uint32_t n); +int32_t __rte_experimental rte_service_lcore_list(uint32_t array[], uint32_t n); /** * @warning @@ -381,7 +386,7 @@ int32_t rte_service_lcore_list(uint32_t array[], uint32_t n); * @retval -EINVAL Invalid lcore provided * @retval -ENOTSUP The provided lcore is not a service core. */ -int32_t rte_service_lcore_count_services(uint32_t lcore); +int32_t __rte_experimental rte_service_lcore_count_services(uint32_t lcore); /** * @warning @@ -393,7 +398,7 @@ int32_t rte_service_lcore_count_services(uint32_t lcore); * @retval 0 Statistics have been successfully dumped * @retval -EINVAL Invalid service id provided */ -int32_t rte_service_dump(FILE *f, uint32_t id); +int32_t __rte_experimental rte_service_dump(FILE *f, uint32_t id); /** * Returns the number of cycles that this service has consumed @@ -414,8 +419,8 @@ int32_t rte_service_dump(FILE *f, uint32_t id); * @retval 0 Success, the attribute value has been written to *attr_value*. * -EINVAL Invalid id, attr_id or attr_value was NULL. */ -int32_t rte_service_attr_get(uint32_t id, uint32_t attr_id, - uint32_t *attr_value); +int32_t __rte_experimental rte_service_attr_get(uint32_t id, uint32_t attr_id, + uint32_t *attr_value); /** * @warning @@ -427,7 +432,7 @@ int32_t rte_service_attr_get(uint32_t id, uint32_t attr_id, * @retval 0 Successfully reset attributes * -EINVAL Invalid service id provided */ -int32_t rte_service_attr_reset_all(uint32_t id); +int32_t __rte_experimental rte_service_attr_reset_all(uint32_t id); #ifdef __cplusplus } diff --git a/lib/librte_eal/common/include/rte_service_component.h b/lib/librte_eal/common/include/rte_service_component.h index f881ac0771..9ba4aa294f 100644 --- a/lib/librte_eal/common/include/rte_service_component.h +++ b/lib/librte_eal/common/include/rte_service_component.h @@ -9,7 +9,7 @@ * Include this file if you are writing a component that requires CPU cycles to * operate, and you wish to run the component using service cores */ - +#include #include /** @@ -73,8 +73,9 @@ struct rte_service_spec { * -EINVAL Attempted to register an invalid service (eg, no callback * set) */ -int32_t rte_service_component_register(const struct rte_service_spec *spec, - uint32_t *service_id); +int32_t __rte_experimental +rte_service_component_register(const struct rte_service_spec *spec, + uint32_t *service_id); /** * @warning @@ -88,7 +89,7 @@ int32_t rte_service_component_register(const struct rte_service_spec *spec, * @retval -EBUSY The service is currently running, stop the service before * calling unregister. No action has been taken. */ -int32_t rte_service_component_unregister(uint32_t id); +int32_t __rte_experimental rte_service_component_unregister(uint32_t id); /** * @warning @@ -106,7 +107,7 @@ int32_t rte_service_component_unregister(uint32_t id); * @retval -ENODEV Error in enabling service lcore on a service * @retval -ENOEXEC Error when starting services */ -int32_t rte_service_start_with_defaults(void); +int32_t __rte_experimental rte_service_start_with_defaults(void); /** * @warning @@ -123,7 +124,8 @@ int32_t rte_service_start_with_defaults(void); * * @retval 0 Success */ -int32_t rte_service_component_runstate_set(uint32_t id, uint32_t runstate); +int32_t __rte_experimental rte_service_component_runstate_set(uint32_t id, + uint32_t runstate); /** * @warning @@ -148,6 +150,6 @@ int32_t rte_service_init(void); * * @retval None */ -void rte_service_finalize(void); +void __rte_experimental rte_service_finalize(void); #endif /* _RTE_SERVICE_PRIVATE_H_ */ diff --git a/lib/librte_eal/common/rte_service.c b/lib/librte_eal/common/rte_service.c index bcd644a8a4..be9b5e6dcb 100644 --- a/lib/librte_eal/common/rte_service.c +++ b/lib/librte_eal/common/rte_service.c @@ -9,6 +9,7 @@ #include #include +#include #include #include "include/rte_service_component.h" @@ -114,7 +115,8 @@ fail_mem: return -ENOMEM; } -void rte_service_finalize(void) +void __rte_experimental +rte_service_finalize(void) { if (!rte_service_library_initialized) return; @@ -159,7 +161,8 @@ service_mt_safe(struct rte_service_spec_impl *s) return !!(s->spec.capabilities & RTE_SERVICE_CAP_MT_SAFE); } -int32_t rte_service_set_stats_enable(uint32_t id, int32_t enabled) +int32_t __rte_experimental +rte_service_set_stats_enable(uint32_t id, int32_t enabled) { struct rte_service_spec_impl *s; SERVICE_VALID_GET_OR_ERR_RET(id, s, 0); @@ -172,7 +175,8 @@ int32_t rte_service_set_stats_enable(uint32_t id, int32_t enabled) return 0; } -int32_t rte_service_set_runstate_mapped_check(uint32_t id, int32_t enabled) +int32_t __rte_experimental +rte_service_set_runstate_mapped_check(uint32_t id, int32_t enabled) { struct rte_service_spec_impl *s; SERVICE_VALID_GET_OR_ERR_RET(id, s, 0); @@ -185,13 +189,14 @@ int32_t rte_service_set_runstate_mapped_check(uint32_t id, int32_t enabled) return 0; } -uint32_t +uint32_t __rte_experimental rte_service_get_count(void) { return rte_service_count; } -int32_t rte_service_get_by_name(const char *name, uint32_t *service_id) +int32_t __rte_experimental +rte_service_get_by_name(const char *name, uint32_t *service_id) { if (!service_id) return -EINVAL; @@ -208,7 +213,7 @@ int32_t rte_service_get_by_name(const char *name, uint32_t *service_id) return -ENODEV; } -const char * +const char * __rte_experimental rte_service_get_name(uint32_t id) { struct rte_service_spec_impl *s; @@ -216,7 +221,7 @@ rte_service_get_name(uint32_t id) return s->spec.name; } -int32_t +int32_t __rte_experimental rte_service_probe_capability(uint32_t id, uint32_t capability) { struct rte_service_spec_impl *s; @@ -224,7 +229,7 @@ rte_service_probe_capability(uint32_t id, uint32_t capability) return !!(s->spec.capabilities & capability); } -int32_t +int32_t __rte_experimental rte_service_component_register(const struct rte_service_spec *spec, uint32_t *id_ptr) { @@ -257,7 +262,7 @@ rte_service_component_register(const struct rte_service_spec *spec, return 0; } -int32_t +int32_t __rte_experimental rte_service_component_unregister(uint32_t id) { uint32_t i; @@ -278,7 +283,7 @@ rte_service_component_unregister(uint32_t id) return 0; } -int32_t +int32_t __rte_experimental rte_service_component_runstate_set(uint32_t id, uint32_t runstate) { struct rte_service_spec_impl *s; @@ -293,7 +298,7 @@ rte_service_component_runstate_set(uint32_t id, uint32_t runstate) return 0; } -int32_t +int32_t __rte_experimental rte_service_runstate_set(uint32_t id, uint32_t runstate) { struct rte_service_spec_impl *s; @@ -308,7 +313,7 @@ rte_service_runstate_set(uint32_t id, uint32_t runstate) return 0; } -int32_t +int32_t __rte_experimental rte_service_runstate_get(uint32_t id) { struct rte_service_spec_impl *s; @@ -369,7 +374,7 @@ service_run(uint32_t i, struct core_state *cs, uint64_t service_mask) return 0; } -int32_t rte_service_run_iter_on_app_lcore(uint32_t id, +int32_t __rte_experimental rte_service_run_iter_on_app_lcore(uint32_t id, uint32_t serialize_mt_unsafe) { /* run service on calling core, using all-ones as the service mask */ @@ -425,7 +430,7 @@ rte_service_runner_func(void *arg) return 0; } -int32_t +int32_t __rte_experimental rte_service_lcore_count(void) { int32_t count = 0; @@ -435,7 +440,7 @@ rte_service_lcore_count(void) return count; } -int32_t +int32_t __rte_experimental rte_service_lcore_list(uint32_t array[], uint32_t n) { uint32_t count = rte_service_lcore_count(); @@ -458,7 +463,7 @@ rte_service_lcore_list(uint32_t array[], uint32_t n) return count; } -int32_t +int32_t __rte_experimental rte_service_lcore_count_services(uint32_t lcore) { if (lcore >= RTE_MAX_LCORE) @@ -471,7 +476,7 @@ rte_service_lcore_count_services(uint32_t lcore) return __builtin_popcountll(cs->service_mask); } -int32_t +int32_t __rte_experimental rte_service_start_with_defaults(void) { /* create a default mapping from cores to services, then start the @@ -557,7 +562,7 @@ service_update(struct rte_service_spec *service, uint32_t lcore, return 0; } -int32_t +int32_t __rte_experimental rte_service_map_lcore_set(uint32_t id, uint32_t lcore, uint32_t enabled) { struct rte_service_spec_impl *s; @@ -566,7 +571,7 @@ rte_service_map_lcore_set(uint32_t id, uint32_t lcore, uint32_t enabled) return service_update(&s->spec, lcore, &on, 0); } -int32_t +int32_t __rte_experimental rte_service_map_lcore_get(uint32_t id, uint32_t lcore) { struct rte_service_spec_impl *s; @@ -592,7 +597,8 @@ set_lcore_state(uint32_t lcore, int32_t state) lcore_states[lcore].is_service_core = (state == ROLE_SERVICE); } -int32_t rte_service_lcore_reset_all(void) +int32_t __rte_experimental +rte_service_lcore_reset_all(void) { /* loop over cores, reset all to mask 0 */ uint32_t i; @@ -611,7 +617,7 @@ int32_t rte_service_lcore_reset_all(void) return 0; } -int32_t +int32_t __rte_experimental rte_service_lcore_add(uint32_t lcore) { if (lcore >= RTE_MAX_LCORE) @@ -630,7 +636,7 @@ rte_service_lcore_add(uint32_t lcore) return rte_eal_wait_lcore(lcore); } -int32_t +int32_t __rte_experimental rte_service_lcore_del(uint32_t lcore) { if (lcore >= RTE_MAX_LCORE) @@ -649,7 +655,7 @@ rte_service_lcore_del(uint32_t lcore) return 0; } -int32_t +int32_t __rte_experimental rte_service_lcore_start(uint32_t lcore) { if (lcore >= RTE_MAX_LCORE) @@ -672,7 +678,7 @@ rte_service_lcore_start(uint32_t lcore) return ret; } -int32_t +int32_t __rte_experimental rte_service_lcore_stop(uint32_t lcore) { if (lcore >= RTE_MAX_LCORE) @@ -702,7 +708,7 @@ rte_service_lcore_stop(uint32_t lcore) return 0; } -int32_t +int32_t __rte_experimental rte_service_attr_get(uint32_t id, uint32_t attr_id, uint32_t *attr_value) { struct rte_service_spec_impl *s; @@ -747,7 +753,7 @@ rte_service_dump_one(FILE *f, struct rte_service_spec_impl *s, s->cycles_spent, s->cycles_spent / calls); } -int32_t +int32_t __rte_experimental rte_service_attr_reset_all(uint32_t id) { struct rte_service_spec_impl *s; @@ -775,7 +781,7 @@ service_dump_calls_per_lcore(FILE *f, uint32_t lcore, uint32_t reset) fprintf(f, "\n"); } -int32_t rte_service_dump(FILE *f, uint32_t id) +int32_t __rte_experimental rte_service_dump(FILE *f, uint32_t id) { uint32_t i; int print_one = (id != UINT32_MAX); diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c index 5f9032c575..828baacd8e 100644 --- a/lib/librte_eal/linuxapp/eal/eal.c +++ b/lib/librte_eal/linuxapp/eal/eal.c @@ -53,6 +53,7 @@ #include #endif +#include #include #include #include @@ -974,7 +975,8 @@ rte_eal_init(int argc, char **argv) return fctret; } -int rte_eal_cleanup(void) +int __rte_experimental +rte_eal_cleanup(void) { rte_service_finalize(); return 0; diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c index f285ba2789..e9a999d835 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -815,7 +815,7 @@ rte_eth_convert_rx_offloads(const uint64_t rx_offloads, rxmode->security = 0; } -const char * +const char * __rte_experimental rte_eth_dev_rx_offload_name(uint64_t offload) { const char *name = "UNKNOWN"; @@ -831,7 +831,7 @@ rte_eth_dev_rx_offload_name(uint64_t offload) return name; } -const char * +const char * __rte_experimental rte_eth_dev_tx_offload_name(uint64_t offload) { const char *name = "UNKNOWN"; @@ -1194,7 +1194,7 @@ rte_eth_dev_reset(uint16_t port_id) return eth_err(port_id, ret); } -int +int __rte_experimental rte_eth_dev_is_removed(uint16_t port_id) { struct rte_eth_dev *dev; diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h index ccf4a15f26..96ba227940 100644 --- a/lib/librte_ether/rte_ethdev.h +++ b/lib/librte_ether/rte_ethdev.h @@ -146,6 +146,7 @@ extern "C" { /* Use this macro to check if LRO API is supported */ #define RTE_ETHDEV_HAS_LRO_SUPPORT +#include #include #include #include @@ -1313,7 +1314,7 @@ uint32_t rte_eth_speed_bitflag(uint32_t speed, int duplex); * @return * Offload name or 'UNKNOWN' if the flag cannot be recognised. */ -const char *rte_eth_dev_rx_offload_name(uint64_t offload); +const char * __rte_experimental rte_eth_dev_rx_offload_name(uint64_t offload); /** * @warning @@ -1326,7 +1327,7 @@ const char *rte_eth_dev_rx_offload_name(uint64_t offload); * @return * Offload name or 'UNKNOWN' if the flag cannot be recognised. */ -const char *rte_eth_dev_tx_offload_name(uint64_t offload); +const char * __rte_experimental rte_eth_dev_tx_offload_name(uint64_t offload); /** * Configure an Ethernet device. @@ -1374,7 +1375,7 @@ int rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_queue, * @return * 1 when the Ethernet device is removed, otherwise 0. */ -int +int __rte_experimental rte_eth_dev_is_removed(uint16_t port_id); /** diff --git a/lib/librte_ether/rte_mtr.c b/lib/librte_ether/rte_mtr.c index a80f19a5bb..1046cb5fd8 100644 --- a/lib/librte_ether/rte_mtr.c +++ b/lib/librte_ether/rte_mtr.c @@ -5,6 +5,7 @@ #include #include +#include "rte_compat.h" #include "rte_ethdev.h" #include "rte_mtr_driver.h" #include "rte_mtr.h" @@ -57,7 +58,7 @@ rte_mtr_ops_get(uint16_t port_id, struct rte_mtr_error *error) }) /* MTR capabilities get */ -int +int __rte_experimental rte_mtr_capabilities_get(uint16_t port_id, struct rte_mtr_capabilities *cap, struct rte_mtr_error *error) @@ -68,7 +69,7 @@ rte_mtr_capabilities_get(uint16_t port_id, } /* MTR meter profile add */ -int +int __rte_experimental rte_mtr_meter_profile_add(uint16_t port_id, uint32_t meter_profile_id, struct rte_mtr_meter_profile *profile, @@ -80,7 +81,7 @@ rte_mtr_meter_profile_add(uint16_t port_id, } /** MTR meter profile delete */ -int +int __rte_experimental rte_mtr_meter_profile_delete(uint16_t port_id, uint32_t meter_profile_id, struct rte_mtr_error *error) @@ -91,7 +92,7 @@ rte_mtr_meter_profile_delete(uint16_t port_id, } /** MTR object create */ -int +int __rte_experimental rte_mtr_create(uint16_t port_id, uint32_t mtr_id, struct rte_mtr_params *params, @@ -104,7 +105,7 @@ rte_mtr_create(uint16_t port_id, } /** MTR object destroy */ -int +int __rte_experimental rte_mtr_destroy(uint16_t port_id, uint32_t mtr_id, struct rte_mtr_error *error) @@ -115,7 +116,7 @@ rte_mtr_destroy(uint16_t port_id, } /** MTR object meter enable */ -int +int __rte_experimental rte_mtr_meter_enable(uint16_t port_id, uint32_t mtr_id, struct rte_mtr_error *error) @@ -126,7 +127,7 @@ rte_mtr_meter_enable(uint16_t port_id, } /** MTR object meter disable */ -int +int __rte_experimental rte_mtr_meter_disable(uint16_t port_id, uint32_t mtr_id, struct rte_mtr_error *error) @@ -137,7 +138,7 @@ rte_mtr_meter_disable(uint16_t port_id, } /** MTR object meter profile update */ -int +int __rte_experimental rte_mtr_meter_profile_update(uint16_t port_id, uint32_t mtr_id, uint32_t meter_profile_id, @@ -149,7 +150,7 @@ rte_mtr_meter_profile_update(uint16_t port_id, } /** MTR object meter DSCP table update */ -int +int __rte_experimental rte_mtr_meter_dscp_table_update(uint16_t port_id, uint32_t mtr_id, enum rte_mtr_color *dscp_table, @@ -161,7 +162,7 @@ rte_mtr_meter_dscp_table_update(uint16_t port_id, } /** MTR object policer action update */ -int +int __rte_experimental rte_mtr_policer_actions_update(uint16_t port_id, uint32_t mtr_id, uint32_t action_mask, @@ -174,7 +175,7 @@ rte_mtr_policer_actions_update(uint16_t port_id, } /** MTR object enabled stats update */ -int +int __rte_experimental rte_mtr_stats_update(uint16_t port_id, uint32_t mtr_id, uint64_t stats_mask, @@ -186,7 +187,7 @@ rte_mtr_stats_update(uint16_t port_id, } /** MTR object stats read */ -int +int __rte_experimental rte_mtr_stats_read(uint16_t port_id, uint32_t mtr_id, struct rte_mtr_stats *stats, diff --git a/lib/librte_ether/rte_mtr.h b/lib/librte_ether/rte_mtr.h index f6b6ef3b60..c4819b274a 100644 --- a/lib/librte_ether/rte_mtr.h +++ b/lib/librte_ether/rte_mtr.h @@ -74,7 +74,7 @@ * @b EXPERIMENTAL: this API may change without prior notice */ #include - +#include #include #ifdef __cplusplus @@ -447,7 +447,7 @@ struct rte_mtr_error { * @return * 0 on success, non-zero error code otherwise. */ -int +int __rte_experimental rte_mtr_capabilities_get(uint16_t port_id, struct rte_mtr_capabilities *cap, struct rte_mtr_error *error); @@ -470,7 +470,7 @@ rte_mtr_capabilities_get(uint16_t port_id, * @return * 0 on success, non-zero error code otherwise. */ -int +int __rte_experimental rte_mtr_meter_profile_add(uint16_t port_id, uint32_t meter_profile_id, struct rte_mtr_meter_profile *profile, @@ -491,7 +491,7 @@ rte_mtr_meter_profile_add(uint16_t port_id, * @return * 0 on success, non-zero error code otherwise. */ -int +int __rte_experimental rte_mtr_meter_profile_delete(uint16_t port_id, uint32_t meter_profile_id, struct rte_mtr_error *error); @@ -519,7 +519,7 @@ rte_mtr_meter_profile_delete(uint16_t port_id, * * @see enum rte_flow_action_type::RTE_FLOW_ACTION_TYPE_METER */ -int +int __rte_experimental rte_mtr_create(uint16_t port_id, uint32_t mtr_id, struct rte_mtr_params *params, @@ -542,7 +542,7 @@ rte_mtr_create(uint16_t port_id, * @return * 0 on success, non-zero error code otherwise. */ -int +int __rte_experimental rte_mtr_destroy(uint16_t port_id, uint32_t mtr_id, struct rte_mtr_error *error); @@ -569,7 +569,7 @@ rte_mtr_destroy(uint16_t port_id, * @return * 0 on success, non-zero error code otherwise. */ -int +int __rte_experimental rte_mtr_meter_disable(uint16_t port_id, uint32_t mtr_id, struct rte_mtr_error *error); @@ -590,7 +590,7 @@ rte_mtr_meter_disable(uint16_t port_id, * @return * 0 on success, non-zero error code otherwise. */ -int +int __rte_experimental rte_mtr_meter_enable(uint16_t port_id, uint32_t mtr_id, struct rte_mtr_error *error); @@ -609,7 +609,7 @@ rte_mtr_meter_enable(uint16_t port_id, * @return * 0 on success, non-zero error code otherwise. */ -int +int __rte_experimental rte_mtr_meter_profile_update(uint16_t port_id, uint32_t mtr_id, uint32_t meter_profile_id, @@ -633,7 +633,7 @@ rte_mtr_meter_profile_update(uint16_t port_id, * @return * 0 on success, non-zero error code otherwise. */ -int +int __rte_experimental rte_mtr_meter_dscp_table_update(uint16_t port_id, uint32_t mtr_id, enum rte_mtr_color *dscp_table, @@ -659,7 +659,7 @@ rte_mtr_meter_dscp_table_update(uint16_t port_id, * @return * 0 on success, non-zero error code otherwise. */ -int +int __rte_experimental rte_mtr_policer_actions_update(uint16_t port_id, uint32_t mtr_id, uint32_t action_mask, @@ -684,7 +684,7 @@ rte_mtr_policer_actions_update(uint16_t port_id, * * @see enum rte_mtr_stats_type */ -int +int __rte_experimental rte_mtr_stats_update(uint16_t port_id, uint32_t mtr_id, uint64_t stats_mask, @@ -715,7 +715,7 @@ rte_mtr_stats_update(uint16_t port_id, * * @see enum rte_mtr_stats_type */ -int +int __rte_experimental rte_mtr_stats_read(uint16_t port_id, uint32_t mtr_id, struct rte_mtr_stats *stats, diff --git a/lib/librte_flow_classify/rte_flow_classify.c b/lib/librte_flow_classify/rte_flow_classify.c index 55492a689d..7edb2f15ff 100644 --- a/lib/librte_flow_classify/rte_flow_classify.c +++ b/lib/librte_flow_classify/rte_flow_classify.c @@ -2,6 +2,7 @@ * Copyright(c) 2017 Intel Corporation */ +#include #include #include "rte_flow_classify_parse.h" #include @@ -87,7 +88,7 @@ struct rte_flow_classify_rule { void *entry_ptr; /* handle to the table entry for rule meta data */ }; -int +int __rte_experimental rte_flow_classify_validate( struct rte_flow_classifier *cls, const struct rte_flow_attr *attr, @@ -257,7 +258,7 @@ rte_flow_classifier_check_params(struct rte_flow_classifier_params *params) return 0; } -struct rte_flow_classifier * +struct rte_flow_classifier * __rte_experimental rte_flow_classifier_create(struct rte_flow_classifier_params *params) { struct rte_flow_classifier *cls; @@ -300,7 +301,7 @@ rte_flow_classify_table_free(struct rte_cls_table *table) table->ops.f_free(table->h_table); } -int +int __rte_experimental rte_flow_classifier_free(struct rte_flow_classifier *cls) { uint32_t i; @@ -372,7 +373,7 @@ rte_table_check_params(struct rte_flow_classifier *cls, return 0; } -int +int __rte_experimental rte_flow_classify_table_create(struct rte_flow_classifier *cls, struct rte_flow_classify_table_params *params) { @@ -482,7 +483,7 @@ allocate_acl_ipv4_5tuple_rule(struct rte_flow_classifier *cls) return rule; } -struct rte_flow_classify_rule * +struct rte_flow_classify_rule * __rte_experimental rte_flow_classify_table_entry_add(struct rte_flow_classifier *cls, const struct rte_flow_attr *attr, const struct rte_flow_item pattern[], @@ -564,7 +565,7 @@ rte_flow_classify_table_entry_add(struct rte_flow_classifier *cls, return NULL; } -int +int __rte_experimental rte_flow_classify_table_entry_delete(struct rte_flow_classifier *cls, struct rte_flow_classify_rule *rule) { @@ -644,7 +645,7 @@ action_apply(struct rte_flow_classifier *cls, return ret; } -int +int __rte_experimental rte_flow_classifier_query(struct rte_flow_classifier *cls, struct rte_mbuf **pkts, const uint16_t nb_pkts, diff --git a/lib/librte_flow_classify/rte_flow_classify.h b/lib/librte_flow_classify/rte_flow_classify.h index d76c235ca3..56e0635369 100644 --- a/lib/librte_flow_classify/rte_flow_classify.h +++ b/lib/librte_flow_classify/rte_flow_classify.h @@ -41,6 +41,7 @@ * with rte_flow_classifier_free() */ +#include #include #include #include @@ -154,7 +155,7 @@ struct rte_flow_classify_ipv4_5tuple_stats { * @return * Handle to flow classifier instance on success or NULL otherwise */ -struct rte_flow_classifier * +struct rte_flow_classifier * __rte_experimental rte_flow_classifier_create(struct rte_flow_classifier_params *params); /** @@ -165,7 +166,7 @@ rte_flow_classifier_create(struct rte_flow_classifier_params *params); * @return * 0 on success, error code otherwise */ -int +int __rte_experimental rte_flow_classifier_free(struct rte_flow_classifier *cls); /** @@ -178,7 +179,7 @@ rte_flow_classifier_free(struct rte_flow_classifier *cls); * @return * 0 on success, error code otherwise */ -int +int __rte_experimental rte_flow_classify_table_create(struct rte_flow_classifier *cls, struct rte_flow_classify_table_params *params); @@ -199,7 +200,7 @@ rte_flow_classify_table_create(struct rte_flow_classifier *cls, * @return * 0 on success, error code otherwise */ -int +int __rte_experimental rte_flow_classify_validate(struct rte_flow_classifier *cls, const struct rte_flow_attr *attr, const struct rte_flow_item pattern[], @@ -225,7 +226,7 @@ rte_flow_classify_validate(struct rte_flow_classifier *cls, * @return * A valid handle in case of success, NULL otherwise. */ -struct rte_flow_classify_rule * +struct rte_flow_classify_rule * __rte_experimental rte_flow_classify_table_entry_add(struct rte_flow_classifier *cls, const struct rte_flow_attr *attr, const struct rte_flow_item pattern[], @@ -243,7 +244,7 @@ rte_flow_classify_table_entry_add(struct rte_flow_classifier *cls, * @return * 0 on success, error code otherwise. */ -int +int __rte_experimental rte_flow_classify_table_entry_delete(struct rte_flow_classifier *cls, struct rte_flow_classify_rule *rule); @@ -264,7 +265,7 @@ rte_flow_classify_table_entry_delete(struct rte_flow_classifier *cls, * @return * 0 on success, error code otherwise. */ -int +int __rte_experimental rte_flow_classifier_query(struct rte_flow_classifier *cls, struct rte_mbuf **pkts, const uint16_t nb_pkts, diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c index a256b42eed..a3a10d8a67 100644 --- a/lib/librte_mbuf/rte_mbuf.c +++ b/lib/librte_mbuf/rte_mbuf.c @@ -42,6 +42,7 @@ #include #include +#include #include #include #include @@ -150,7 +151,7 @@ rte_pktmbuf_init(struct rte_mempool *mp, } /* Helper to create a mbuf pool with given mempool ops name*/ -struct rte_mempool * +struct rte_mempool * __rte_experimental rte_pktmbuf_pool_create_by_ops(const char *name, unsigned int n, unsigned int cache_size, uint16_t priv_size, uint16_t data_room_size, int socket_id, const char *ops_name) diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h index e559f6898d..9c0d9bc2b3 100644 --- a/lib/librte_mbuf/rte_mbuf.h +++ b/lib/librte_mbuf/rte_mbuf.h @@ -61,6 +61,7 @@ */ #include +#include #include #include #include @@ -1144,7 +1145,7 @@ rte_pktmbuf_pool_create(const char *name, unsigned n, * - EEXIST - a memzone with the same name already exists * - ENOMEM - no appropriate memory area found in which to create memzone */ -struct rte_mempool * +struct rte_mempool * __rte_experimental rte_pktmbuf_pool_create_by_ops(const char *name, unsigned int n, unsigned int cache_size, uint16_t priv_size, uint16_t data_room_size, int socket_id, const char *ops_name); diff --git a/lib/librte_mbuf/rte_mbuf_pool_ops.c b/lib/librte_mbuf/rte_mbuf_pool_ops.c index 9aa15411fd..385fc438f4 100644 --- a/lib/librte_mbuf/rte_mbuf_pool_ops.c +++ b/lib/librte_mbuf/rte_mbuf_pool_ops.c @@ -3,12 +3,13 @@ */ #include +#include #include #include #include #include -int +int __rte_experimental rte_mbuf_set_platform_mempool_ops(const char *ops_name) { const struct rte_memzone *mz; @@ -34,7 +35,7 @@ rte_mbuf_set_platform_mempool_ops(const char *ops_name) return -EEXIST; } -const char * +const char * __rte_experimental rte_mbuf_platform_mempool_ops(void) { const struct rte_memzone *mz; @@ -45,7 +46,7 @@ rte_mbuf_platform_mempool_ops(void) return mz->addr; } -int +int __rte_experimental rte_mbuf_set_user_mempool_ops(const char *ops_name) { const struct rte_memzone *mz; @@ -66,7 +67,7 @@ rte_mbuf_set_user_mempool_ops(const char *ops_name) } -const char * +const char * __rte_experimental rte_mbuf_user_mempool_ops(void) { const struct rte_memzone *mz; @@ -78,7 +79,7 @@ rte_mbuf_user_mempool_ops(void) } /* Return mbuf pool ops name */ -const char * +const char * __rte_experimental rte_mbuf_best_mempool_ops(void) { /* User defined mempool ops takes the priority */ diff --git a/lib/librte_mbuf/rte_mbuf_pool_ops.h b/lib/librte_mbuf/rte_mbuf_pool_ops.h index e8ee20fbfc..ebf5bf0f63 100644 --- a/lib/librte_mbuf/rte_mbuf_pool_ops.h +++ b/lib/librte_mbuf/rte_mbuf_pool_ops.h @@ -17,6 +17,8 @@ * @b EXPERIMENTAL: this API may change without prior notice */ +#include + #ifdef __cplusplus extern "C" { #endif @@ -32,7 +34,7 @@ extern "C" { * - On success, zero. * - On failure, a negative value. */ -int +int __rte_experimental rte_mbuf_set_platform_mempool_ops(const char *ops_name); /** @@ -44,7 +46,7 @@ rte_mbuf_set_platform_mempool_ops(const char *ops_name); * - On success, platform pool ops name. * - On failure, NULL. */ -const char * +const char * __rte_experimental rte_mbuf_platform_mempool_ops(void); /** @@ -58,7 +60,7 @@ rte_mbuf_platform_mempool_ops(void); * - On success, zero. * - On failure, a negative value. */ -int +int __rte_experimental rte_mbuf_set_user_mempool_ops(const char *ops_name); /** @@ -70,7 +72,7 @@ rte_mbuf_set_user_mempool_ops(const char *ops_name); * - On success, user pool ops name.. * - On failure, NULL. */ -const char * +const char * __rte_experimental rte_mbuf_user_mempool_ops(void); /** @@ -85,7 +87,7 @@ rte_mbuf_user_mempool_ops(void); * @return * returns preferred mbuf pool ops name */ -const char * +const char * __rte_experimental rte_mbuf_best_mempool_ops(void); diff --git a/lib/librte_net/rte_arp.c b/lib/librte_net/rte_arp.c index b953bcd7e4..f0ed9bd682 100644 --- a/lib/librte_net/rte_arp.c +++ b/lib/librte_net/rte_arp.c @@ -7,7 +7,7 @@ #include #define RARP_PKT_SIZE 64 -struct rte_mbuf * +struct rte_mbuf * __rte_experimental rte_net_make_rarp_packet(struct rte_mempool *mpool, const struct ether_addr *mac) { diff --git a/lib/librte_net/rte_arp.h b/lib/librte_net/rte_arp.h index 457a39b152..f20041e893 100644 --- a/lib/librte_net/rte_arp.h +++ b/lib/librte_net/rte_arp.h @@ -90,7 +90,7 @@ struct arp_hdr { * @return * - RARP packet pointer on success, or NULL on error */ -struct rte_mbuf * +struct rte_mbuf * __rte_experimental rte_net_make_rarp_packet(struct rte_mempool *mpool, const struct ether_addr *mac); diff --git a/lib/librte_security/rte_security.c b/lib/librte_security/rte_security.c index 6461dba053..3888fd4943 100644 --- a/lib/librte_security/rte_security.c +++ b/lib/librte_security/rte_security.c @@ -33,12 +33,12 @@ #include #include - +#include "rte_compat.h" #include "rte_security.h" #include "rte_security_driver.h" struct rte_security_session * -rte_security_session_create(struct rte_security_ctx *instance, +__rte_experimental rte_security_session_create(struct rte_security_ctx *instance, struct rte_security_session_conf *conf, struct rte_mempool *mp) { @@ -61,7 +61,7 @@ rte_security_session_create(struct rte_security_ctx *instance, return sess; } -int +int __rte_experimental rte_security_session_update(struct rte_security_ctx *instance, struct rte_security_session *sess, struct rte_security_session_conf *conf) @@ -70,14 +70,14 @@ rte_security_session_update(struct rte_security_ctx *instance, return instance->ops->session_update(instance->device, sess, conf); } -unsigned int +unsigned int __rte_experimental rte_security_session_get_size(struct rte_security_ctx *instance) { RTE_FUNC_PTR_OR_ERR_RET(*instance->ops->session_get_size, 0); return instance->ops->session_get_size(instance->device); } -int +int __rte_experimental rte_security_session_stats_get(struct rte_security_ctx *instance, struct rte_security_session *sess, struct rte_security_stats *stats) @@ -86,7 +86,7 @@ rte_security_session_stats_get(struct rte_security_ctx *instance, return instance->ops->session_stats_get(instance->device, sess, stats); } -int +int __rte_experimental rte_security_session_destroy(struct rte_security_ctx *instance, struct rte_security_session *sess) { @@ -105,7 +105,7 @@ rte_security_session_destroy(struct rte_security_ctx *instance, return ret; } -int +int __rte_experimental rte_security_set_pkt_metadata(struct rte_security_ctx *instance, struct rte_security_session *sess, struct rte_mbuf *m, void *params) @@ -115,7 +115,7 @@ rte_security_set_pkt_metadata(struct rte_security_ctx *instance, sess, m, params); } -void * +void * __rte_experimental rte_security_get_userdata(struct rte_security_ctx *instance, uint64_t md) { void *userdata = NULL; @@ -127,14 +127,14 @@ rte_security_get_userdata(struct rte_security_ctx *instance, uint64_t md) return userdata; } -const struct rte_security_capability * +const struct rte_security_capability * __rte_experimental rte_security_capabilities_get(struct rte_security_ctx *instance) { RTE_FUNC_PTR_OR_ERR_RET(*instance->ops->capabilities_get, NULL); return instance->ops->capabilities_get(instance->device); } -const struct rte_security_capability * +const struct rte_security_capability * __rte_experimental rte_security_capability_get(struct rte_security_ctx *instance, struct rte_security_capability_idx *idx) { diff --git a/lib/librte_security/rte_security.h b/lib/librte_security/rte_security.h index d7362f3319..c75c12183a 100644 --- a/lib/librte_security/rte_security.h +++ b/lib/librte_security/rte_security.h @@ -52,6 +52,7 @@ extern "C" { #include #include +#include #include #include #include @@ -294,7 +295,7 @@ struct rte_security_session { * - On success, pointer to session * - On failure, NULL */ -struct rte_security_session * +struct rte_security_session * __rte_experimental rte_security_session_create(struct rte_security_ctx *instance, struct rte_security_session_conf *conf, struct rte_mempool *mp); @@ -309,7 +310,7 @@ rte_security_session_create(struct rte_security_ctx *instance, * - On success returns 0 * - On failure return errno */ -int +int __rte_experimental rte_security_session_update(struct rte_security_ctx *instance, struct rte_security_session *sess, struct rte_security_session_conf *conf); @@ -323,7 +324,7 @@ rte_security_session_update(struct rte_security_ctx *instance, * - Size of the private data, if successful * - 0 if device is invalid or does not support the operation. */ -unsigned int +unsigned int __rte_experimental rte_security_session_get_size(struct rte_security_ctx *instance); /** @@ -338,7 +339,7 @@ rte_security_session_get_size(struct rte_security_ctx *instance); * - -EINVAL if session is NULL. * - -EBUSY if not all device private data has been freed. */ -int +int __rte_experimental rte_security_session_destroy(struct rte_security_ctx *instance, struct rte_security_session *sess); @@ -355,7 +356,7 @@ rte_security_session_destroy(struct rte_security_ctx *instance, * - On success, zero. * - On failure, a negative value. */ -int +int __rte_experimental rte_security_set_pkt_metadata(struct rte_security_ctx *instance, struct rte_security_session *sess, struct rte_mbuf *mb, void *params); @@ -375,7 +376,7 @@ rte_security_set_pkt_metadata(struct rte_security_ctx *instance, * - On success, userdata * - On failure, NULL */ -void * +void * __rte_experimental rte_security_get_userdata(struct rte_security_ctx *instance, uint64_t md); /** @@ -384,7 +385,7 @@ rte_security_get_userdata(struct rte_security_ctx *instance, uint64_t md); * @param sym_op crypto operation * @param sess security session */ -static inline int +static inline int __rte_experimental __rte_security_attach_session(struct rte_crypto_sym_op *sym_op, struct rte_security_session *sess) { @@ -393,13 +394,13 @@ __rte_security_attach_session(struct rte_crypto_sym_op *sym_op, return 0; } -static inline void * +static inline void * __rte_experimental get_sec_session_private_data(const struct rte_security_session *sess) { return sess->sess_private_data; } -static inline void +static inline void __rte_experimental set_sec_session_private_data(struct rte_security_session *sess, void *private_data) { @@ -415,7 +416,7 @@ set_sec_session_private_data(struct rte_security_session *sess, * @param op crypto operation * @param sess security session */ -static inline int +static inline int __rte_experimental rte_security_attach_session(struct rte_crypto_op *op, struct rte_security_session *sess) { @@ -457,7 +458,7 @@ struct rte_security_stats { * - On success return 0 * - On failure errno */ -int +int __rte_experimental rte_security_session_stats_get(struct rte_security_ctx *instance, struct rte_security_session *sess, struct rte_security_stats *stats); @@ -541,7 +542,7 @@ struct rte_security_capability_idx { * - Returns array of security capabilities. * - Return NULL if no capabilities available. */ -const struct rte_security_capability * +const struct rte_security_capability * __rte_experimental rte_security_capabilities_get(struct rte_security_ctx *instance); /** @@ -555,7 +556,7 @@ rte_security_capabilities_get(struct rte_security_ctx *instance); * index criteria. * - Return NULL if the capability not matched on security instance. */ -const struct rte_security_capability * +const struct rte_security_capability * __rte_experimental rte_security_capability_get(struct rte_security_ctx *instance, struct rte_security_capability_idx *idx); -- 2.20.1