Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F142540446
D28159.id82270.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
999 B
Referenced Files
None
Subscribers
None
D28159.id82270.diff
View Options
Index: sys/opencrypto/crypto.c
===================================================================
--- sys/opencrypto/crypto.c
+++ sys/opencrypto/crypto.c
@@ -135,6 +135,7 @@
struct crypto_session {
struct cryptocap *cap;
struct crypto_session_params csp;
+ uint64_t id;
};
/*
@@ -908,6 +909,7 @@
crypto_newsession(crypto_session_t *cses,
const struct crypto_session_params *csp, int crid)
{
+ static uint64_t sessid = 0;
crypto_session_t res;
struct cryptocap *cap;
int err;
@@ -944,6 +946,7 @@
M_WAITOK | M_ZERO);
res->cap = cap;
res->csp = *csp;
+ res->id = atomic_fetchadd_64(&sessid, 1);
/* Call the driver initialization routine. */
err = CRYPTODEV_NEWSESSION(cap->cc_dev, res, csp);
@@ -1416,7 +1419,7 @@
CRYPTOSTAT_INC(cs_ops);
- crp->crp_retw_id = ((uintptr_t)crp->crp_session) % crypto_workers_num;
+ crp->crp_retw_id = crp->crp_session->id % crypto_workers_num;
if (CRYPTOP_ASYNC(crp)) {
if (crp->crp_flags & CRYPTO_F_ASYNC_KEEPORDER) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jan 21, 7:09 PM (7 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27817221
Default Alt Text
D28159.id82270.diff (999 B)
Attached To
Mode
D28159: opencrypto: Fix assignment of crypto completions to worker threads
Attached
Detach File
Event Timeline
Log In to Comment