Skip to content

Commit

Permalink
regexdev: fix section attribute of symbols
Browse files Browse the repository at this point in the history
[ upstream commit 89e290e ]

The functions used by the drivers must be internal,
while the function and variables used in inline functions
must be experimental.

These are the changes done in the shared library:
- DF .text  Base          rte_regexdev_get_device_by_name
+ DF .text  INTERNAL      rte_regexdev_get_device_by_name
- DF .text  Base          rte_regexdev_register
+ DF .text  INTERNAL      rte_regexdev_register
- DF .text  Base          rte_regexdev_unregister
+ DF .text  INTERNAL      rte_regexdev_unregister
- DF .text  Base          rte_regexdev_is_valid_dev
+ DF .text  EXPERIMENTAL  rte_regexdev_is_valid_dev
- DO .bss   Base          rte_regex_devices
+ DO .bss   EXPERIMENTAL  rte_regex_devices
- DO .bss   Base          rte_regexdev_logtype
+ DO .bss   EXPERIMENTAL  rte_regexdev_logtype

Because these symbols were exported in the default section in DPDK 21.11,
any change in these functions would be seen as incompatible
by the ABI compatibility check.
An exception rule is added for this experimental library,
so the ABI check will skip it until the next ABI version.

Fixes: bab9497 ("regexdev: introduce API")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Ori Kam <orika@nvidia.com>
  • Loading branch information
tmonjalo authored and bluca committed Mar 9, 2022
1 parent 6a5ad6b commit 7490d6d
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
4 changes: 4 additions & 0 deletions devtools/libabigail.abignore
Expand Up @@ -7,3 +7,7 @@
symbol_version = INTERNAL
[suppress_variable]
symbol_version = INTERNAL

; Ignore section attribute fixes in experimental regexdev library
[suppress_file]
soname_regexp = ^librte_regexdev\.
4 changes: 4 additions & 0 deletions lib/librte_regexdev/rte_regexdev.h
Expand Up @@ -228,6 +228,9 @@ extern int rte_regexdev_logtype;
} while (0)

/**
* @warning
* @b EXPERIMENTAL: this API may change without prior notice.
*
* Check if dev_id is ready.
*
* @param dev_id
Expand All @@ -237,6 +240,7 @@ extern int rte_regexdev_logtype;
* - 0 if device state is not in ready state.
* - 1 if device state is ready state.
*/
__rte_experimental
int rte_regexdev_is_valid_dev(uint16_t dev_id);

/**
Expand Down
3 changes: 3 additions & 0 deletions lib/librte_regexdev/rte_regexdev_driver.h
Expand Up @@ -32,6 +32,7 @@ extern "C" {
* A pointer to the RegEx device slot case of success,
* NULL otherwise.
*/
__rte_internal
struct rte_regexdev *rte_regexdev_register(const char *name);

/**
Expand All @@ -41,6 +42,7 @@ struct rte_regexdev *rte_regexdev_register(const char *name);
* @param dev
* Device to be released.
*/
__rte_internal
void rte_regexdev_unregister(struct rte_regexdev *dev);

/**
Expand All @@ -50,6 +52,7 @@ void rte_regexdev_unregister(struct rte_regexdev *dev);
* @param name
* The device name.
*/
__rte_internal
struct rte_regexdev *rte_regexdev_get_device_by_name(const char *name);

#ifdef __cplusplus
Expand Down
9 changes: 9 additions & 0 deletions lib/librte_regexdev/version.map
@@ -1,6 +1,7 @@
EXPERIMENTAL {
global:

rte_regex_devices;
rte_regexdev_attr_get;
rte_regexdev_attr_set;
rte_regexdev_close;
Expand All @@ -11,6 +12,8 @@ EXPERIMENTAL {
rte_regexdev_enqueue_burst;
rte_regexdev_get_dev_id;
rte_regexdev_info_get;
rte_regexdev_is_valid_dev;
rte_regexdev_logtype;
rte_regexdev_queue_pair_setup;
rte_regexdev_rule_db_compile_activate;
rte_regexdev_rule_db_export;
Expand All @@ -24,3 +27,9 @@ EXPERIMENTAL {
rte_regexdev_xstats_names_get;
rte_regexdev_xstats_reset;
};

INTERNAL {
rte_regexdev_get_device_by_name;
rte_regexdev_register;
rte_regexdev_unregister;
};

0 comments on commit 7490d6d

Please sign in to comment.