[v7,5/6] devtools: exempt internal ABI checking

Message ID 20200425105620.73021-6-haiyue.wang@intel.com (mailing list archive)
State Accepted, archived
Delegated to: David Marchand
Headers
Series dpdk: introduce __rte_internal tag |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Wang, Haiyue April 25, 2020, 10:56 a.m. UTC
  No need to restrict the ABI on symbols that are only used by core
libraries.

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
---
 devtools/check-symbol-change.sh | 8 ++++++++
 1 file changed, 8 insertions(+)
  

Comments

David Marchand April 25, 2020, 2:34 p.m. UTC | #1
On Sat, Apr 25, 2020 at 1:02 PM Haiyue Wang <haiyue.wang@intel.com> wrote:
>
> No need to restrict the ABI on symbols that are only used by core
> libraries.
>
> Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>

Rather than add a special case for INTERNAL, we can invert the logic
in this script: identify "stable" sections symbol.
I went with the following patch:

diff --git a/devtools/check-symbol-change.sh b/devtools/check-symbol-change.sh
index ed2178e36e..f329d5fa62 100755
--- a/devtools/check-symbol-change.sh
+++ b/devtools/check-symbol-change.sh
@@ -77,6 +77,10 @@ build_map_changes()

 }

+is_stable_section() {
+       [ "$1" != 'EXPERIMENTAL' ] && [ "$1" != 'INTERNAL' ]
+}
+
 check_for_rule_violations()
 {
        local mapdb="$1"
@@ -110,11 +114,11 @@ check_for_rule_violations()
                        # section directly
                        if [ -z "$oldsecname" ]
                        then
-                               if [ "$secname" = 'EXPERIMENTAL' ]
+                               if ! is_stable_section $secname
                                then
                                        echo -n "INFO: symbol $symname has "
                                        echo -n "been added to the "
-                                       echo -n "EXPERIMENTAL section of the "
+                                       echo -n "$secname section of the "
                                        echo "version map"
                                        continue
                                else
@@ -137,7 +141,7 @@ check_for_rule_violations()
                        # This symbol is moving between two sections (the
                        # original section is not experimental).
                        # This can be legit, just warn.
-                       if [ "$oldsecname" != 'EXPERIMENTAL' ]
+                       if is_stable_section $oldsecname
                        then
                                echo -n "INFO: symbol $symname is being "
                                echo -n "moved from $oldsecname to $secname. "
@@ -148,9 +152,9 @@ check_for_rule_violations()
                else

                        if ! grep -q "$mname $symname .* add" "$mapdb" && \
-                          [ "$secname" != "EXPERIMENTAL" ]
+                          is_stable_section $secname
                        then
-                               # Just inform users that non-experimenal
+                               # Just inform users that stable
                                # symbols need to go through a deprecation
                                # process
                                echo -n "INFO: symbol $symname is being "
  

Patch

diff --git a/devtools/check-symbol-change.sh b/devtools/check-symbol-change.sh
index ed2178e36..7b6d5f40f 100755
--- a/devtools/check-symbol-change.sh
+++ b/devtools/check-symbol-change.sh
@@ -91,6 +91,13 @@  check_for_rule_violations()
 		if [ "$ar" = "add" ]
 		then
 
+			if [ "$secname" = "INTERNAL" ]
+			then
+				# these are absolved from any further checking
+				echo "Skipping symbol $symname in INTERNAL"
+				continue
+			fi
+
 			if [ "$secname" = "unknown" ]
 			then
 				# Just inform the user of this occurrence, but
@@ -148,6 +155,7 @@  check_for_rule_violations()
 		else
 
 			if ! grep -q "$mname $symname .* add" "$mapdb" && \
+			   [ "$secname" != "INTERNAL" ] && \
 			   [ "$secname" != "EXPERIMENTAL" ]
 			then
 				# Just inform users that non-experimenal