Skip to contentSkip to conversation

drivers: fix symbol exports when map is omitted

PATCH Superseded David Marchand 8 participants 32 messages Nov 29, 2022 – Dec 8, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers: fix symbol exports when map is omitted

ld exports any global symbol by default if no version script is passed. As a consequence, the incriminated change let any public symbol leak out of the driver shared libraries.

Hide again those symbols by providing a default map file which unexports any global symbol using a local: * catchall statement.

The check on symbols is skipped for this default map file as it is intentionnally an empty map (see commit b67bdda86cd4 ("devtools: catch empty symbol maps")) and there is nothing to check in it.

While at it, move Windows specific objects where needed for better readability.

Fixes 7dde9c844a37 ("drivers: omit symbol map when unneeded")
---
 drivers/meson.build | 70 ++++++++++++++++++++++++---------------------
 drivers/version.map |  3 ++
 2 files changed, 41 insertions(+), 32 deletions(-)
 create mode 100644 drivers/version.map
drivers/meson.build +38 -32
index c4ff3ff1ba..77e92c3bce 100644
@@ -206,44 +206,50 @@ foreach subpath:subdirs
 
         # now build the shared driver
         version_map = '@0@/@1@/version.map'.format(meson.current_source_dir(), drv_path)
-        implib = 'lib' + lib_name + '.dll.a'
 
         lk_deps = []
         lk_args = []
-        if fs.is_file(version_map)
-            def_file = custom_target(lib_name + '_def',
-                    command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
-                    input: version_map,
-                    output: '@0@_exports.def'.format(lib_name))
-
-            mingw_map = custom_target(lib_name + '_mingw',
-                    command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
-                    input: version_map,
-                    output: '@0@_mingw.map'.format(lib_name))
-
-            lk_deps = [version_map, def_file, mingw_map]
-            if is_windows
-                if is_ms_linker
-                    lk_args = ['-Wl,/def:' + def_file.full_path()]
-                    if meson.version().version_compare('<0.54.0')
-                        lk_args += ['-Wl,/implib:drivers\\' + implib]
-                    endif
-                else
-                    lk_args = ['-Wl,--version-script=' + mingw_map.full_path()]
+        if not fs.is_file(version_map)
+            version_map = '@0@/version.map'.format(meson.current_source_dir())
+            lk_deps += [version_map]
+        else
+            lk_deps += [version_map]
+            if not is_windows and developer_mode
+                # on unix systems check the output of the
+                # check-symbols.sh script, using it as a
+                # dependency of the .so build
+                lk_deps += custom_target(lib_name + '.sym_chk',
+                        command: [check_symbols, version_map, '@INPUT@'],
+                        capture: true,
+                        input: static_lib,
+                        output: lib_name + '.sym_chk')
+            endif
+        endif
+
+        if is_windows
+            if is_ms_linker
+                def_file = custom_target(lib_name + '_def',
+                        command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
+                        input: version_map,
+                        output: '@0@_exports.def'.format(lib_name))
+                lk_deps += def_file
+
+                lk_args = ['-Wl,/def:' + def_file.full_path()]
+                if meson.version().version_compare('<0.54.0')
+                    implib = 'lib' + lib_name + '.dll.a'
+                    lk_args += ['-Wl,/implib:drivers\\' + implib]
                 endif
             else
-                lk_args = ['-Wl,--version-script=' + version_map]
-                if developer_mode
-                    # on unix systems check the output of the
-                    # check-symbols.sh script, using it as a
-                    # dependency of the .so build
-                    lk_deps += custom_target(lib_name + '.sym_chk',
-                            command: [check_symbols, version_map, '@INPUT@'],
-                            capture: true,
-                            input: static_lib,
-                            output: lib_name + '.sym_chk')
-                endif
+                mingw_map = custom_target(lib_name + '_mingw',
+                        command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
+                        input: version_map,
+                        output: '@0@_mingw.map'.format(lib_name))
+                lk_deps += [mingw_map]
+
+                lk_args = ['-Wl,--version-script=' + mingw_map.full_path()]
             endif
