From patchwork Tue Mar 8 14:24:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Monjalon X-Patchwork-Id: 108597 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 22D46A00C2; Tue, 8 Mar 2022 15:24:31 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 13586406A2; Tue, 8 Mar 2022 15:24:31 +0100 (CET) Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by mails.dpdk.org (Postfix) with ESMTP id E77C54068B; Tue, 8 Mar 2022 15:24:28 +0100 (CET) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 1FBD73202012; Tue, 8 Mar 2022 09:24:27 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Tue, 08 Mar 2022 09:24:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm1; bh=l835J1+quheQxPyAOQT6+dElUJSv8M hBW3J1ad5upNE=; b=CndLmAQTwljIuRE1ghkyr5UqwRnCd7gT/nyjla59oPTmHZ hUooZ+zcc+POe/zAzGO7OdoeYMHwWJYuOD+M5MPfleq1M/nzmIG9AD9uwsLlO0HD 9jCUXOeBOxqQ/8KwzWScxLYu91XtbPydEmzfj6ypfAk3fG8kqiRpG/lBB8ugCQwf 8Wwxc8QFLW53cVPLivsxZyDZOUFAFBgzQfXnZ33ZKCa0rzYOL5bPW1x1o/jb5lnP qwcxfjyQ189oSyJneYNMDkqQzs7D4lIgb1/JmZgm0gENAVka1+oXKqaN69dIrTSD U/CM5OgF04wELRVO/F1Jgm0KWlXbiLpRYmdX8cxw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=l835J1 +quheQxPyAOQT6+dElUJSv8MhBW3J1ad5upNE=; b=iN/b/DXro2B+0Yx6ZExJLB rGg9x90kTTM/iVXngLtlYOmRPnLhijXig4Fi/BAwl8RiQDZ1CBtuQY1DHlLmQXDa IdgZu6ny/VtVsgWZlkK98HK3Ct/vXspv7HOhUJp79im8Iuy2HQkz8xObfaYMn8OF aRklHdfikpE+CuqSvPMZSIXlmNvQHIgdgBS+LnrgTmSOkM4An61NHOsXE0suB/E2 9syBOdThXq3KF12OUWDIjqTEzlC8xFxj5aZJZWYkZCrwwKzFvtHb7uIbbPesKFta ZipaVz/u0UNA/y9oUUDWH8T/7cClnYeo9pwWmTsabUOlRWXjdqqoLZQyAAqrYwFQ == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudduiedgiedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepvdehgfeivdejgedtveehfefhteelfefgieevgfffveefjeegtdfg uedthedtgeevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 8 Mar 2022 09:24:25 -0500 (EST) From: Thomas Monjalon To: dev@dpdk.org Cc: david.marchand@redhat.com, stable@dpdk.org, Ori Kam , Ray Kinsella , Pavan Nikhilesh , Jerin Jacob Subject: [PATCH v2 1/2] regexdev: fix section attribute of symbols Date: Tue, 8 Mar 2022 15:24:11 +0100 Message-Id: <20220308142412.2069408-2-thomas@monjalon.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220308142412.2069408-1-thomas@monjalon.net> References: <20220306092023.2461466-1-thomas@monjalon.net> <20220308142412.2069408-1-thomas@monjalon.net> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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: bab9497ef78b ("regexdev: introduce API") Cc: stable@dpdk.org Signed-off-by: Thomas Monjalon Acked-by: Ori Kam --- devtools/libabigail.abignore | 4 ++++ lib/regexdev/rte_regexdev.h | 4 ++++ lib/regexdev/rte_regexdev_driver.h | 3 +++ lib/regexdev/version.map | 9 +++++++++ 4 files changed, 20 insertions(+) diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore index 9c921c47d4..18c11c80c6 100644 --- a/devtools/libabigail.abignore +++ b/devtools/libabigail.abignore @@ -25,6 +25,10 @@ [suppress_type] name = rte_crypto_asym_op +; Ignore section attribute fixes in experimental regexdev library +[suppress_file] + soname_regexp = ^librte_regexdev\. + ; Ignore changes in common mlx5 driver, should be all internal [suppress_file] soname_regexp = ^librte_common_mlx5\. diff --git a/lib/regexdev/rte_regexdev.h b/lib/regexdev/rte_regexdev.h index 4ba67b0c25..3bce8090f6 100644 --- a/lib/regexdev/rte_regexdev.h +++ b/lib/regexdev/rte_regexdev.h @@ -225,6 +225,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 @@ -234,6 +237,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); /** diff --git a/lib/regexdev/rte_regexdev_driver.h b/lib/regexdev/rte_regexdev_driver.h index 64742016c0..6246b144a6 100644 --- a/lib/regexdev/rte_regexdev_driver.h +++ b/lib/regexdev/rte_regexdev_driver.h @@ -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); /** @@ -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); /** @@ -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 diff --git a/lib/regexdev/version.map b/lib/regexdev/version.map index 8db9b17018..988b909638 100644 --- a/lib/regexdev/version.map +++ b/lib/regexdev/version.map @@ -1,6 +1,7 @@ EXPERIMENTAL { global: + rte_regex_devices; rte_regexdev_attr_get; rte_regexdev_attr_set; rte_regexdev_close; @@ -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; @@ -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; +}; From patchwork Tue Mar 8 14:24:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Monjalon X-Patchwork-Id: 108598 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 509FFA00C2; Tue, 8 Mar 2022 15:24:39 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6043F410E1; Tue, 8 Mar 2022 15:24:35 +0100 (CET) Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by mails.dpdk.org (Postfix) with ESMTP id EE9364068B; Tue, 8 Mar 2022 15:24:33 +0100 (CET) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 75DB13201F73; Tue, 8 Mar 2022 09:24:32 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Tue, 08 Mar 2022 09:24:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm1; bh=9kXPYyDZCOvkoLSXMsJXgSAEo79H8f tZ2BNte58MhIg=; b=hkP/eBDwp6fQhC/6rjro5e8xrZqOHjNB0GUcLcL/KG+m32 cO93UQwQTNSZhf9y3tL3nZCkqdYNA8+t8ecqVKkTHfhVfBcuaYxH3C9BUNy/he4D Mzz8g4VH4rJ/K51doZ44WSQ3+X9X4udToEfdRABC0NFDfHxDNZ6MvVgam8xjtfY+ OPHABL8t5jQ3nHKFNmRkJpzh8n6/35d2x1hCUom4JVrBFb/OWtUpuTlOQxfsoVx1 sfNbbiEhquxybwsbT7Cun2ZS7g677JC0XHxFsIru8qmMI5RVU4HGLaSGAXHd3h8Z vyEp0v3g0OfdFaPQ7XggrX7D3UWj7D7wbRvO1OEQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=9kXPYy DZCOvkoLSXMsJXgSAEo79H8ftZ2BNte58MhIg=; b=QAxDVNPMmmiWWkW8qdvD2n TZ8MqwWTxltmIXHcFjsytN2XvG2vs4ipZjcPrHbv+nKOqMnv/vKdSd1efTMWfxl7 iY/RcVFfxDtqyHAXqBXcbh35rB1UZ5CUwORarBJxA2jNWCmvKyFyUdvBWrjmrglG MSlP41YoZuTFY0zbaDt96SEjs/EQMgYfq+ed7r/OpuwTEFHWeAUoPMAFC9dBjhsB +xZap9xA0pxrUQndA+XyZTHzhMuudLFHVjq8FSdGNFlKvWOtQ15vb7iv9dtvYrAS rA73B852TjueLnUd9CUOsDH0B9bEJOHQfNoQD2juuPm2cuwpHZcXbDTg5KbElJ9g == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudduiedgiedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepvdehgfeivdejgedtveehfefhteelfefgieevgfffveefjeegtdfg uedthedtgeevnecuvehluhhsthgvrhfuihiivgepudenucfrrghrrghmpehmrghilhhfrh homhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 8 Mar 2022 09:24:30 -0500 (EST) From: Thomas Monjalon To: dev@dpdk.org Cc: david.marchand@redhat.com, stable@dpdk.org, Ray Kinsella , Parav Pandit , Xueming Li , Elena Agostini , Ori Kam , Andrew Rybchenko Subject: [PATCH v2 2/2] build: hide local symbols in shared libraries Date: Tue, 8 Mar 2022 15:24:12 +0100 Message-Id: <20220308142412.2069408-3-thomas@monjalon.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220308142412.2069408-1-thomas@monjalon.net> References: <20220306092023.2461466-1-thomas@monjalon.net> <20220308142412.2069408-1-thomas@monjalon.net> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org The symbols which are not listed in the version script are exported by default. Adding a local section with a wildcard make non-listed functions and variables as hidden, as it should be in all version.map files. These are the changes done in the shared libraries: - DF .text Base auxiliary_add_device - DF .text Base auxiliary_dev_exists - DF .text Base auxiliary_dev_iterate - DF .text Base auxiliary_insert_device - DF .text Base auxiliary_is_ignored_device - DF .text Base auxiliary_match - DF .text Base auxiliary_on_scan - DF .text Base auxiliary_scan - DO .bss Base auxiliary_bus_logtype - DO .data Base auxiliary_bus - DO .bss Base gpu_logtype There is no impact on regexdev library. Because these local symbols were exported as non-internal in DPDK 21.11, any change in these functions would break the ABI. Exception rules are added for these experimental libraries, so the ABI check will skip them until the next ABI version. A check is added to avoid such miss in future. Fixes: 1afce3086cf4 ("bus/auxiliary: introduce auxiliary bus") Fixes: 8b8036a66e3d ("gpudev: introduce GPU device class library") Cc: stable@dpdk.org Signed-off-by: Thomas Monjalon --- devtools/check-symbol-maps.sh | 7 +++++++ devtools/libabigail.abignore | 8 ++++++++ drivers/bus/auxiliary/version.map | 2 ++ lib/gpudev/version.map | 2 ++ lib/regexdev/version.map | 2 ++ 5 files changed, 21 insertions(+) diff --git a/devtools/check-symbol-maps.sh b/devtools/check-symbol-maps.sh index 5bd290ac97..8266fdf9ea 100755 --- a/devtools/check-symbol-maps.sh +++ b/devtools/check-symbol-maps.sh @@ -53,4 +53,11 @@ if [ -n "$duplicate_symbols" ] ; then ret=1 fi +local_miss_maps=$(grep -L 'local: \*;' $@) +if [ -n "$local_miss_maps" ] ; then + echo "Found maps without local catch-all:" + echo "$local_miss_maps" + ret=1 +fi + exit $ret diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore index 18c11c80c6..c618f20032 100644 --- a/devtools/libabigail.abignore +++ b/devtools/libabigail.abignore @@ -32,3 +32,11 @@ ; Ignore changes in common mlx5 driver, should be all internal [suppress_file] soname_regexp = ^librte_common_mlx5\. + +; Ignore visibility fix of local functions in experimental auxiliary driver +[suppress_file] + soname_regexp = ^librte_bus_auxiliary\. + +; Ignore visibility fix of local functions in experimental gpudev library +[suppress_file] + soname_regexp = ^librte_gpudev\. diff --git a/drivers/bus/auxiliary/version.map b/drivers/bus/auxiliary/version.map index a52260657c..dc993e84ff 100644 --- a/drivers/bus/auxiliary/version.map +++ b/drivers/bus/auxiliary/version.map @@ -4,4 +4,6 @@ EXPERIMENTAL { # added in 21.08 rte_auxiliary_register; rte_auxiliary_unregister; + + local: *; }; diff --git a/lib/gpudev/version.map b/lib/gpudev/version.map index b23e3fd6eb..a2c8ce5759 100644 --- a/lib/gpudev/version.map +++ b/lib/gpudev/version.map @@ -39,4 +39,6 @@ INTERNAL { rte_gpu_get_by_name; rte_gpu_notify; rte_gpu_release; + + local: *; }; diff --git a/lib/regexdev/version.map b/lib/regexdev/version.map index 988b909638..3c6e9fffa1 100644 --- a/lib/regexdev/version.map +++ b/lib/regexdev/version.map @@ -26,6 +26,8 @@ EXPERIMENTAL { rte_regexdev_xstats_get; rte_regexdev_xstats_names_get; rte_regexdev_xstats_reset; + + local: *; }; INTERNAL {