https://bugs.dpdk.org/show_bug.cgi?id=105
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: sunnyla...@gmail.com Target Milestone: --- Overview: If any created crypto_openssl device has been uninitialized, new crypto_openssl device cannot be created. Steps to Reproduce: 1) Compile this snippet with command line: gcc -m64 -O3 -march=native -o x x.c -I/usr/local/include/dpdk -ldpdk ``` #include <inttypes.h> #include <stdio.h> #include <rte_config.h> #include <rte_bus_vdev.h> #include <rte_eal.h> #include <rte_errno.h> #define WANT_UNINIT int main(int argc, char** argv) { int res = rte_eal_init(argc, argv); if (res < 0) { printf("rte_eal_init(argc, argv) %d\n", rte_errno); return 3; } res = rte_vdev_init("crypto_openssl_0", ""); if (res != 0) { printf("rte_vdev_init(\"crypto_openssl_0\", \"\") %d\n", res); return 4; } #ifdef WANT_UNINIT res = rte_vdev_uninit("crypto_openssl_0"); if (res != 0) { printf("rte_vdev_uninit(\"crypto_openssl_0\") %d\n", res); return 5; } #endif // WANT_UNINIT res = rte_vdev_init("crypto_openssl_1", ""); if (res != 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 following 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. -- You are receiving this mail because: You are the assignee for the bug.