+        else
+            lk_args = ['-Wl,--version-script=' + version_map]
         endif
 
         shared_lib = shared_library(lib_name, sources,
drivers/version.map new file +3 -0
new file mode 100644
index 0000000000..78c3585d7c
@@ -0,0 +1,3 @@
+DPDK_23 {
+	local: *;
+};
Signature · 1 line
2.38.1
Tested-by on v1 1/1
#1 lore raw
Quoted 7 lines · David Marchand

ld exports any global symbol by default if no version script is passed. As a consequence, the incriminated change let any public symbol leak out of the driver shared libraries.

Hide again those symbols by providing a default map file which unexports any global symbol using a local: * catchall statement.

I assume this will cause warnings for ABI check scripts, how can we prevent the warnings?

Quoted 4 lines

The check on symbols is skipped for this default map file as it is intentionnally an empty map (see commit b67bdda86cd4 ("devtools: catch empty symbol maps")) and there is nothing to check in it.

How it is skipped, './devtools/check-symbol-maps.sh' still complains about 'drivers/version.map' for me.

Quoted 3 lines

While at it, move Windows specific objects where needed for better readability.

+1

Quoted 5 lines
Fixes 7dde9c844a37 ("drivers: omit symbol map when unneeded")

Not tested on Windows, but for Linux:

#2 lore raw
Quoted 6 lines · Ferruh Yigit
Quoted 4 lines · David Marchand

ld exports any global symbol by default if no version script is passed. As a consequence, the incriminated change let any public symbol leak out of the driver shared libraries.

Quoted 6 lines
Quoted 3 lines

Hide again those symbols by providing a default map file which unexports any global symbol using a local: * catchall statement.

I assume this will cause warnings for ABI check scripts, how can we prevent the warnings?

Indeed.

Some options:
- add exhaustive suppression rules in devtools/libabigail.abignore,
- retag the v22.11 release with this fix, but we already announced it and people started downloading the tarball,
- release a .1 version and compare ABI against it (either in the main repo, or in the 22.11 stable branch, through for the ABI check in GHA, it would be simpler to have the tag in the main repo..),

Do you have other ideas?

Quoted 8 lines
Quoted 5 lines

The check on symbols is skipped for this default map file as it is intentionnally an empty map (see commit b67bdda86cd4 ("devtools: catch empty symbol maps")) and there is nothing to check in it.

How it is skipped, './devtools/check-symbol-maps.sh' still complains about 'drivers/version.map' for me.

I had considered the call check-symbols.sh during build. But it is true that if you call check-symbol-maps.sh alone, we will get a warning.

I will exclude it in v2.

Quoted 10 lines
Quoted 4 lines

While at it, move Windows specific objects where needed for better readability.

+1

Quoted 3 lines
Fixes 7dde9c844a37 ("drivers: omit symbol map when unneeded")
Quoted 6 lines
Quoted 2 lines

Not tested on Windows, but for Linux:

UNH Windows tests look fine.

Signature · 1 line
David Marchand
#3 lore raw
Quoted 5 lines · David Marchand
Quoted 2 lines

I assume this will cause warnings for ABI check scripts, how can we prevent the warnings?

Indeed.

Quoted 7 lines

Some options:
- add exhaustive suppression rules in devtools/libabigail.abignore,
- retag the v22.11 release with this fix, but we already announced it and people started downloading the tarball,
- release a .1 version and compare ABI against it (either in the main repo, or in the 22.11 stable branch, through for the ABI check in GHA, it would be simpler to have the tag in the main repo..),

(let's forget about my concern on GHA, we have the REF_GIT_REPO param, so we can point at the dpdk-stable repo, and go with a "normal" release in 22.11 stable branch)

Quoted 3 lines

Do you have other ideas?

Signature · 1 line
David Marchand
#4 lore raw
Quoted 15 lines · David Marchand
Quoted 5 lines · David Marchand
Quoted 2 lines

I assume this will cause warnings for ABI check scripts, how can we prevent the warnings?

Indeed.

Quoted 7 lines

Some options:
- add exhaustive suppression rules in devtools/libabigail.abignore,
- retag the v22.11 release with this fix, but we already announced it and people started downloading the tarball,
- release a .1 version and compare ABI against it (either in the main repo, or in the 22.11 stable branch, through for the ABI check in GHA, it would be simpler to have the tag in the main repo..),

Quoted 4 lines

(let's forget about my concern on GHA, we have the REF_GIT_REPO param, so we can point at the dpdk-stable repo, and go with a "normal" release in 22.11 stable branch)

OK to have v22.11.1 stable release with this fix.

#5 lore raw
In reply to Ferruh Yigit
Quoted 7 lines · Ferruh Yigit
Quoted 4 lines · David Marchand

ld exports any global symbol by default if no version script is passed. As a consequence, the incriminated change let any public symbol leak out of the driver shared libraries.

Not tested on Windows, but for Linux:

just for awareness the default is the opposite on windows symbols are private by default and have to be explicitly made public.

also, for gcc we could go to the extreme and pass -fvisibility=hidden and fix out any other symbols that are missed.

if you're really going wild you may consider introducing a macro that can be expanded to __attribute__((visibility("default"))) combined with -fvisibility=hidden (as opposed to version.map) the main benefit being there's only a single source of truth about whether or not the symbol is public, you don't have to look in 2 places.
(anyway, probably not a popular idea...)

ty

#6 lore raw

PATCH v2 1/1 drivers: fix symbol exports when map is omitted

In reply to David Marchand

ld exports any global symbol by default if no version script is passed. As a consequence, the incriminated change let any public symbol leak out of the driver shared libraries.

Hide again those symbols by providing a default map file which unexports any global symbol using a local: * catch-all statement.

The checks are skipped for this default map file as it is intentionnally an empty map (see commit b67bdda86cd4 ("devtools: catch empty symbol maps")) and there is nothing else to check in this map.

While at it, move Windows specific objects where needed for better readability.

Fixes 7dde9c844a37 ("drivers: omit symbol map when unneeded")

---
Changes since v1:
- excluded drivers/version.map from maps checked by default in check-symbol-maps.sh,

---
 devtools/check-symbol-maps.sh |  2 +-
 drivers/meson.build           | 70 +++++++++++++++++++----------------
 drivers/version.map           |  3 ++
 3 files changed, 42 insertions(+), 33 deletions(-)
 create mode 100644 drivers/version.map
devtools/check-symbol-maps.sh +1 -1
index 0a6062de26..8c116bfa9c 100755
@@ -8,7 +8,7 @@ cd $(dirname $0)/..
 export LC_ALL=C
 
 if [ $# = 0 ] ; then
-    set -- $(find lib drivers -name '*.map')
+    set -- $(find lib drivers -name '*.map' -a ! -path drivers/version.map)
 fi
 
 ret=0
drivers/meson.build +38 -32

82 lines not on this page · raw message

drivers/version.map new file +3 -0
new file mode 100644
index 0000000000..78c3585d7c
@@ -0,0 +1,3 @@
+DPDK_23 {
+	local: *;
+};
Signature · 1 line
2.38.1
#7 lore raw
Quoted 14 lines · David Marchand

ld exports any global symbol by default if no version script is passed. As a consequence, the incriminated change let any public symbol leak out of the driver shared libraries.

Hide again those symbols by providing a default map file which unexports any global symbol using a local: * catch-all statement.

The checks are skipped for this default map file as it is intentionnally an empty map (see commit b67bdda86cd4 ("devtools: catch empty symbol maps")) and there is nothing else to check in this map.

While at it, move Windows specific objects where needed for better readability.

Quoted 6 lines
Fixes 7dde9c844a37 ("drivers: omit symbol map when unneeded")

Tested v2, looks good.
'check-symbol-maps.sh' warning fixed too.

#8 lore raw
Quoted 19 lines · Ferruh Yigit
Quoted 17 lines · David Marchand

ld exports any global symbol by default if no version script is passed. As a consequence, the incriminated change let any public symbol leak out of the driver shared libraries.

Hide again those symbols by providing a default map file which unexports any global symbol using a local: * catch-all statement.

The checks are skipped for this default map file as it is intentionnally an empty map (see commit b67bdda86cd4 ("devtools: catch empty symbol maps")) and there is nothing else to check in this map.

While at it, move Windows specific objects where needed for better readability.

Fixes 7dde9c844a37 ("drivers: omit symbol map when unneeded")
Quoted 6 lines
Quoted 3 lines

Tested v2, looks good.
'check-symbol-maps.sh' warning fixed too.

Thanks Ferruh.

Bruce / Luca, could you review / confirm it is ok for you?

Signature · 1 line
David Marchand
#9 lore raw
Quoted 24 lines · David Marchand
Quoted 23 lines · Ferruh Yigit
Quoted 20 lines · David Marchand

ld exports any global symbol by default if no version script is passed. As a consequence, the incriminated change let any public symbol leak out of the driver shared libraries.

Hide again those symbols by providing a default map file which unexports any global symbol using a local: * catch-all statement.

The checks are skipped for this default map file as it is intentionnally an empty map (see commit b67bdda86cd4 ("devtools: catch empty symbol maps")) and there is nothing else to check in this map.

While at it, move Windows specific objects where needed for better readability.

Fixes 7dde9c844a37 ("drivers: omit symbol map when unneeded")
Quoted 6 lines
Quoted 2 lines

Tested v2, looks good.
'check-symbol-maps.sh' warning fixed too.

Thanks Ferruh.

Bruce / Luca, could you review / confirm it is ok for you?

Additionnally, Luca, could you describe how you caught the issue? Could we enhance the CI to catch this earlier?

Signature · 1 line
David Marchand
#10 lore raw
In reply to David Marchand
Quoted 24 lines · David Marchand
Quoted 23 lines · Ferruh Yigit
Quoted 20 lines · David Marchand

ld exports any global symbol by default if no version script is passed. As a consequence, the incriminated change let any public symbol leak out of the driver shared libraries.

Hide again those symbols by providing a default map file which unexports any global symbol using a local: * catch-all statement.

The checks are skipped for this default map file as it is intentionnally an empty map (see commit b67bdda86cd4 ("devtools: catch empty symbol maps")) and there is nothing else to check in this map.

While at it, move Windows specific objects where needed for better readability.

Fixes 7dde9c844a37 ("drivers: omit symbol map when unneeded")
Quoted 7 lines
Quoted 2 lines

Tested v2, looks good.
'check-symbol-maps.sh' warning fixed too.

Thanks Ferruh.

Bruce / Luca, could you review / confirm it is ok for you?

LGTM, thanks.

/Bruce

#11 lore raw
Quoted 26 lines · Bruce Richardson
Quoted 24 lines · David Marchand
Quoted 23 lines · Ferruh Yigit
Quoted 20 lines · David Marchand

ld exports any global symbol by default if no version script is passed. As a consequence, the incriminated change let any public symbol leak out of the driver shared libraries.

Hide again those symbols by providing a default map file which unexports any global symbol using a local: * catch-all statement.

The checks are skipped for this default map file as it is intentionnally an empty map (see commit b67bdda86cd4 ("devtools: catch empty symbol maps")) and there is nothing else to check in this map.

While at it, move Windows specific objects where needed for better readability.

Fixes 7dde9c844a37 ("drivers: omit symbol map when unneeded")
Quoted 8 lines
Quoted 7 lines
Quoted 2 lines

Tested v2, looks good.
'check-symbol-maps.sh' warning fixed too.

Thanks Ferruh.

Bruce / Luca, could you review / confirm it is ok for you?

LGTM, thanks.

Thanks Bruce.

I prefer to separate the "cosmetic" part around Windows (and fix lib/meson.build too), so I sent a v3 series with only the first patch marked as backport.

Signature · 1 line
David Marchand
#12 lore raw

PATCH v3 1/2 drivers: fix symbol exports when map is omitted

In reply to David Marchand

ld exports any global symbol by default if no version script is passed. As a consequence, the incriminated change let any public symbol leak out of the driver shared libraries.

Hide again those symbols by providing a default map file which unexports any global symbol using a local: * catch-all statement.

The checks are skipped for this default map file as it is intentionnally an empty map (see commit b67bdda86cd4 ("devtools: catch empty symbol maps")) and there is nothing else to check in this map.

Fixes 7dde9c844a37 ("drivers: omit symbol map when unneeded")

---
Changes since v2:
- separated the Windows cleanup in next patch,

Changes since v1:
- excluded drivers/version.map from maps checked by default in check-symbol-maps.sh,

---
 devtools/check-symbol-maps.sh |  2 +-
 drivers/meson.build           | 68 +++++++++++++++++++----------------
 drivers/version.map           |  3 ++
 3 files changed, 41 insertions(+), 32 deletions(-)
 create mode 100644 drivers/version.map
devtools/check-symbol-maps.sh +1 -1
index 0a6062de26..8c116bfa9c 100755
@@ -8,7 +8,7 @@ cd $(dirname $0)/..
 export LC_ALL=C
 
 if [ $# = 0 ] ; then
-    set -- $(find lib drivers -name '*.map')
+    set -- $(find lib drivers -name '*.map' -a ! -path drivers/version.map)
 fi
 
 ret=0
drivers/meson.build +37 -31

77 lines not on this page · raw message

drivers/version.map new file +3 -0
new file mode 100644
index 0000000000..78c3585d7c
@@ -0,0 +1,3 @@
+DPDK_23 {
+	local: *;
+};
Signature · 1 line
2.38.1
#13 lore raw

PATCH v3 2/2 build: generate Windows build artefacts when needed

We have been generating some Windows and mingw artefacts on all OS while there is no need for them.

---
 drivers/meson.build | 27 +++++++++++++--------------
 lib/meson.build     | 29 +++++++++++++++--------------
 2 files changed, 28 insertions(+), 28 deletions(-)
drivers/meson.build +13 -14
index 5188302057..c6d619200f 100644
@@ -206,7 +206,6 @@ foreach subpath:subdirs
 
         # now build the shared driver
         version_map = '@0@/@1@/version.map'.format(meson.current_source_dir(), drv_path)
-        implib = 'lib' + lib_name + '.dll.a'
 
         lk_deps = []
         lk_args = []
@@ -227,25 +226,25 @@ foreach subpath:subdirs
             endif
         endif
 
-        def_file = custom_target(lib_name + '_def',
-                command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
-                input: version_map,
-                output: '@0@_exports.def'.format(lib_name))
-
-        mingw_map = custom_target(lib_name + '_mingw',
-                command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
-                input: version_map,
-                output: '@0@_mingw.map'.format(lib_name))
-
-        lk_deps += [def_file, mingw_map]
-
         if is_windows
             if is_ms_linker
+                def_file = custom_target(lib_name + '_def',
+                        command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
+                        input: version_map,
+                        output: '@0@_exports.def'.format(lib_name))
+                lk_deps += [def_file]
+
                 lk_args = ['-Wl,/def:' + def_file.full_path()]
                 if meson.version().version_compare('<0.54.0')
-                    lk_args += ['-Wl,/implib:drivers\\' + implib]
+                    lk_args += ['-Wl,/implib:drivers\\lib' + lib_name + '.dll.a']
                 endif
             else
+                mingw_map = custom_target(lib_name + '_mingw',
+                        command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
+                        input: version_map,
+                        output: '@0@_mingw.map'.format(lib_name))
+                lk_deps += [mingw_map]
+
                 lk_args = ['-Wl,--version-script=' + mingw_map.full_path()]
             endif
         else
lib/meson.build +15 -14
index fd55925340..a90fee31b7 100644
@@ -224,34 +224,35 @@ foreach l:libraries
         # RTE_BUILD_SHARED_LIB defined
         cflags += '-DRTE_BUILD_SHARED_LIB'
     endif
-    version_map = '@0@/@1@/version.map'.format(
-            meson.current_source_dir(), l)
-    implib = 'librte_' + l + '.dll.a'
 
-    def_file = custom_target(libname + '_def',
-            command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
-            input: version_map,
-            output: '@0@_exports.def'.format(libname))
-
-    mingw_map = custom_target(libname + '_mingw',
-            command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
-            input: version_map,
-            output: '@0@_mingw.map'.format(libname))
+    version_map = '@0@/@1@/version.map'.format(meson.current_source_dir(), l)
+    lk_deps = [version_map]
 
     if is_ms_linker
+        def_file = custom_target(libname + '_def',
+                command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
+                input: version_map,
+                output: '@0@_exports.def'.format(libname))
+        lk_deps += [def_file]
+
         lk_args = ['-Wl,/def:' + def_file.full_path()]
         if meson.version().version_compare('<0.54.0')
-            lk_args += ['-Wl,/implib:lib\\' + implib]
+            lk_args += ['-Wl,/implib:lib\\librte_' + l + '.dll.a']
         endif
     else
         if is_windows
+            mingw_map = custom_target(libname + '_mingw',
+                    command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
+                    input: version_map,
+                    output: '@0@_mingw.map'.format(libname))
+            lk_deps += [mingw_map]
+
             lk_args = ['-Wl,--version-script=' + mingw_map.full_path()]
         else
             lk_args = ['-Wl,--version-script=' + version_map]
         endif
     endif
 
-    lk_deps = [version_map, def_file, mingw_map]
     if developer_mode and not is_windows
         # on unix systems check the output of the
         # check-symbols.sh script, using it as a
Signature · 1 line
2.38.1
Reviewed-by on v3 2/2
#14 lore raw

Re: [PATCH v3 2/2] build: generate Windows build artefacts when needed

Quoted 9 lines · David Marchand

We have been generating some Windows and mingw artefacts on all OS while there is no need for them.

---
 drivers/meson.build | 27 +++++++++++++--------------
 lib/meson.build     | 29 +++++++++++++++--------------
 2 files changed, 28 insertions(+), 28 deletions(-)
Reviewed-by on v3 1/2
#15 lore raw
In reply to David Marchand
Quoted 66 lines · David Marchand

ld exports any global symbol by default if no version script is passed. As a consequence, the incriminated change let any public symbol leak out of the driver shared libraries.

Hide again those symbols by providing a default map file which unexports any global symbol using a local: * catch-all statement.

The checks are skipped for this default map file as it is intentionnally an empty map (see commit b67bdda86cd4 ("devtools: catch empty symbol maps")) and there is nothing else to check in this map.

Fixes 7dde9c844a37 ("drivers: omit symbol map when unneeded")

---
Changes since v2:
- separated the Windows cleanup in next patch,

Changes since v1:
- excluded drivers/version.map from maps checked by default in check-symbol-maps.sh,

---
 devtools/check-symbol-maps.sh |  2 +-
 drivers/meson.build           | 68 +++++++++++++++++++----------------
 drivers/version.map           |  3 ++
 3 files changed, 41 insertions(+), 32 deletions(-)
 create mode 100644 drivers/version.map
devtools/check-symbol-maps.sh +1 -1
index 0a6062de26..8c116bfa9c 100755
@@ -8,7 +8,7 @@ cd $(dirname $0)/..
 export LC_ALL=C
 
 if [ $# = 0 ] ; then
-    set -- $(find lib drivers -name '*.map')
+    set -- $(find lib drivers -name '*.map' -a ! -path drivers/version.map)
 fi
 
 ret=0
drivers/meson.build +0 -13
index c4ff3ff1ba..5188302057 100644
@@ -210,40 +210,46 @@ foreach subpath:subdirs
 
         lk_deps = []
         lk_args = []
-        if fs.is_file(version_map)
-            def_file = custom_target(lib_name + '_def',
-                    command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
-                    input: version_map,
-                    output: '@0@_exports.def'.format(lib_name))
-
-            mingw_map = custom_target(lib_name + '_mingw',
-                    command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
-                    input: version_map,
-                    output: '@0@_mingw.map'.format(lib_name))
-
-            lk_deps = [version_map, def_file, mingw_map]
-            if is_windows

drivers/meson.build foreach subpath:subdirs · line 215

Quoted 10 lines
drivers/meson.build +3 -7
-                if is_ms_linker
-                    lk_args = ['-Wl,/def:' + def_file.full_path()]
-                    if meson.version().version_compare('<0.54.0')
-                        lk_args += ['-Wl,/implib:drivers\\' + implib]
-                    endif
-                else
-                    lk_args = ['-Wl,--version-script=' + mingw_map.full_path()]
+        if not fs.is_file(version_map)
+            version_map = '@0@/version.map'.format(meson.current_source_dir())
+            lk_deps += [version_map]

Technically, for this patch the lk_deps assignment does not need to be split into two, but it does make the second patch smaller, so I'm ok to keep this as you have in this version.

Quoted 58 lines
drivers/meson.build +34 -11
+        else
+            lk_deps += [version_map]
+            if not is_windows and developer_mode
+                # on unix systems check the output of the
+                # check-symbols.sh script, using it as a
+                # dependency of the .so build
+                lk_deps += custom_target(lib_name + '.sym_chk',
+                        command: [check_symbols, version_map, '@INPUT@'],
+                        capture: true,
+                        input: static_lib,
+                        output: lib_name + '.sym_chk')
+            endif
+        endif
+
+        def_file = custom_target(lib_name + '_def',
+                command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
+                input: version_map,
+                output: '@0@_exports.def'.format(lib_name))
+
+        mingw_map = custom_target(lib_name + '_mingw',
+                command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
+                input: version_map,
+                output: '@0@_mingw.map'.format(lib_name))
+
+        lk_deps += [def_file, mingw_map]
+
+        if is_windows
+            if is_ms_linker
+                lk_args = ['-Wl,/def:' + def_file.full_path()]
+                if meson.version().version_compare('<0.54.0')
+                    lk_args += ['-Wl,/implib:drivers\\' + implib]
                 endif
             else
-                lk_args = ['-Wl,--version-script=' + version_map]
-                if developer_mode
-                    # on unix systems check the output of the
-                    # check-symbols.sh script, using it as a
-                    # dependency of the .so build
-                    lk_deps += custom_target(lib_name + '.sym_chk',
-                            command: [check_symbols, version_map, '@INPUT@'],
-                            capture: true,
-                            input: static_lib,
-                            output: lib_name + '.sym_chk')
-                endif
+                lk_args = ['-Wl,--version-script=' + mingw_map.full_path()]
             endif
+        else
+            lk_args = ['-Wl,--version-script=' + version_map]
         endif
 
         shared_lib = shared_library(lib_name, sources,
drivers/version.map new file +0 -0
new file mode 100644
index 0000000000..78c3585d7c

drivers/version.map line 3

Quoted 3 lines
drivers/version.map new file +3 -0
@@ -0,0 +1,3 @@
+DPDK_23 {
+	local: *;
+};
#16 lore raw
Quoted 74 lines · Bruce Richardson
Quoted 72 lines · David Marchand

ld exports any global symbol by default if no version script is passed. As a consequence, the incriminated change let any public symbol leak out of the driver shared libraries.

Hide again those symbols by providing a default map file which unexports any global symbol using a local: * catch-all statement.

The checks are skipped for this default map file as it is intentionnally an empty map (see commit b67bdda86cd4 ("devtools: catch empty symbol maps")) and there is nothing else to check in this map.

Fixes 7dde9c844a37 ("drivers: omit symbol map when unneeded")

---
Changes since v2:
- separated the Windows cleanup in next patch,

Changes since v1:
- excluded drivers/version.map from maps checked by default in check-symbol-maps.sh,

---
 devtools/check-symbol-maps.sh |  2 +-
 drivers/meson.build           | 68 +++++++++++++++++++----------------
 drivers/version.map           |  3 ++
 3 files changed, 41 insertions(+), 32 deletions(-)
 create mode 100644 drivers/version.map
devtools/check-symbol-maps.sh +1 -1
index 0a6062de26..8c116bfa9c 100755
@@ -8,7 +8,7 @@ cd $(dirname $0)/..
 export LC_ALL=C
 
 if [ $# = 0 ] ; then
-    set -- $(find lib drivers -name '*.map')
+    set -- $(find lib drivers -name '*.map' -a ! -path drivers/version.map)
 fi
 
 ret=0
drivers/meson.build +0 -19
index c4ff3ff1ba..5188302057 100644
@@ -210,40 +210,46 @@ foreach subpath:subdirs
 
         lk_deps = []
         lk_args = []
-        if fs.is_file(version_map)
-            def_file = custom_target(lib_name + '_def',
-                    command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
-                    input: version_map,
-                    output: '@0@_exports.def'.format(lib_name))
-
-            mingw_map = custom_target(lib_name + '_mingw',
-                    command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
-                    input: version_map,
-                    output: '@0@_mingw.map'.format(lib_name))
-
-            lk_deps = [version_map, def_file, mingw_map]
-            if is_windows
-                if is_ms_linker
-                    lk_args = ['-Wl,/def:' + def_file.full_path()]
-                    if meson.version().version_compare('<0.54.0')
-                        lk_args += ['-Wl,/implib:drivers\\' + implib]
-                    endif
-                else
Quoted 8 lines

drivers/meson.build foreach subpath:subdirs · line 215

Quoted 4 lines
drivers/meson.build +3 -1
-                    lk_args = ['-Wl,--version-script=' + mingw_map.full_path()]
+        if not fs.is_file(version_map)
+            version_map = '@0@/version.map'.format(meson.current_source_dir())
+            lk_deps += [version_map]

Technically, for this patch the lk_deps assignment does not need to be split into two, but it does make the second patch smaller, so I'm ok to keep this as you have in this version.

Yes, otherwise, I would have kept it untouched.

Thanks for the review!

Signature · 1 line
David Marchand
#17 lore raw

PATCH v4 1/2 drivers: fix symbol exports when map is omitted

In reply to David Marchand

ld exports any global symbol by default if no version script is passed. As a consequence, the incriminated change let any public symbol leak out of the driver shared libraries.

Hide again those symbols by providing a default map file which unexports any global symbol using a local: * catch-all statement.

The checks are skipped for this default map file as it is intentionnally an empty map (see commit b67bdda86cd4 ("devtools: catch empty symbol maps")) and there is nothing else to check in this map.

This change impacts the exported symbols, hence, bump the version in the ABI check to the v22.11.1 from the 22.11 LTS branch.

Fixes 7dde9c844a37 ("drivers: omit symbol map when unneeded")

---
Changes since v3:
- updated ABI reference now that 22.11.1 is released,

Changes since v2:
- separated the Windows cleanup in next patch,

Changes since v1:
- excluded drivers/version.map from maps checked by default in check-symbol-maps.sh,

---
 .github/workflows/build.yml   |  3 +-
 .travis.yml                   |  3 +-
 devtools/check-symbol-maps.sh |  2 +-
 drivers/meson.build           | 68 +++++++++++++++++++----------------
 drivers/version.map           |  3 ++
 5 files changed, 45 insertions(+), 34 deletions(-)
 create mode 100644 drivers/version.map
.github/workflows/build.yml +2 -1
index 9527ad1f8c..6bad94098e 100644
@@ -25,7 +25,8 @@ jobs:
       MINGW: ${{ matrix.config.cross == 'mingw' }}
       MINI: ${{ matrix.config.mini != '' }}
       PPC64LE: ${{ matrix.config.cross == 'ppc64le' }}
-      REF_GIT_TAG: v22.11
+      REF_GIT_REPO: https://dpdk.org/git/dpdk-stable
+      REF_GIT_TAG: v22.11.1
       RISCV64: ${{ matrix.config.cross == 'riscv64' }}
       RUN_TESTS: ${{ contains(matrix.config.checks, 'tests') }}
 
.travis.yml +2 -1
index b99444620f..0936788dc7 100644
@@ -42,7 +42,8 @@ script: ./.ci/${TRAVIS_OS_NAME}-build.sh
 env:
   global:
     - LIBABIGAIL_VERSION=libabigail-2.1
-    - REF_GIT_TAG=v22.11
+    - REF_GIT_REPO=https://dpdk.org/git/dpdk-stable
+    - REF_GIT_TAG=v22.11.1
 
 jobs:
   include:
devtools/check-symbol-maps.sh +1 -1
index 0a6062de26..8c116bfa9c 100755
@@ -8,7 +8,7 @@ cd $(dirname $0)/..
 export LC_ALL=C
 
 if [ $# = 0 ] ; then
-    set -- $(find lib drivers -name '*.map')
+    set -- $(find lib drivers -name '*.map' -a ! -path drivers/version.map)
 fi
 
 ret=0
drivers/meson.build +37 -31

77 lines not on this page · raw message

drivers/version.map new file +3 -0
new file mode 100644
index 0000000000..78c3585d7c
@@ -0,0 +1,3 @@
+DPDK_23 {
+	local: *;
+};
Signature · 1 line
2.38.1
#18 lore raw

PATCH v4 2/2 build: generate Windows build artefacts when needed

We have been generating some Windows and mingw artefacts on all OS while there is no need for them.

---
 drivers/meson.build | 27 +++++++++++++--------------
 lib/meson.build     | 29 +++++++++++++++--------------
 2 files changed, 28 insertions(+), 28 deletions(-)
drivers/meson.build +13 -14
index 5188302057..c6d619200f 100644
@@ -206,7 +206,6 @@ foreach subpath:subdirs
 
         # now build the shared driver
         version_map = '@0@/@1@/version.map'.format(meson.current_source_dir(), drv_path)
-        implib = 'lib' + lib_name + '.dll.a'
 
         lk_deps = []
         lk_args = []
@@ -227,25 +226,25 @@ foreach subpath:subdirs
             endif
         endif
 
-        def_file = custom_target(lib_name + '_def',
-                command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
-                input: version_map,
-                output: '@0@_exports.def'.format(lib_name))
-
-        mingw_map = custom_target(lib_name + '_mingw',
-                command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
-                input: version_map,
-                output: '@0@_mingw.map'.format(lib_name))
-
-        lk_deps += [def_file, mingw_map]
-
         if is_windows
             if is_ms_linker
+                def_file = custom_target(lib_name + '_def',
+                        command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
+                        input: version_map,
+                        output: '@0@_exports.def'.format(lib_name))
+                lk_deps += [def_file]
+
                 lk_args = ['-Wl,/def:' + def_file.full_path()]
                 if meson.version().version_compare('<0.54.0')
-                    lk_args += ['-Wl,/implib:drivers\\' + implib]
+                    lk_args += ['-Wl,/implib:drivers\\lib' + lib_name + '.dll.a']
                 endif
             else
+                mingw_map = custom_target(lib_name + '_mingw',
+                        command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
+                        input: version_map,
+                        output: '@0@_mingw.map'.format(lib_name))
+                lk_deps += [mingw_map]
+
                 lk_args = ['-Wl,--version-script=' + mingw_map.full_path()]
             endif
         else
lib/meson.build +15 -14
index fd55925340..a90fee31b7 100644
@@ -224,34 +224,35 @@ foreach l:libraries
         # RTE_BUILD_SHARED_LIB defined
         cflags += '-DRTE_BUILD_SHARED_LIB'
     endif
-    version_map = '@0@/@1@/version.map'.format(
-            meson.current_source_dir(), l)
-    implib = 'librte_' + l + '.dll.a'
 
-    def_file = custom_target(libname + '_def',
-            command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
-            input: version_map,
-            output: '@0@_exports.def'.format(libname))
-
-    mingw_map = custom_target(libname + '_mingw',
-            command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
-            input: version_map,
-            output: '@0@_mingw.map'.format(libname))
+    version_map = '@0@/@1@/version.map'.format(meson.current_source_dir(), l)
+    lk_deps = [version_map]
 
     if is_ms_linker
+        def_file = custom_target(libname + '_def',
+                command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
+                input: version_map,
+                output: '@0@_exports.def'.format(libname))
+        lk_deps += [def_file]
+
         lk_args = ['-Wl,/def:' + def_file.full_path()]
         if meson.version().version_compare('<0.54.0')
-            lk_args += ['-Wl,/implib:lib\\' + implib]
+            lk_args += ['-Wl,/implib:lib\\librte_' + l + '.dll.a']
         endif
     else
         if is_windows
+            mingw_map = custom_target(libname + '_mingw',
+                    command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
+                    input: version_map,
+                    output: '@0@_mingw.map'.format(libname))
+            lk_deps += [mingw_map]
+
             lk_args = ['-Wl,--version-script=' + mingw_map.full_path()]
         else
             lk_args = ['-Wl,--version-script=' + version_map]
         endif
     endif
 
-    lk_deps = [version_map, def_file, mingw_map]
     if developer_mode and not is_windows
         # on unix systems check the output of the
         # check-symbols.sh script, using it as a
Signature · 1 line
2.38.1
Acked-by on v4 1/2
#19 lore raw
In reply to David Marchand
Quoted 14 lines · David Marchand

ld exports any global symbol by default if no version script is passed. As a consequence, the incriminated change let any public symbol leak out of the driver shared libraries.

Hide again those symbols by providing a default map file which unexports any global symbol using a local: * catch-all statement.

The checks are skipped for this default map file as it is intentionnally an empty map (see commit b67bdda86cd4 ("devtools: catch empty symbol maps")) and there is nothing else to check in this map.

This change impacts the exported symbols, hence, bump the version in the ABI check to the v22.11.1 from the 22.11 LTS branch.

Quoted 8 lines
Fixes 7dde9c844a37 ("drivers: omit symbol map when unneeded")

---

#20 lore raw
Quoted 17 lines · Aaron Conole
Quoted 14 lines · David Marchand

ld exports any global symbol by default if no version script is passed. As a consequence, the incriminated change let any public symbol leak out of the driver shared libraries.

Hide again those symbols by providing a default map file which unexports any global symbol using a local: * catch-all statement.

The checks are skipped for this default map file as it is intentionnally an empty map (see commit b67bdda86cd4 ("devtools: catch empty symbol maps")) and there is nothing else to check in this map.

This change impacts the exported symbols, hence, bump the version in the ABI check to the v22.11.1 from the 22.11 LTS branch.

Quoted 8 lines
Quoted 7 lines
Fixes 7dde9c844a37 ("drivers: omit symbol map when unneeded")

Series applied.

Please, maintainers and CI teams, when you enable ABI checks in the main branch, or in the 22.11 LTS branch, use the dpdk-stable 22.11.1 tag as a reference.
Thanks.

Signature · 1 line
David Marchand
#21 lore raw
Quoted 25 lines · Aaron Conole
Quoted 24 lines
Quoted 21 lines · David Marchand

ld exports any global symbol by default if no version script is passed. As a consequence, the incriminated change let any public symbol leak out of the driver shared libraries.

Hide again those symbols by providing a default map file which unexports any global symbol using a local: * catch-all statement.

The checks are skipped for this default map file as it is intentionnally an empty map (see commit b67bdda86cd4 ("devtools: catch empty symbol maps")) and there is nothing else to check in this map.

This change impacts the exported symbols, hence, bump the version in the ABI check to the v22.11.1 from the 22.11 LTS branch.

Fixes 7dde9c844a37 ("drivers: omit symbol map when unneeded")
Quoted 8 lines
Quoted 1 line

Series applied.

Please, maintainers and CI teams, when you enable ABI checks in the main branch, or in the 22.11 LTS branch, use the dpdk-stable 22.11.1 tag as a reference.
Thanks.

Should we also add a tag on main repo, as new development does not happen on stable tree?

Regards,
Akhil

#22 lore raw
Quoted 7 lines · Akhil Goyal
Quoted 4 lines

Please, maintainers and CI teams, when you enable ABI checks in the main branch, or in the 22.11 LTS branch, use the dpdk-stable 22.11.1 tag as a reference.
Thanks.

Should we also add a tag on main repo, as new development does not happen on stable tree?

You can fetch the v22.11.1 tag from the stable tree.

Signature · 1 line
David Marchand
#23 lore raw
Quoted 10 lines · Akhil Goyal
Quoted 7 lines
Quoted 4 lines

Please, maintainers and CI teams, when you enable ABI checks in the main branch, or in the 22.11 LTS branch, use the dpdk-stable 22.11.1 tag as a reference.
Thanks.

Should we also add a tag on main repo, as new development does not happen on stable tree?

You can fetch the v22.11.1 tag from the stable tree.

Yes, that is an obvious option.
But adding a tag on same repo is more convenient from developer point of view. However, it is my personal view, others may differ.

-Akhil

#24 lore raw

05/12/2022 14:47, Akhil Goyal:

Quoted 6 lines
Quoted 6 lines · Akhil Goyal
Quoted 5 lines
Quoted 4 lines

Please, maintainers and CI teams, when you enable ABI checks in the main branch, or in the 22.11 LTS branch, use the dpdk-stable 22.11.1 tag as a reference.
Thanks.

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

Should we also add a tag on main repo, as new development does not happen on stable tree?

You can fetch the v22.11.1 tag from the stable tree.

Yes, that is an obvious option.
But adding a tag on same repo is more convenient from developer point of view. However, it is my personal view, others may differ.

From developer point of view, you should use devtools/test-meson-builds.sh which does the "git clone" for you.

This is what I have in ~/.config/dpdk/devel.config export DPDK_ABI_REF_DIR=$root/dpdk-build/abiref export DPDK_ABI_REF_VERSION=v22.11.1

#25 lore raw
Quoted 15 lines

05/12/2022 14:47, Akhil Goyal:

Quoted 7 lines
Quoted 7 lines · Akhil Goyal
Quoted 6 lines
Quoted 4 lines

Please, maintainers and CI teams, when you enable ABI checks in the main branch, or in the 22.11 LTS branch, use the dpdk-stable 22.11.1 tag as a reference.
Thanks.

Should we also add a tag on main repo, as new development does not

happen

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

on stable tree?

You can fetch the v22.11.1 tag from the stable tree.

Yes, that is an obvious option.
But adding a tag on same repo is more convenient from developer point of

view.

Quoted 8 lines
Quoted 1 line

However, it is my personal view, others may differ.

From developer point of view, you should use devtools/test-meson-builds.sh which does the "git clone" for you.

This is what I have in ~/.config/dpdk/devel.config export DPDK_ABI_REF_DIR=$root/dpdk-build/abiref export DPDK_ABI_REF_VERSION=v22.11.1

Ok got it, thanks.

#26 lore raw
In reply to Thomas Monjalon
Quoted 15 lines · Thomas Monjalon

05/12/2022 14:47, Akhil Goyal:

Quoted 6 lines
Quoted 6 lines · Akhil Goyal
Quoted 5 lines
Quoted 4 lines

Please, maintainers and CI teams, when you enable ABI checks in the main branch, or in the 22.11 LTS branch, use the dpdk-stable 22.11.1 tag as a reference.
Thanks.

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

Should we also add a tag on main repo, as new development does not happen on stable tree?

You can fetch the v22.11.1 tag from the stable tree.

Yes, that is an obvious option.
But adding a tag on same repo is more convenient from developer point of view. However, it is my personal view, others may differ.

Quoted 7 lines

From developer point of view, you should use devtools/test-meson-builds.sh which does the "git clone" for you.

This is what I have in ~/.config/dpdk/devel.config export DPDK_ABI_REF_DIR=$root/dpdk-build/abiref export DPDK_ABI_REF_VERSION=v22.11.1

Does it help to update 'test-meson-builds.sh' to use an environment variable to select which repo to clone?
If so, I can send a patch for it.

#27 lore raw
Quoted 8 lines · Ferruh Yigit
Quoted 7 lines · Thomas Monjalon

05/12/2022 14:47, Akhil Goyal:

Quoted 2 lines

But adding a tag on same repo is more convenient from developer point of view. However, it is my personal view, others may differ.

From developer point of view, you should use devtools/test-meson-builds.sh which does the "git clone" for you.

Quoted 8 lines
Quoted 4 lines

This is what I have in ~/.config/dpdk/devel.config export DPDK_ABI_REF_DIR=$root/dpdk-build/abiref export DPDK_ABI_REF_VERSION=v22.11.1

Does it help to update 'test-meson-builds.sh' to use an environment variable to select which repo to clone?
If so, I can send a patch for it.

I was wondering too...
I would expect most maintainers have the stable repo in their config but it would not hurt to handle the case when they don't for others.

+1

Signature · 1 line
David Marchand
#28 lore raw
Quoted 18 lines · David Marchand
Quoted 8 lines · Ferruh Yigit
Quoted 7 lines · Thomas Monjalon

05/12/2022 14:47, Akhil Goyal:

Quoted 2 lines

But adding a tag on same repo is more convenient from developer point of view. However, it is my personal view, others may differ.

From developer point of view, you should use devtools/test-meson-builds.sh which does the "git clone" for you.

Quoted 8 lines
Quoted 4 lines

This is what I have in ~/.config/dpdk/devel.config export DPDK_ABI_REF_DIR=$root/dpdk-build/abiref export DPDK_ABI_REF_VERSION=v22.11.1

Does it help to update 'test-meson-builds.sh' to use an environment variable to select which repo to clone?
If so, I can send a patch for it.

Quoted 7 lines

I was wondering too...
I would expect most maintainers have the stable repo in their config but it would not hurt to handle the case when they don't for others.

+1

Sent following if it helps:
https://patches.dpdk.org/project/dpdk/list/?series=26015

#29 lore raw

Hello,

Community Lab team members are wondering whether it is possible to bump v22.11 to include at least this patch. We have an existing codebase which relies on a vXX.XX scheme for producing ABI references. We parse that out at different places in our code, so fixing this to handle vXX.XX.X will require some changes on our end. We can do that, but it puts the timeline on turning on ABI testing at the community lab back some. A v22.11 tagged release with this patch would allow for us to turn on ABI testing immediately. There was also a suggestion that having the "base" tag (like the simple v22.11) point to the latest revision is a more standard version naming approach and may be more intuitive than what is being used currently.

If that is not possible, we will update our code to be able to refer to a vXX.XX.X tag for producing the ABI reference. If we adopt this approach, we would like to request that with future releases, a "vXX.XX.0" tag could always be made available for us to produce ABI references from. That way, we can prepare for turning on ABI testing knowing beforehand the tag name we will be using.

Quoted 33 lines · Ferruh Yigit
Quoted 1 line · David Marchand

On Tue, Dec 6, 2022 at 11:13 AM Ferruh Yigit <[email protected]>

Quoted 3 lines · wrote:
Quoted 3 lines · Thomas Monjalon
Quoted 2 lines

05/12/2022 14:47, Akhil Goyal:

Quoted 1 line

But adding a tag on same repo is more convenient from developer point

of view.

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line

However, it is my personal view, others may differ.

From developer point of view, you should use

devtools/test-meson-builds.sh

Quoted 11 lines
Quoted 10 lines
Quoted 6 lines

which does the "git clone" for you.

This is what I have in ~/.config/dpdk/devel.config export DPDK_ABI_REF_DIR=$root/dpdk-build/abiref export DPDK_ABI_REF_VERSION=v22.11.1

Does it help to update 'test-meson-builds.sh' to use an environment variable to select which repo to clone?
If so, I can send a patch for it.

Quoted 7 lines

I was wondering too...
I would expect most maintainers have the stable repo in their config but it would not hurt to handle the case when they don't for others.

+1

Sent following if it helps:
https://patches.dpdk.org/project/dpdk/list/?series=26015

Signature · 9 lines
Patrick Robb

Technical Service Manager

UNH InterOperability Laboratory

21 Madbury Rd, Suite 100, Durham, NH 03824

www.iol.unh.edu
#30 lore raw

I'm sorry Patrick that it gives you more work.
Your proposals below don't look possible because a tag is something fixed forever. We had an ABI issue in the initial tag so we cannot use the tag v22.11 as planned. I don't see how we can better plan except having more tests on release candidates.

07/12/2022 19:00, Patrick Robb:

Quoted 52 lines

Hello,

Community Lab team members are wondering whether it is possible to bump v22.11 to include at least this patch. We have an existing codebase which relies on a vXX.XX scheme for producing ABI references. We parse that out at different places in our code, so fixing this to handle vXX.XX.X will require some changes on our end. We can do that, but it puts the timeline on turning on ABI testing at the community lab back some. A v22.11 tagged release with this patch would allow for us to turn on ABI testing immediately. There was also a suggestion that having the "base" tag (like the simple v22.11) point to the latest revision is a more standard version naming approach and may be more intuitive than what is being used currently.

If that is not possible, we will update our code to be able to refer to a vXX.XX.X tag for producing the ABI reference. If we adopt this approach, we would like to request that with future releases, a "vXX.XX.0" tag could always be made available for us to produce ABI references from. That way, we can prepare for turning on ABI testing knowing beforehand the tag name we will be using.

Quoted 30 lines · Ferruh Yigit
Quoted 1 line · David Marchand

On Tue, Dec 6, 2022 at 11:13 AM Ferruh Yigit <[email protected]>

Quoted 3 lines · wrote:
Quoted 3 lines · Thomas Monjalon
Quoted 2 lines

05/12/2022 14:47, Akhil Goyal:

Quoted 1 line

But adding a tag on same repo is more convenient from developer point

of view.

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line

However, it is my personal view, others may differ.

From developer point of view, you should use

devtools/test-meson-builds.sh

Quoted 11 lines
Quoted 10 lines
Quoted 6 lines

which does the "git clone" for you.

This is what I have in ~/.config/dpdk/devel.config export DPDK_ABI_REF_DIR=$root/dpdk-build/abiref export DPDK_ABI_REF_VERSION=v22.11.1

Does it help to update 'test-meson-builds.sh' to use an environment variable to select which repo to clone?
If so, I can send a patch for it.

Quoted 5 lines

I was wondering too...
I would expect most maintainers have the stable repo in their config but it would not hurt to handle the case when they don't for others.

+1

Sent following if it helps:
https://patches.dpdk.org/project/dpdk/list/?series=26015

#31 lore raw

Thomas - thanks for the response. We will proceed with making the necessary changes for using v22.11.1.

Quoted 73 lines · Thomas Monjalon

I'm sorry Patrick that it gives you more work.
Your proposals below don't look possible because a tag is something fixed forever.
We had an ABI issue in the initial tag so we cannot use the tag v22.11 as planned.
I don't see how we can better plan except having more tests on release candidates.

07/12/2022 19:00, Patrick Robb:

Quoted 11 lines

Hello,

Community Lab team members are wondering whether it is possible to bump v22.11 to include at least this patch. We have an existing codebase which relies on a vXX.XX scheme for producing ABI references. We parse that out at different places in our code, so fixing this to handle vXX.XX.X will require some changes on our end. We can do that, but it puts the timeline on turning on ABI testing at the community lab back some. A v22.11 tagged release with this patch would allow for us to turn on ABI testing immediately. There was also a suggestion that having the "base" tag (like the simple v22.11) point to the latest revision is a more standard

version

Quoted 1 line

naming approach and may be more intuitive than what is being used

currently.

Quoted 3 lines

If that is not possible, we will update our code to be able to refer to a vXX.XX.X tag for producing the ABI reference. If we adopt this approach,

we

Quoted 6 lines

would like to request that with future releases, a "vXX.XX.0" tag could always be made available for us to produce ABI references from. That way, we can prepare for turning on ABI testing knowing beforehand the tag name we will be using.

On Tue, Dec 6, 2022 at 7:25 AM Ferruh Yigit <[email protected]>

Quoted 7 lines · wrote:
Quoted 7 lines · David Marchand
Quoted 1 line

On Tue, Dec 6, 2022 at 11:13 AM Ferruh Yigit <[email protected]>

Quoted 3 lines · wrote:
Quoted 3 lines · Thomas Monjalon
Quoted 2 lines

05/12/2022 14:47, Akhil Goyal:

Quoted 1 line

But adding a tag on same repo is more convenient from developer

point

Quoted 24 lines
Quoted 24 lines

of view.

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line

However, it is my personal view, others may differ.

From developer point of view, you should use

devtools/test-meson-builds.sh

Quoted 11 lines
Quoted 10 lines
Quoted 6 lines

which does the "git clone" for you.

This is what I have in ~/.config/dpdk/devel.config export DPDK_ABI_REF_DIR=$root/dpdk-build/abiref export DPDK_ABI_REF_VERSION=v22.11.1

Does it help to update 'test-meson-builds.sh' to use an environment variable to select which repo to clone?
If so, I can send a patch for it.

Quoted 5 lines

I was wondering too...
I would expect most maintainers have the stable repo in their config but it would not hurt to handle the case when they don't for others.

+1

Sent following if it helps:
https://patches.dpdk.org/project/dpdk/list/?series=26015

Signature · 9 lines
Patrick Robb

Technical Service Manager

UNH InterOperability Laboratory

21 Madbury Rd, Suite 100, Durham, NH 03824

www.iol.unh.edu