From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8EB5BA0573; Wed, 19 Oct 2022 09:24:49 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 32F874069C; Wed, 19 Oct 2022 09:24:49 +0200 (CEST) Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) by mails.dpdk.org (Postfix) with ESMTP id 00E5C40041 for ; Wed, 19 Oct 2022 09:24:47 +0200 (CEST) Received: by mail-pf1-f176.google.com with SMTP id p14so16447206pfq.5 for ; Wed, 19 Oct 2022 00:24:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-language:content-transfer-encoding:in-reply-to:mime-version :user-agent:date:message-id:from:references:cc:to:subject:from:to:cc :subject:date:message-id:reply-to; bh=yNKfCTU1ZjrS8NNkKdOoTAW1nUVk8fxVqMXCCbBEJGo=; b=xqxSBjGQ9i4IOtGuwwaIfcpTEBrxI0bOLR/+D6KYBKvOeG4YQWArbZRdq6MV42ALBy KQNu1Ezd13G3+bfUTKkEaVj1EpNfIaV/+xX6No5u1c8aQs+LGPQ+7mK5wkc7pytwgZRl lB0srh07cYcAArjL7eyjy0qRkxHZg4E2khdxG6FmGwXh0OdMEDOLLlRxzH6q2hq1s5ZE YfmnBV+l6bwva4HiSFEO/3JHvYyH7jGU7KG0jyVOBBloAbAw111+dY7DV5oMkIu18kyR Qg/KKsYN0KWc2Tn6elltk1LkKVvKgba6kjyqyqRKcKdW9EGezuJv6z4YtX0eHblEFZFl iNvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-language:content-transfer-encoding:in-reply-to:mime-version :user-agent:date:message-id:from:references:cc:to:subject :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=yNKfCTU1ZjrS8NNkKdOoTAW1nUVk8fxVqMXCCbBEJGo=; b=Mi5Pbp5Sr6htfrO5P0BjZT1e86Bs5nj1G0Y7gFe5WlPg+7Il5jVLhp3KK/5hBthb1x BFq9B3+Y8e7bdJsw5Rh1AIq/3BG+Z6xVFbGa+pU8IWu4xFKciOpU+uVKWqO5tdpLupD0 /5klfE+eo0l2CZdo78Nx2HeBbG9wkIWgg0Xj1te3CXR1e9jT/V+zVQ06NkvA/srxSESN IxE8bpNZLBgF1np7SpFXrgU+o5SSyFtEqoElRd06gdZHuX0e5Q7n/sC3pxzp+avQb/tD U+NU8j7r+tsU+L0cDZq/7YRs/bM4MKgdyLxmwDTf0D8Qp4R63G3QAbVAz3rYutu1gOLe 6wfA== X-Gm-Message-State: ACrzQf2S6Ft1I6+xsADb2kdGAnuOivEC9VEJwD1oTYdaPy8tb0GCUkc1 ctPM79Kl1WlTC3VPBJH9uVtYnw== X-Google-Smtp-Source: AMsMyM48UMIqWDCLdNK3VOkgZCiQOtBdOChbLvCnpWb6+Unf9taI58d8RImh+WETL4++W2ZxYSGQOA== X-Received: by 2002:a63:5a0c:0:b0:46a:fcba:862c with SMTP id o12-20020a635a0c000000b0046afcba862cmr6071831pgb.187.1666164287116; Wed, 19 Oct 2022 00:24:47 -0700 (PDT) Received: from [100.64.100.6] ([199.101.192.140]) by smtp.gmail.com with ESMTPSA id k61-20020a17090a4cc300b0020bfd6586c6sm9329987pjh.7.2022.10.19.00.24.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 19 Oct 2022 00:24:46 -0700 (PDT) Subject: Re: crypto/uadk: introduce uadk crypto driver To: Thomas Monjalon , Zhangfei Gao , Akhil Goyal Cc: "techboard@dpdk.org" , "dev@dpdk.org" , "acc@openeuler.org" References: <316c505f-8072-5da8-0ca0-d5105ea479a6@linaro.org> <5877730.88bMQJbFj6@thomas> From: Zhangfei Gao Message-ID: <75c0d590-0711-4e8c-8637-e928a89d9800@linaro.org> Date: Wed, 19 Oct 2022 15:24:41 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <5877730.88bMQJbFj6@thomas> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 2022/10/19 下午2:55, Thomas Monjalon wrote: > 18/10/2022 12:52, Zhangfei Gao: >> On 2022/10/18 下午6:07, Zhangfei Gao wrote: >>> Hi, Akhil >>> >>>> On 2022/10/17 下午3:02, Akhil Goyal wrote: >>>>> Hi everyone, >>>>> >>>>> We have a new crypto PMD submitted on ML >>>>> (http://patches.dpdk.org/project/dpdk/cover/20221008083747.6559-1-zhangfei.gao@linaro.org/) >>>>> >>>>> This PMD is dependent on an external library which needs to be cross >>>>> compiled for ARM on x86. >>>>> >>>>> It mandatorily need “numactl” also cross-compiled and instead of >>>>> using pkg-config of libnuma, it need the library and headers to be >>>>> copied manually to aarch toolchain. >>>>> >>>>> And if that is also done, it is not generating pkg-config which DPDK >>>>> can use to compile the PMD. >>>>> >>>> Thanks for the guidance >>>> >>>> We are trying to provide pkgconfig file for uadk libs >>>> https://github.com/Linaro/uadk/pull/513 >>>> >>>> And have fixed the x86 local build. >>>> https://github.com/Linaro/uadk/pull/512 >>> Under this git pull, I have verified building and installing dpdk on >>> x86 with this diff to switch to pkg-config >>> >>> diff --git a/drivers/crypto/uadk/meson.build >>> b/drivers/crypto/uadk/meson.build >>> index dda6c6b257..f6fae0a239 100644 >>> --- a/drivers/crypto/uadk/meson.build >>> +++ b/drivers/crypto/uadk/meson.build >>> @@ -8,18 +8,12 @@ if not is_linux >>> subdir_done() >>> endif >>> >>> -if arch_subdir != 'arm' or not dpdk_conf.get('RTE_ARCH_64') >>> - build = false >>> - reason = 'only supported on aarch64' >>> - subdir_done() >>> -endif >>> - >>> sources = files( >>> 'uadk_crypto_pmd.c', >>> ) >>> >>> deps += 'bus_vdev' >>> -dep = cc.find_library('libwd_crypto', required: false) >>> +dep = dependency('libwd_crypto', required: false, method: 'pkg-config') >>> if not dep.found() >>> build = false >>> reason = 'missing dependency, "libwd_crypto"' >>> @@ -27,7 +21,7 @@ else >>> ext_deps += dep >>> endif >>> >>> -dep = cc.find_library('libwd', required: false) >>> +dep = dependency('libwd', required: false, method: 'pkg-config') >>> if not dep.found() >>> build = false >>> reason = 'missing dependency, "libwd"' >>> >>> >>> One uncertainty is numa, "Requires: numa", >>> This requires numa.pc has to be installed, so numa only can be >>> installed from source code (make install). >>> While apt-get install libnuma-dev does not install numa.pc, so system >>> can not search numa. >>> So do we have to build numa from source code? >> By the way. >> >> When trying to use +Libs.Private: -lnuma, >> I found Even remove building uadk, the dpdk fails if no numa.pc, though >> apt-get insall libnuma-dev >> >> /usr/bin/ld: lib/librte_eal.so.23.0: version node not found for symbol >> numa_run_on_node_mask@@libnuma_1.2 >> /usr/bin/ld: failed to set dynamic section sizes: bad value >> collect2: error: ld returned 1 exit status >> [2813/3314] Compiling C object >> 'drivers/a715181@@tmp_rte_event_cnxk@sta/event_cnxk_tx_cn10k_tx_112_127_seg.c.o'. >> ninja: build stopped: subcommand failed. > libnuma is a general requirement of DPDK. > numa.pc should be installed by the NUMA package. > Maybe a problem with your distribution. It looks it is the numa source code issue. Only if we do not install numa by source code, apt-get install libnuma-dev always works. But if install numa from source code once via make install, apt-get seems not workable anymore, same on x86 or arm. It only install symbol (libnuma.so), but no real library (libnuma.so.1.0.0) $ sudo apt-get install libnuma-dev $ numactl numactl: error while loading shared libraries: libnuma.so.1: cannot open shared object file: No such file or directory $ ll /usr/lib/aarch64-linux-gnu/libnuma* -rw-r--r-- 1 root root 77642 Sep 8 2018 /usr/lib/aarch64-linux-gnu/libnuma.a lrwxrwxrwx 1 root root 16 Sep 8 2018 /usr/lib/aarch64-linux-gnu/libnuma.so -> libnuma.so.1.0.0 More details, https://github.com/Linaro/uadk/issues/515 But never mind, will set numa as private, then both case can work, so will ignore this issue first. +Libs.Private: -lnuma Thanks > > >