Skip to contentSkip to conversation

Minor abi-validator improvements

PATCH Superseded Panu Matilainen 3 participants 14 messages Sep 24, 2015 – Dec 3, 2015

lore
Share & tools
lore
#0 lore raw

cover Minor abi-validator improvements

For giggles, tried running abi-validator between 2.0 and 2.1 on my Fedora 22 laptop, didn't work due to various build failures. With this patch series the following now succeeds:

EXTRA_CFLAGS="-Wno-error" scripts/validate-abi.sh v2.0.0 v2.1.0 x86_64-native-linuxapp-gcc

Panu Matilainen (3):
scripts: permit passing extra compiler & linker flags to ABI validator
scripts: move two identical config fixups into a function
scripts: teach ABI validator about CONFIG_RTE_KNI_KMOD

 scripts/validate-abi.sh | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)
Signature · 1 line
2.4.3
#1 lore raw

PATCH 1/3 scripts: permit passing extra compiler & linker flags to ABI validator

Its sometimes necessary to disable warnings etc to get an older version of code to build.

---
 scripts/validate-abi.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
scripts/validate-abi.sh +2 -2
index 4476433..b9c9989 100755
@@ -164,8 +164,8 @@ sed -i -e"$ a\CONFIG_RTE_LIBRTE_KNI=n" config/defconfig_$TARGET
 # Checking abi compliance relies on using the dwarf information in
 # The shared objects.  Thats only included in the DSO's if we build
 # with -g
-export EXTRA_CFLAGS=-g
-export EXTRA_LDFLAGS=-g
+export EXTRA_CFLAGS="$EXTRA_CFLAGS -g"
+export EXTRA_LDFLAGS="$EXTRA_LDFLAGS -g"
 
 # Now configure the build
 log "INFO" "Configuring DPDK $TAG1"
Signature · 1 line
2.4.3
#2 lore raw

PATCH 2/3 scripts: move two identical config fixups into a function

In reply to Panu Matilainen
---
 scripts/validate-abi.sh | 25 ++++++++++++-------------
 1 file changed, 12 insertions(+), 13 deletions(-)
scripts/validate-abi.sh +12 -13
index b9c9989..4b555de 100755
@@ -81,6 +81,15 @@ cleanup_and_exit() {
 	exit $1
 }
 
+# Make sure we configure SHARED libraries
+# Also turn off IGB and KNI as those require kernel headers to build
+fixup_config() {
+	sed -i -e"$ a\CONFIG_RTE_BUILD_SHARED_LIB=y" config/defconfig_$TARGET
+	sed -i -e"$ a\CONFIG_RTE_NEXT_ABI=n" config/defconfig_$TARGET
+	sed -i -e"$ a\CONFIG_RTE_EAL_IGB_UIO=n" config/defconfig_$TARGET
+	sed -i -e"$ a\CONFIG_RTE_LIBRTE_KNI=n" config/defconfig_$TARGET
+}
+
 ###########################################
 #START
 ############################################
@@ -154,12 +163,7 @@ log "INFO" "Checking out version $TAG1 of the dpdk"
 # Move to the old version of the tree
 git checkout $TAG1
 
-# Make sure we configure SHARED libraries
-# Also turn off IGB and KNI as those require kernel headers to build
-sed -i -e"$ a\CONFIG_RTE_BUILD_SHARED_LIB=y" config/defconfig_$TARGET
-sed -i -e"$ a\CONFIG_RTE_NEXT_ABI=n" config/defconfig_$TARGET
-sed -i -e"$ a\CONFIG_RTE_EAL_IGB_UIO=n" config/defconfig_$TARGET
-sed -i -e"$ a\CONFIG_RTE_LIBRTE_KNI=n" config/defconfig_$TARGET
+fixup_config
 
 # Checking abi compliance relies on using the dwarf information in
 # The shared objects.  Thats only included in the DSO's if we build
@@ -167,6 +171,8 @@ sed -i -e"$ a\CONFIG_RTE_LIBRTE_KNI=n" config/defconfig_$TARGET
 export EXTRA_CFLAGS="$EXTRA_CFLAGS -g"
 export EXTRA_LDFLAGS="$EXTRA_LDFLAGS -g"
 
+fixup_config
+
 # Now configure the build
 log "INFO" "Configuring DPDK $TAG1"
 make config T=$TARGET O=$TARGET > $VERBOSE 2>&1
@@ -196,13 +202,6 @@ git reset --hard
 log "INFO" "Checking out version $TAG2 of the dpdk"
 git checkout $TAG2
 
