From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by dpdk.org (Postfix, from userid 33) id 1CEAB5B32; Fri, 2 Nov 2018 18:47:48 +0100 (CET) From: bugzilla@dpdk.org To: dev@dpdk.org Date: Fri, 02 Nov 2018 17:47:48 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: DPDK X-Bugzilla-Component: cryptodev X-Bugzilla-Version: 18.08 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: sunnylandh@gmail.com X-Bugzilla-Status: CONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: dev@dpdk.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.dpdk.org/ Auto-Submitted: auto-generated X-Auto-Response-Suppress: All MIME-Version: 1.0 Subject: [dpdk-dev] [Bug 105] Cannot create crypto_openssl after vdev_uninit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Nov 2018 17:47:48 -0000 https://bugs.dpdk.org/show_bug.cgi?id=3D105 Bug ID: 105 Summary: Cannot create crypto_openssl after vdev_uninit Product: DPDK Version: 18.08 Hardware: x86 OS: Linux Status: CONFIRMED Severity: normal Priority: Normal Component: cryptodev Assignee: dev@dpdk.org Reporter: sunnylandh@gmail.com Target Milestone: --- Overview: If any created crypto_openssl device has been uninitialized, new crypto_ope= nssl device cannot be created. Steps to Reproduce: 1) Compile this snippet with command line: gcc -m64 -O3 -march=3Dnative -o x x.c -I/usr/local/include/dpdk -ldpdk ``` #include #include #include #include #include #include #define WANT_UNINIT int main(int argc, char** argv) { int res =3D rte_eal_init(argc, argv); if (res < 0) { printf("rte_eal_init(argc, argv) %d\n", rte_errno); return 3; } res =3D rte_vdev_init("crypto_openssl_0", ""); if (res !=3D 0) { printf("rte_vdev_init(\"crypto_openssl_0\", \"\") %d\n", res); return 4; } #ifdef WANT_UNINIT res =3D rte_vdev_uninit("crypto_openssl_0"); if (res !=3D 0) { printf("rte_vdev_uninit(\"crypto_openssl_0\") %d\n", res); return 5; } #endif // WANT_UNINIT res =3D rte_vdev_init("crypto_openssl_1", ""); if (res !=3D 0) { printf("rte_vdev_init(\"crypto_openssl_1\", \"\") %d\n", res); return 6; } printf("OK\n"); return 0; } ``` 2) Execute the program with this command line: sudo ./x -d /usr/local/lib/librte_pmd_openssl.so Actual Results: The program fails to create "crypto_openssl_1" device, and prints the follo= wing log output: ``` EAL: Detected 24 lcore(s) EAL: Detected 2 NUMA nodes EAL: Multi-process socket /var/run/dpdk/rte/mp_socket EAL: Probing VFIO support... CRYPTODEV: [crypto_openssl] - Creating cryptodev crypto_openssl_0 CRYPTODEV: [crypto_openssl] - Initialisation parameters - name: crypto_openssl_0,socket id: 0, max queue pairs: 8 CRYPTODEV: [crypto_openssl] Closing crypto device crypto_openssl_0 CRYPTODEV: [crypto_openssl] - Creating cryptodev crypto_openssl_1 CRYPTODEV: [crypto_openssl] - Initialisation parameters - name: crypto_openssl_1,socket id: 0, max queue pairs: 8 CRYPTODEV: rte_cryptodev_pmd_create() line 113: [crypto_openssl] Failed to allocate crypto device for crypto_openssl_1 cryptodev_openssl_create() line 2102: failed to create cryptodev vdev cryptodev_openssl_create() line 2129: driver : create failed rte_vdev_init("crypto_openssl_1", "") -14 ``` Expected Results: The program successfully creates crypto_openssl_1 device, and prints "OK". Build Date & Hardware: DPDK release 18.08 installed from tarball. gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.10) Intel(R) Xeon(R) CPU E5-2640 0 @ 2.50GHz Additional Builds and Platforms: not tested. Additional Information: The program completes successfully if commenting out `#define WANT_UNINIT` line. --=20 You are receiving this mail because: You are the assignee for the bug.=