From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla@dpdk.org Subject: [Bug 105] Cannot create crypto_openssl after vdev_uninit Date: Fri, 02 Nov 2018 17:47:48 +0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable To: dev@dpdk.org Return-path: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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.=