[2/2] mk: disable armv8 crypto extension for Mellanox BlueField

Message ID 20190502015806.41497-2-yskoh@mellanox.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series [1/2] build: add option for armv8 crypto extension |

Checks

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

Commit Message

Yongseok Koh May 2, 2019, 1:58 a.m. UTC
  Mellanox BlueField has a variant which doesn't have armv8 crypto extension.
If crypto enabled binary runs on such a pltform, rte_eal_init() fails. To
have binary compatibility across multiple variants, it is disabled by
default and can be enabled for crypto enabled parts.

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
---
 config/defconfig_arm64-bluefield-linuxapp-gcc | 6 ++++++
 1 file changed, 6 insertions(+)
  

Comments

Honnappa Nagarahalli May 2, 2019, 4:12 a.m. UTC | #1
> 
> Mellanox BlueField has a variant which doesn't have armv8 crypto extension.
> If crypto enabled binary runs on such a pltform, rte_eal_init() fails. To have
> binary compatibility across multiple variants, it is disabled by default and can
> be enabled for crypto enabled parts.
> 
> Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
> ---
>  config/defconfig_arm64-bluefield-linuxapp-gcc | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/config/defconfig_arm64-bluefield-linuxapp-gcc
> b/config/defconfig_arm64-bluefield-linuxapp-gcc
> index b496538819..6da9c2026d 100644
> --- a/config/defconfig_arm64-bluefield-linuxapp-gcc
> +++ b/config/defconfig_arm64-bluefield-linuxapp-gcc
> @@ -10,6 +10,12 @@ CONFIG_RTE_ARCH_ARM_TUNE="cortex-a72"
>  CONFIG_RTE_MAX_NUMA_NODES=1
>  CONFIG_RTE_CACHE_LINE_SIZE=64
> 
> +# Crypto extension of armv8
> +#
> +# Disabled by default for binary compatibility.
> +# Can be enabled for crypto-enabled parts.
> +CONFIG_RTE_ENABLE_ARMV8_CRYPTO=n
How do you plan to support the Bluefield devices with crypto enabled? Do you plan to add another config?

> +
>  # UMA architecture
>  CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES=n
>  CONFIG_RTE_LIBRTE_VHOST_NUMA=n
> --
> 2.11.0
  
Yongseok Koh May 2, 2019, 5:40 a.m. UTC | #2
> On May 1, 2019, at 9:12 PM, Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com> wrote:
> 
>> 
>> Mellanox BlueField has a variant which doesn't have armv8 crypto extension.
>> If crypto enabled binary runs on such a pltform, rte_eal_init() fails. To have
>> binary compatibility across multiple variants, it is disabled by default and can
>> be enabled for crypto enabled parts.
>> 
>> Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
>> ---
>> config/defconfig_arm64-bluefield-linuxapp-gcc | 6 ++++++
>> 1 file changed, 6 insertions(+)
>> 
>> diff --git a/config/defconfig_arm64-bluefield-linuxapp-gcc
>> b/config/defconfig_arm64-bluefield-linuxapp-gcc
>> index b496538819..6da9c2026d 100644
>> --- a/config/defconfig_arm64-bluefield-linuxapp-gcc
>> +++ b/config/defconfig_arm64-bluefield-linuxapp-gcc
>> @@ -10,6 +10,12 @@ CONFIG_RTE_ARCH_ARM_TUNE="cortex-a72"
>> CONFIG_RTE_MAX_NUMA_NODES=1
>> CONFIG_RTE_CACHE_LINE_SIZE=64
>> 
>> +# Crypto extension of armv8
>> +#
>> +# Disabled by default for binary compatibility.
>> +# Can be enabled for crypto-enabled parts.
>> +CONFIG_RTE_ENABLE_ARMV8_CRYPTO=n
> How do you plan to support the Bluefield devices with crypto enabled? Do you plan to add another config?

Nope, user will have to enable it by modifying this file or specifying it in make command line.
This is just to provide the default which can make majority of cases work well.
For example, by default, mlx4/5 are even disabled in default x86 build config because
not all users have drv/lib installed on their system. Users have to enable it if they want.

>> +
>> # UMA architecture
>> CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES=n
>> CONFIG_RTE_LIBRTE_VHOST_NUMA=n
>> --
>> 2.11.0
  
Honnappa Nagarahalli May 3, 2019, 4:01 a.m. UTC | #3
> > On May 1, 2019, at 9:12 PM, Honnappa Nagarahalli
> <Honnappa.Nagarahalli@arm.com> wrote:
> >
> >>
> >> Mellanox BlueField has a variant which doesn't have armv8 crypto
> extension.
> >> If crypto enabled binary runs on such a pltform, rte_eal_init()
> >> fails. To have binary compatibility across multiple variants, it is
> >> disabled by default and can be enabled for crypto enabled parts.
> >>
> >> Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
> >> ---
> >> config/defconfig_arm64-bluefield-linuxapp-gcc | 6 ++++++
> >> 1 file changed, 6 insertions(+)
> >>
> >> diff --git a/config/defconfig_arm64-bluefield-linuxapp-gcc
> >> b/config/defconfig_arm64-bluefield-linuxapp-gcc
> >> index b496538819..6da9c2026d 100644
> >> --- a/config/defconfig_arm64-bluefield-linuxapp-gcc
> >> +++ b/config/defconfig_arm64-bluefield-linuxapp-gcc
> >> @@ -10,6 +10,12 @@ CONFIG_RTE_ARCH_ARM_TUNE="cortex-a72"
> >> CONFIG_RTE_MAX_NUMA_NODES=1
> >> CONFIG_RTE_CACHE_LINE_SIZE=64
> >>
> >> +# Crypto extension of armv8
> >> +#
> >> +# Disabled by default for binary compatibility.
> >> +# Can be enabled for crypto-enabled parts.
> >> +CONFIG_RTE_ENABLE_ARMV8_CRYPTO=n
> > How do you plan to support the Bluefield devices with crypto enabled? Do
> you plan to add another config?
> 
> Nope, user will have to enable it by modifying this file or specifying it in make
> command line.
Ok, I suggest documenting it somewhere.

> This is just to provide the default which can make majority of cases work well.
> For example, by default, mlx4/5 are even disabled in default x86 build config
> because not all users have drv/lib installed on their system. Users have to
> enable it if they want.
> 
> >> +
> >> # UMA architecture
> >> CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES=n
> >> CONFIG_RTE_LIBRTE_VHOST_NUMA=n
> >> --
> >> 2.11.0
  

Patch

diff --git a/config/defconfig_arm64-bluefield-linuxapp-gcc b/config/defconfig_arm64-bluefield-linuxapp-gcc
index b496538819..6da9c2026d 100644
--- a/config/defconfig_arm64-bluefield-linuxapp-gcc
+++ b/config/defconfig_arm64-bluefield-linuxapp-gcc
@@ -10,6 +10,12 @@  CONFIG_RTE_ARCH_ARM_TUNE="cortex-a72"
 CONFIG_RTE_MAX_NUMA_NODES=1
 CONFIG_RTE_CACHE_LINE_SIZE=64
 
+# Crypto extension of armv8
+#
+# Disabled by default for binary compatibility.
+# Can be enabled for crypto-enabled parts.
+CONFIG_RTE_ENABLE_ARMV8_CRYPTO=n
+
 # UMA architecture
 CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES=n
 CONFIG_RTE_LIBRTE_VHOST_NUMA=n