-# Make sure we configure SHARED libraries
-# Also turn off IGB and KNI as those require kernel headers to build
-sed -i -e"$ a\CONFIG_RTE_BUILD_SHARED_LIB=y" config/defconfig_$TARGET
-sed -i -e"$ a\CONFIG_RTE_NEXT_ABI=n" config/defconfig_$TARGET
-sed -i -e"$ a\CONFIG_RTE_EAL_IGB_UIO=n" config/defconfig_$TARGET
-sed -i -e"$ a\CONFIG_RTE_LIBRTE_KNI=n" config/defconfig_$TARGET
-
 # Now configure the build
 log "INFO" "Configuring DPDK $TAG2"
 make config T=$TARGET O=$TARGET > $VERBOSE 2>&1
Signature · 1 line
2.4.3
#3 lore raw

Re: [PATCH 2/3] scripts: move two identical config fixups into a function

Quoted 12 lines · Panu Matilainen

# Checking abi compliance relies on using the dwarf information in # The shared objects. Thats only included in the DSO's if we build

scripts/validate-abi.sh +2 -0
@@ -167,6 +171,8 @@ sed -i -e"$ a\CONFIG_RTE_LIBRTE_KNI=n" config/defconfig_$TARGET
  export EXTRA_CFLAGS="$EXTRA_CFLAGS -g"
  export EXTRA_LDFLAGS="$EXTRA_LDFLAGS -g"
 
+fixup_config
+
  # Now configure the build
  log "INFO" "Configuring DPDK $TAG1"
  make config T=$TARGET O=$TARGET > $VERBOSE 2>&1

scripts/validate-abi.sh git reset --hard · line 205

Quoted 10 lines
scripts/validate-abi.sh +0 -7
@@ -196,13 +202,6 @@ git reset --hard
  log "INFO" "Checking out version $TAG2 of the dpdk"
  git checkout $TAG2
 
-# Make sure we configure SHARED libraries
-# Also turn off IGB and KNI as those require kernel headers to build
-sed -i -e"$ a\CONFIG_RTE_BUILD_SHARED_LIB=y" config/defconfig_$TARGET
-sed -i -e"$ a\CONFIG_RTE_NEXT_ABI=n" config/defconfig_$TARGET
-sed -i -e"$ a\CONFIG_RTE_EAL_IGB_UIO=n" config/defconfig_$TARGET
-sed -i -e"$ a\CONFIG_RTE_LIBRTE_KNI=n" config/defconfig_$TARGET
-

Doh. Obvious brain damage here, will send v2 after fetching apparently needed additional coffee.

- Panu -

#4 lore raw

PATCH 3/3 scripts: teach ABI validator about CONFIG_RTE_KNI_KMOD

In reply to Panu Matilainen

The validator attempts to disable all kernel modules but since commit 36080ff96b0eb37a6da8c4fec1a2f8a57dfadf5b fails to do so for KNI, causing the build stage to fail if kernel headers are missing.

With the introduction of CONFIG_RTE_KNI_KMOD, CONFIG_RTE_LIBRTE_KNI=n can eventually be dropped but leaving it around for now as its needed with pre-2.1 versions.

---
 scripts/validate-abi.sh | 1 +
 1 file changed, 1 insertion(+)
scripts/validate-abi.sh +1 -0
index 4b555de..6be67d0 100755
@@ -88,6 +88,7 @@ fixup_config() {
 	sed -i -e"$ a\CONFIG_RTE_NEXT_ABI=n" config/defconfig_$TARGET
 	sed -i -e"$ a\CONFIG_RTE_EAL_IGB_UIO=n" config/defconfig_$TARGET
 	sed -i -e"$ a\CONFIG_RTE_LIBRTE_KNI=n" config/defconfig_$TARGET
+	sed -i -e"$ a\CONFIG_RTE_KNI_KMOD=n" config/defconfig_$TARGET
 }
 
 ###########################################
Signature · 1 line
2.4.3
#5 lore raw

v2 cover Minor abi-validator improvements

In reply to Panu Matilainen

For giggles, tried running abi-validator between 2.0 and 2.1 on my Fedora 22 laptop, didn't work due to various build failures. With this patch series the following now succeeds:

EXTRA_CFLAGS="-Wno-error" scripts/validate-abi.sh v2.0.0 v2.1.0 x86_64-native-linuxapp-gcc

Panu Matilainen (3):
scripts: permit passing extra compiler & linker flags to ABI validator
scripts: move two identical config fixups into a function
scripts: teach ABI validator about CONFIG_RTE_KNI_KMOD

 scripts/validate-abi.sh | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)
Signature · 1 line
2.4.3
#6 lore raw

PATCH 1/3 scripts: permit passing extra compiler & linker flags to ABI validator

Its sometimes necessary to disable warnings etc to get an older version of code to build.

---
 scripts/validate-abi.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
scripts/validate-abi.sh +2 -2
index 4476433..b9c9989 100755
@@ -164,8 +164,8 @@ sed -i -e"$ a\CONFIG_RTE_LIBRTE_KNI=n" config/defconfig_$TARGET
 # Checking abi compliance relies on using the dwarf information in
 # The shared objects.  Thats only included in the DSO's if we build
 # with -g
