[v11,1/7] net/sfc: fix aarch32 build

Message ID 1607518771-7564-2-git-send-email-juraj.linkes@pantheon.tech (mailing list archive)
State Superseded, archived
Headers
Series aarch64 -> aarch32 cross compilation support |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Juraj Linkeš Dec. 9, 2020, 12:59 p.m. UTC
  From: Ruifeng Wang <ruifeng.wang@arm.com>

The sfc PMD was enabled for aarch32 which is 32-bit mode but has
cpu_family set to aarch64.
As sfc support only 64-bit system, it should be disabled for aarch32.

Updated meson file to disable sfc for aarch32 build.

Fixes: 141d2870675a ("net/sfc: support aarch64 architecture")
Cc: arybchenko@solarflare.com
Cc: stable@dpdk.org

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 drivers/common/sfc_efx/meson.build | 2 +-
 drivers/net/sfc/meson.build        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
  

Comments

Andrew Rybchenko Dec. 9, 2020, 1:37 p.m. UTC | #1
On 12/9/20 3:59 PM, Juraj Linkeš wrote:
> From: Ruifeng Wang <ruifeng.wang@arm.com>
> 
> The sfc PMD was enabled for aarch32 which is 32-bit mode but has
> cpu_family set to aarch64.
> As sfc support only 64-bit system, it should be disabled for aarch32.
> 
> Updated meson file to disable sfc for aarch32 build.
> 
> Fixes: 141d2870675a ("net/sfc: support aarch64 architecture")
> Cc: arybchenko@solarflare.com
> Cc: stable@dpdk.org
> 
> Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>

Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>

Many thanks for the fix.
  

Patch

diff --git a/drivers/common/sfc_efx/meson.build b/drivers/common/sfc_efx/meson.build
index 6cb9f0737..0200c6752 100644
--- a/drivers/common/sfc_efx/meson.build
+++ b/drivers/common/sfc_efx/meson.build
@@ -5,7 +5,7 @@ 
 # This software was jointly developed between OKTET Labs (under contract
 # for Solarflare) and Solarflare Communications, Inc.
 
-if (arch_subdir != 'x86' or not dpdk_conf.get('RTE_ARCH_64')) and (arch_subdir != 'arm' or not host_machine.cpu_family().startswith('aarch64'))
+if (arch_subdir != 'x86' or arch_subdir != 'arm') and (not dpdk_conf.get('RTE_ARCH_64'))
 	build = false
 	reason = 'only supported on x86_64 and aarch64'
 endif
diff --git a/drivers/net/sfc/meson.build b/drivers/net/sfc/meson.build
index be888bd87..cfd31ca3a 100644
--- a/drivers/net/sfc/meson.build
+++ b/drivers/net/sfc/meson.build
@@ -6,7 +6,7 @@ 
 # This software was jointly developed between OKTET Labs (under contract
 # for Solarflare) and Solarflare Communications, Inc.
 
-if (arch_subdir != 'x86' or not dpdk_conf.get('RTE_ARCH_64')) and (arch_subdir != 'arm' or not host_machine.cpu_family().startswith('aarch64'))
+if (arch_subdir != 'x86' or arch_subdir != 'arm') and (not dpdk_conf.get('RTE_ARCH_64'))
 	build = false
 	reason = 'only supported on x86_64 and aarch64'
 endif