Re: [PATCH] crypto: normalize cryptodev pmd names with macros
From: De Lara Guarch, Pablo <hidden>
Date: 2016-07-08 09:09:15
Hi Neil,
-----Original Message----- From: Neil Horman [mailto:nhorman@tuxdriver.com] Sent: Thursday, July 07, 2016 4:38 PM To: dev@dpdk.org Cc: Neil Horman; Richardson, Bruce; Thomas Monjalon; De Lara Guarch, Pablo; Stephen Hemminger; Panu Matilainen Subject: [PATCH] crypto: normalize cryptodev pmd names with macros Recently reported, the introduction of pmd information exports led to a breakage of cryptodev unit tests because the test infrastructure relies on the cryptodev names being available in macros. This patch fixes the pmd naming to use the macro names. Note that the macro names were already pre- stringified, which won't work as the PMD_REGISTER_DRIVER macro requires the name in both a processing token and stringified form. As such the names are defined now as tokens, and converted where needed to stringified form on demand using RTE_STR. Tested using the null and aesni_mb crypto pmds, as I don't have hardware for any other device. Also not build tested on snow3g or kasumi pmd because building those requires external libraries that appear to not be open source licensed. Signed-off-by: Neil Horman <nhorman@tuxdriver.com> CC: Bruce Richardson <redacted> CC: Thomas Monjalon <redacted> CC: "De Lara Guarch, Pablo" <redacted> CC: Stephen Hemminger <stephen@networkplumber.org> CC: Panu Matilainen <redacted> --- app/test/test_cryptodev.c | 20 ++++++++++---------- app/test/test_cryptodev_perf.c | 18 +++++++++--------- drivers/crypto/aesni_gcm/aesni_gcm_pmd.c | 7 +++---- drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h | 6 +++--- drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 7 +++---- drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h | 2 +- drivers/crypto/kasumi/rte_kasumi_pmd.c | 5 ++--- drivers/crypto/null/null_crypto_pmd.c | 7 +++---- drivers/crypto/null/null_crypto_pmd_private.h | 6 +++--- drivers/crypto/qat/rte_qat_cryptodev.c | 4 ++-- drivers/crypto/snow3g/rte_snow3g_pmd.c | 4 ++-- lib/librte_cryptodev/rte_cryptodev.h | 12 ++++++------ 12 files changed, 47 insertions(+), 51 deletions(-)
Thanks for this patch. I tested snow3g and kasumi, and they don't compile. I have a fix for that, so I can send a v2 of this patch if it is OK for you. Also, we should make these changes in the other PMDs as well, right? I mean, avoid setting the name of the driver directly in the structure and go back to the original name. I can do that as well, if you want (maybe a separate patch, as this one is only related to crypto). Thanks, Pablo