-export EXTRA_CFLAGS=-g
-export EXTRA_LDFLAGS=-g
+export EXTRA_CFLAGS="$EXTRA_CFLAGS -g"
+export EXTRA_LDFLAGS="$EXTRA_LDFLAGS -g"
 
 # Now configure the build
 log "INFO" "Configuring DPDK $TAG1"
Signature · 1 line
2.4.3
#7 lore raw

PATCH 2/3 scripts: move two identical config fixups into a function

In reply to Panu Matilainen
---
 scripts/validate-abi.sh | 23 +++++++++++------------
 1 file changed, 11 insertions(+), 12 deletions(-)
scripts/validate-abi.sh +11 -12
index b9c9989..12946d4 100755
@@ -81,6 +81,15 @@ cleanup_and_exit() {
 	exit $1
 }
 
+# Make sure we configure SHARED libraries
+# Also turn off IGB and KNI as those require kernel headers to build
+fixup_config() {
+	sed -i -e"$ a\CONFIG_RTE_BUILD_SHARED_LIB=y" config/defconfig_$TARGET
+	sed -i -e"$ a\CONFIG_RTE_NEXT_ABI=n" config/defconfig_$TARGET
+	sed -i -e"$ a\CONFIG_RTE_EAL_IGB_UIO=n" config/defconfig_$TARGET
+	sed -i -e"$ a\CONFIG_RTE_LIBRTE_KNI=n" config/defconfig_$TARGET
+}
+
 ###########################################
 #START
 ############################################
@@ -154,12 +163,7 @@ log "INFO" "Checking out version $TAG1 of the dpdk"
 # Move to the old version of the tree
 git checkout $TAG1
 
-# Make sure we configure SHARED libraries
-# Also turn off IGB and KNI as those require kernel headers to build
-sed -i -e"$ a\CONFIG_RTE_BUILD_SHARED_LIB=y" config/defconfig_$TARGET
-sed -i -e"$ a\CONFIG_RTE_NEXT_ABI=n" config/defconfig_$TARGET
-sed -i -e"$ a\CONFIG_RTE_EAL_IGB_UIO=n" config/defconfig_$TARGET
-sed -i -e"$ a\CONFIG_RTE_LIBRTE_KNI=n" config/defconfig_$TARGET
+fixup_config
 
 # Checking abi compliance relies on using the dwarf information in
 # The shared objects.  Thats only included in the DSO's if we build
@@ -196,12 +200,7 @@ git reset --hard
 log "INFO" "Checking out version $TAG2 of the dpdk"
 git checkout $TAG2
 
-# Make sure we configure SHARED libraries
-# Also turn off IGB and KNI as those require kernel headers to build
-sed -i -e"$ a\CONFIG_RTE_BUILD_SHARED_LIB=y" config/defconfig_$TARGET
-sed -i -e"$ a\CONFIG_RTE_NEXT_ABI=n" config/defconfig_$TARGET
-sed -i -e"$ a\CONFIG_RTE_EAL_IGB_UIO=n" config/defconfig_$TARGET
-sed -i -e"$ a\CONFIG_RTE_LIBRTE_KNI=n" config/defconfig_$TARGET
+fixup_config
 
 # Now configure the build
 log "INFO" "Configuring DPDK $TAG2"
Signature · 1 line
2.4.3
#8 lore raw

PATCH 3/3 scripts: teach ABI validator about CONFIG_RTE_KNI_KMOD

In reply to Panu Matilainen

The validator attempts to disable all kernel modules but since commit 36080ff96b0eb37a6da8c4fec1a2f8a57dfadf5b fails to do so for KNI, causing the build stage to fail if kernel headers are missing.

With the introduction of CONFIG_RTE_KNI_KMOD, CONFIG_RTE_LIBRTE_KNI=n can eventually be dropped but leaving it around for now as its needed with pre-2.1 versions.

---
 scripts/validate-abi.sh | 1 +
 1 file changed, 1 insertion(+)
scripts/validate-abi.sh +1 -0
index 12946d4..cbf9d7f 100755
@@ -88,6 +88,7 @@ fixup_config() {
 	sed -i -e"$ a\CONFIG_RTE_NEXT_ABI=n" config/defconfig_$TARGET
 	sed -i -e"$ a\CONFIG_RTE_EAL_IGB_UIO=n" config/defconfig_$TARGET
 	sed -i -e"$ a\CONFIG_RTE_LIBRTE_KNI=n" config/defconfig_$TARGET
+	sed -i -e"$ a\CONFIG_RTE_KNI_KMOD=n" config/defconfig_$TARGET
 }
 
 ###########################################
Signature · 1 line
2.4.3
Acked-by on the v2 series
#9 lore raw
In reply to Panu Matilainen
Quoted 6 lines · Panu Matilainen

