net/zxdh: fix building check for arm64
Subsystems (2)
PATCH 1/1 net/zxdh: fix building check for arm64
From: Luca Boccassi <[email protected]>
The comment and docs say this should be built on x86_64 and aarch64, but RTE_ARCH_64 is not aarch64, that's RTE_ARCH_ARM64, so fix it.
Also the check makes the build skip unless RTE_ARCH_X86_64 is true, so switch it to an 'and' instead of an 'or', to build on both arm64 and x86_64, and skip elsewhere.
--- drivers/net/zxdh/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/zxdh/meson.build +1 -1
@@ -7,7 +7,7 @@ if not is_linux subdir_done() endif -if not dpdk_conf.has('RTE_ARCH_X86_64') or not dpdk_conf.get('RTE_ARCH_64') +if not dpdk_conf.has('RTE_ARCH_X86_64') and not dpdk_conf.get('RTE_ARCH_ARM64') build = false reason = 'only supported on x86_64 and aarch64' subdir_done()
Signature · 1 line
2.47.3
PATCH v2 1/1 net/zxdh: fix building check for arm64
From: Luca Boccassi <[email protected]>
The comment and docs say this should be built on x86_64 and aarch64, but RTE_ARCH_64 is not aarch64, that's RTE_ARCH_ARM64, so fix it.
Also the check makes the build skip unless RTE_ARCH_X86_64 is true, so switch it to an 'and' instead of an 'or', to build on both arm64 and x86_64, and skip elsewhere.
---
v2: use dpdk_conf.has() instead of .get()
drivers/net/zxdh/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/zxdh/meson.build +1 -1
@@ -7,7 +7,7 @@ if not is_linux subdir_done() endif -if not dpdk_conf.has('RTE_ARCH_X86_64') or not dpdk_conf.get('RTE_ARCH_64') +if not dpdk_conf.has('RTE_ARCH_X86_64') and not dpdk_conf.has('RTE_ARCH_ARM64') build = false reason = 'only supported on x86_64 and aarch64' subdir_done()
Signature · 1 line
2.47.3
Quoted 6 lines · On Thu, 4 Sept 2025 at 16:19, <[email protected]> wrote:
From: Luca Boccassi <[email protected]>
The comment and docs say this should be built on
x86_64and aarch64, butRTE_ARCH_64is not aarch64, that'sRTE_ARCH_ARM64, so fix it.
Quoted 8 lines
Also the check makes the build skip unless
RTE_ARCH_X86_64is true, so switch it to an 'and' instead of an 'or', to build on both arm64 andx86_64, and skip elsewhere.Fixes 29e89288ff14 ("net/zxdh: add driver skeleton")Signed-off-by Luca Boccassi <[email protected]>
Good catch.
It seems we have similar construct in other drivers (and some of them look buggy, like net/hns3 X and Y or Z without parens). Could we align all on a single way of checking this combination?
$ git grep -B4 'only supported on x86_64 and aarch64'
drivers/common/sfc_efx/meson.build-endif
drivers/common/sfc_efx/meson.build-
drivers/common/sfc_efx/meson.build-if (arch_subdir != 'x86' and
arch_subdir != 'arm') or (not dpdk_conf.get('RTE_ARCH_64'))
drivers/common/sfc_efx/meson.build- build = false
drivers/common/sfc_efx/meson.build: reason = 'only supported on
x86_64 and aarch64'
--
drivers/dma/hisilicon/meson.build-endif
drivers/dma/hisilicon/meson.build-
drivers/dma/hisilicon/meson.build-if (arch_subdir != 'x86' and
arch_subdir != 'arm') or (not dpdk_conf.get('RTE_ARCH_64'))
drivers/dma/hisilicon/meson.build- build = false
drivers/dma/hisilicon/meson.build: reason = 'only supported on
x86_64 and aarch64'
--
drivers/net/hns3/meson.build-endif
drivers/net/hns3/meson.build-
drivers/net/hns3/meson.build-if arch_subdir != 'x86' and arch_subdir
!= 'arm' or not dpdk_conf.get('RTE_ARCH_64')
drivers/net/hns3/meson.build- build = false
drivers/net/hns3/meson.build: reason = 'only supported on x86_64 and aarch64'
--
drivers/net/sfc/meson.build-endif
drivers/net/sfc/meson.build-
drivers/net/sfc/meson.build-if (arch_subdir != 'x86' and arch_subdir
!= 'arm') or (not dpdk_conf.get('RTE_ARCH_64'))
drivers/net/sfc/meson.build- build = false
drivers/net/sfc/meson.build: reason = 'only supported on x86_64 and aarch64'
--
drivers/net/zxdh/meson.build-endif
drivers/net/zxdh/meson.build-
drivers/net/zxdh/meson.build-if not dpdk_conf.has('RTE_ARCH_X86_64')
or not dpdk_conf.get('RTE_ARCH_64')
drivers/net/zxdh/meson.build- build = false
drivers/net/zxdh/meson.build: reason = 'only supported on x86_64 and aarch64'
--
drivers/vdpa/sfc/meson.build-if ((arch_subdir != 'x86' or not
dpdk_conf.get('RTE_ARCH_64')) and
drivers/vdpa/sfc/meson.build- (arch_subdir != 'arm' or not
drivers/vdpa/sfc/meson.build-
host_machine.cpu_family().startswith('aarch64')))
drivers/vdpa/sfc/meson.build- build = false
drivers/vdpa/sfc/meson.build: reason = 'only supported on x86_64 and aarch64'Signature · 1 line
David Marchand
Quoted 5 lines · On Thu, 4 Sep 2025 15:10:44 +0100 [email protected] wrote:
From: Luca Boccassi <[email protected]>
The comment and docs say this should be built on
x86_64and aarch64, butRTE_ARCH_64is not aarch64, that'sRTE_ARCH_ARM64, so fix it.
Quoted 8 lines
Also the check makes the build skip unless
RTE_ARCH_X86_64is true, so switch it to an 'and' instead of an 'or', to build on both arm64 andx86_64, and skip elsewhere.Fixes 29e89288ff14 ("net/zxdh: add driver skeleton")Signed-off-by Luca Boccassi <[email protected]>
There already was a patch submitted and queued in next-net.
Your version is more succinct, it would be better to have one way of doing this for all drivers.
commit 4916569f552ee881adbd54bf5446f1c06a607289
Author: Junlong Wang <[email protected]> Date: Thu Jul 10 18:56:38 2025 +0800
net/zxdh: fix meson.build issues in compilation
fix meson.build issues in compilation, which caused the inability to compile in the arm64 environment.