All of lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla@dpdk.org
To: dev@dpdk.org
Subject: [Bug 105] Cannot create crypto_openssl after vdev_uninit
Date: Fri, 02 Nov 2018 17:47:48 +0000	[thread overview]
Message-ID: <bug-105-3@http.bugs.dpdk.org/> (raw)

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: sunnylandh@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.

             reply	other threads:[~2018-11-02 17:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-02 17:47 bugzilla [this message]
2019-09-12 16:42 ` [dpdk-dev] [Bug 105] Cannot create crypto_openssl after vdev_uninit bugzilla

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-105-3@http.bugs.dpdk.org/ \
    --to=bugzilla@dpdk.org \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.