For giggles, tried running abi-validator between 2.0 and 2.1 on my Fedora 22 laptop, didn't work due to various build failures. With this patch series the following now succeeds:

EXTRA_CFLAGS="-Wno-error" scripts/validate-abi.sh v2.0.0 v2.1.0 x86_64-native-linuxapp-gcc

Quoted 12 lines

Panu Matilainen (3):
scripts: permit passing extra compiler & linker flags to ABI validator
scripts: move two identical config fixups into a function
scripts: teach ABI validator about CONFIG_RTE_KNI_KMOD

 scripts/validate-abi.sh | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)
Signature · 1 line
2.4.3

series

#10 lore raw
Quoted 15 lines · Neil Horman
Quoted 14 lines · Panu Matilainen

For giggles, tried running abi-validator between 2.0 and 2.1 on my Fedora 22 laptop, didn't work due to various build failures. With this patch series the following now succeeds:

EXTRA_CFLAGS="-Wno-error" scripts/validate-abi.sh v2.0.0 v2.1.0 x86_64-native-linuxapp-gcc

Panu Matilainen (3):
scripts: permit passing extra compiler & linker flags to ABI validator
scripts: move two identical config fixups into a function
scripts: teach ABI validator about CONFIG_RTE_KNI_KMOD

  scripts/validate-abi.sh | 28 ++++++++++++++--------------
  1 file changed, 14 insertions(+), 14 deletions(-)
Quoted 7 lines
Quoted 4 lines

--
2.4.3

series

Thomas, any particular reason this hasn't been applied yet?

- Panu -

#11 lore raw

2015-11-11 09:07, Panu Matilainen:

Quoted 21 lines · Neil Horman
Quoted 20 lines · Panu Matilainen
Quoted 18 lines

For giggles, tried running abi-validator between 2.0 and 2.1 on my Fedora 22 laptop, didn't work due to various build failures. With this patch series the following now succeeds:

EXTRA_CFLAGS="-Wno-error" scripts/validate-abi.sh v2.0.0 v2.1.0 x86_64-native-linuxapp-gcc

Panu Matilainen (3):
scripts: permit passing extra compiler & linker flags to ABI validator
scripts: move two identical config fixups into a function
scripts: teach ABI validator about CONFIG_RTE_KNI_KMOD

  scripts/validate-abi.sh | 28 ++++++++++++++--------------
  1 file changed, 14 insertions(+), 14 deletions(-)

--
2.4.3

Quoted 4 lines
Quoted 2 lines

series

Thomas, any particular reason this hasn't been applied yet?

It was not the priority until now. I was busy with the drivers. For next release, the integration should be easier because Bruce will help with a drivers tree.

#12 lore raw
Quoted 22 lines · Thomas Monjalon

2015-11-11 09:07, Panu Matilainen:

Quoted 21 lines · Neil Horman
Quoted 20 lines · Panu Matilainen
Quoted 18 lines

For giggles, tried running abi-validator between 2.0 and 2.1 on my Fedora 22 laptop, didn't work due to various build failures. With this patch series the following now succeeds:

EXTRA_CFLAGS="-Wno-error" scripts/validate-abi.sh v2.0.0 v2.1.0 x86_64-native-linuxapp-gcc

Panu Matilainen (3):
scripts: permit passing extra compiler & linker flags to ABI validator
scripts: move two identical config fixups into a function
scripts: teach ABI validator about CONFIG_RTE_KNI_KMOD

   scripts/validate-abi.sh | 28 ++++++++++++++--------------
   1 file changed, 14 insertions(+), 14 deletions(-)

--
2.4.3

Quoted 9 lines
Quoted 4 lines
Quoted 2 lines

series

Thomas, any particular reason this hasn't been applied yet?

It was not the priority until now. I was busy with the drivers. For next release, the integration should be easier because Bruce will help with a drivers tree.

Understood, no worries. Just checking it hasn't fallen through the cracks due to some submission error on my behalf or something.

- Panu -

#13 lore raw
In reply to Neil Horman

2015-09-24 06:23, Neil Horman:

Quoted 12 lines · Panu Matilainen
Quoted 11 lines

For giggles, tried running abi-validator between 2.0 and 2.1 on my Fedora 22 laptop, didn't work due to various build failures. With this patch series the following now succeeds:

EXTRA_CFLAGS="-Wno-error" scripts/validate-abi.sh v2.0.0 v2.1.0 x86_64-native-linuxapp-gcc

Panu Matilainen (3):
scripts: permit passing extra compiler & linker flags to ABI validator
scripts: move two identical config fixups into a function
scripts: teach ABI validator about CONFIG_RTE_KNI_KMOD

Quoted 6 lines
Quoted 3 lines
 scripts/validate-abi.sh | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

series

Applied, thanks