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 CDCFEA0547; Sun, 7 Feb 2021 11:27:14 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 46CD71606FC; Sun, 7 Feb 2021 11:27:14 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mails.dpdk.org (Postfix) with ESMTP id A6EE840147 for ; Sun, 7 Feb 2021 11:27:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612693630; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=1DP4048Bpzs6wCkCIryUJ9Qi7yakQAGl1g9MwGh5OG4=; b=hupTojGP74ilniUQiprLF8vdQOPtmrJ382wHNFCGpvsC2D9PQT2x33+2re3mZaV+0asUti 7b5z1OMDbAm1si7mVSQXw6w/5Zi++ok3a1qw41U57cbmZ+5iK0RjsAyEciO7GItkXz11JN jXQaV+n/18rSpSt3L73FWx3vjl5RtFk= Received: from mail-ua1-f72.google.com (mail-ua1-f72.google.com [209.85.222.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-458-xjGYiVyGNq-Qc_wYrkRcRw-1; Sun, 07 Feb 2021 05:27:09 -0500 X-MC-Unique: xjGYiVyGNq-Qc_wYrkRcRw-1 Received: by mail-ua1-f72.google.com with SMTP id m25so137098uap.9 for ; Sun, 07 Feb 2021 02:27:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1DP4048Bpzs6wCkCIryUJ9Qi7yakQAGl1g9MwGh5OG4=; b=RmEHIr+F1fVRdQJVwUbAAO89mxIFU7lp9DRcnCRQnXFM3TvX7KUAbKNF8rYJB7lJvu M+mPbF93nuqe/Kag6taKWJdF3NbMWap/6pqG0uS0WwNJdvaK2vOyWiv7ljMNxTGklOoQ fv/M68kePTy55HB1/BY0t7nujPpl+m2/6P3jrpz+dI98KAxJKGKbDE7Mc+sClSe7V4bs hTGhU+8y3opT+72C7XDtf0z1V6iDbc+lGKcIsDjz8ig2MfyFXJ5Ln4jPXfTOZbjA5F3i peVsA+HdOgiF2L6frQbpzVuqkEqj58qo1N83o/Mf7cJJ4hnxsbPMSxeT6kjIprD/pQXf 7NZg== X-Gm-Message-State: AOAM530UAwN0nubQ0/2ruSdXEicNoL/nus0sUblgadRfRAo511Bko8w9 Osi4ETbVKaOpgnjGWsPs8Idv5Ooam4wXuLzDtT0XmiNd45nMv2BovqasNXbx6X1iIyK1dPdR2Vl wZYpeoBXKjhZsPEwNJIE= X-Received: by 2002:ab0:73d2:: with SMTP id m18mr939213uaq.86.1612693628688; Sun, 07 Feb 2021 02:27:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJzh1T6BmOdvA7RV2KU4k3n8IDtLVcnjxRGQdTe1o5HTAnnjGE90EPB0lB/kQry3sYuviA/0ddPYue8o427qzNs= X-Received: by 2002:ab0:73d2:: with SMTP id m18mr939211uaq.86.1612693628483; Sun, 07 Feb 2021 02:27:08 -0800 (PST) MIME-Version: 1.0 References: <85f763d093a3d6e5a7a73f8eee9aa0c1@ut.ac.ir> In-Reply-To: <85f763d093a3d6e5a7a73f8eee9aa0c1@ut.ac.ir> From: David Marchand Date: Sun, 7 Feb 2021 11:26:57 +0100 Message-ID: To: "mirzaei.reza" Cc: dev Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] building l2fwd-crypto example from Makefile 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 Sender: "dev" On Sun, Feb 7, 2021 at 10:17 AM mirzaei.reza wrote: > I have a problem to build l2fwd-crypto example using its Makefile. I > build it using Makefile according to this [1] tutorial, when i run the > compiled file using the following command: > > ./l2fwd-crypto -l 1 -n 4 > --vdev="crypto_aesni_mb,socket_id=0,max_nb_sessions=128" \ > -- -p 1 --cdev SW --chain CIPHER_HASH --cipher_algo "aes-cbc" > --auth_algo "sha1-hmac" > > I get the follwing error: > > EAL: Detected 16 lcore(s) > EAL: Detected 1 NUMA nodes > EAL: FAILED TO PARSE DEVICE "CRYPTO_AESNI_GCM" > EAL: UNABLE TO PARSE DEVICE > 'CRYPTO_AESNI_GCM,SOCKET_ID=0,MAX_NB_SESSIONS=128' > EAL: ERROR - EXITING WITH CODE: 1 > CAUSE: INVALID EAL ARGUMENTS > > Could anyone help me to solve this problem? (odd that everything is in capital letters :-)) No driver for this device has been found. You probably did not install dpdk system-wide and you are trying to start a dynamically linked example binary. Using make for compiling examples, you get a dynamically linked application by default. $ ls -l build/ total 84 lrwxrwxrwx 1 dmarchan dmarchan 19 Feb 7 04:46 l2fwd-crypto -> l2fwd-crypto-shared -rwxrwxr-x 1 dmarchan dmarchan 83856 Feb 7 04:46 l2fwd-crypto-shared If you try to list available drivers for this example, I suspect you will find none: $ ./usertools/dpdk-pmdinfo.py /path/to/build/l2fwd-crypto-shared This tool inspects the binary itself and its dynamic dependencies trying to find the EAL DPDK_PLUGIN_PATH internal setting. $ strings /path/to/librte_eal.so |grep DPDK_PLUGIN DPDK_PLUGIN_PATH=/usr/local/lib/dpdk/pmds-21.1 That's where drivers are automatically loaded from. There are different solutions: - you can install dpdk on this system and let EAL automatically load all available drivers, - you can keep your local build, and explicitly ask for loading the drivers you need. Here, that would mean adding -d /path/to/librte_crypto_aesni_gcm.so before the --vdev option), - you can build a static binary that will get all drivers embedded (static target in your make command line for l2fwd-crypto compilation). > > It's worth to noting that when i build it using meson and ninja as the > following, it works successfuly. > > meson -Dexamples=l2fwd-crypto build By default, you get statically linked binaries with meson (this can be changed by passing --default-library=shared). Running the command from above, you probably get a lot of drivers embedded in your example app binary. Example with l3fwd from my env: $ ./usertools/dpdk-pmdinfo.py /path/to/examples/dpdk-l3fwd |grep crypto_aesni PMD NAME: crypto_aesni_gcm PMD NAME: crypto_aesni_mb -- David Marchand