[dpdk-dev] [RFC] hash: unify crc32 API header for x86 and ARM

Pavan Nikhilesh Bhagavatula pbhagavatula at marvell.com
Thu Apr 30 11:27:11 CEST 2020


>> -----Original Message-----
>> From: dev <dev-bounces at dpdk.org> On Behalf Of
>pbhagavatula at marvell.com
>> Sent: Wednesday, April 29, 2020 7:05 PM
>> To: jerinj at marvell.com; thomas at monjalon.net; Wang, Yipeng1
>> <yipeng1.wang at intel.com>; Gobriel, Sameh
><sameh.gobriel at intel.com>;
>> Richardson, Bruce <bruce.richardson at intel.com>; Ruifeng Wang
>> <ruifeng.wang at arm.com>
>> Cc: dev at dpdk.org; Pavan Nikhilesh <pbhagavatula at marvell.com>
>> Subject: [dpdk-dev] [RFC] hash: unify crc32 API header for x86 and
>ARM
>>
>> From: Pavan Nikhilesh <pbhagavatula at marvell.com>
>>
>> Merge crc32 hash calculation public API headers for x86 and ARM,
>> split implementations of x86 and ARM into their respective private
>> headers.
>> This reduces the ifdef code clutter while keeping current ABI intact.
>>
>> Although we install `rte_crc_arm64.h` it is not used in any of the lib or
>> drivers layers. All the libs and drivers use `rte_hash_crc.h` which falls
>> back to SW crc32 calculation for ARM platform.
>
><snip lots of stuff, to focus on meson install header change>
>
>> diff --git a/lib/librte_hash/meson.build b/lib/librte_hash/meson.build
>> index 6ab46ae9d..90a180bc8 100644
>> --- a/lib/librte_hash/meson.build
>> +++ b/lib/librte_hash/meson.build
>> @@ -1,8 +1,7 @@
>>  # SPDX-License-Identifier: BSD-3-Clause
>>  # Copyright(c) 2017 Intel Corporation
>>
>> -headers = files('rte_crc_arm64.h',
>> -	'rte_fbk_hash.h',
>> +headers = files('rte_fbk_hash.h',
>>  	'rte_hash_crc.h',
>>  	'rte_hash.h',
>>  	'rte_jhash.h',
>
>Am I right in that previously an application could #include
><rte_crc_arm64.h>  and hence if we no
>longer install that file, this will cause a compilation failure on that
>application? Applications shouldn't
>include arch specific headers... but we shouldn't knowingly remove
>publicly accessible includes either.
>
>Perhaps consider just installing a dummy header file if the code cleanup
>in the rest of the patch is desired?

Sure we could either symlink `rte_hash_crc.h` as `rte_crc_arm64.h` or
Just include rte_hash_crc.h in rte_crc_arm64.h for now and remove
rte_crc_arm64.h later with a deprecation notice? 


More information about the dev mailing list