Skip to contentSkip to conversation

CRYPTODEV: set_sym_session_private_data() line 489: Set private data for driver 0 not allowed

dpdk-dev [email protected] 1 participant 2 messages Dec 10, 2019 – Apr 26, 2020

lore
Share & tools
lore
#0 lore raw

https://bugs.dpdk.org/show_bug.cgi?id=377

Bug ID: 377
Summary: CRYPTODEV: set_sym_session_private_data() line 489:
Set private data for driver 0 not allowed
Product: DPDK
Version: unspecified
Hardware: x86
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: cryptodev
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---

Environment: Xeon E5-2640, Ubuntu 16.04, DPDK 19.11, Intel AESNI-MB library 0.53.0

When OpenSSL or AESNI-MB cryptodev is being used in sessionless mode for symmetric crypto operation (e.g. SHA256 hash), the driver prints error message:

CRYPTODEV: set_sym_session_private_data() line 489: Set private data for
driver 0 not allowed

This error is caused by:

1. set_sym_session_private_data() checks sess->nb_drivers > driver_id, or it will print the above error.
2. In session-based mode, rte_cryptodev_sym_session_create() allocates a session structure from the session pool, then sets sess->nb_drivers = pool_priv->nb_drivers, so that there wouldn't be an error.
3. In sessionless mode, get_session() in rte_openssl_pmd.c or rte_aesni_mb_pmd.c allocates a session structure from the session pool, but does not set sess->nb_drivers, causing the error.

Due to this error, AESNI-MB driver segfaults in post_process_mb_job() after get_sym_session_private_data() returns NULL.
OpenSSL driver can still compute SHA256 digest successfully, apart from the error message, because it does not actually use get_sym_session_private_data().

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.
#1 lore raw

https://bugs.dpdk.org/show_bug.cgi?id=377

Thomas Monjalon ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|IN_PROGRESS                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from Thomas Monjalon ([email protected]) --- Resolved in http://git.dpdk.org/dpdk/commit/?id=a0c2b3d8ee

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.