Skip to contentSkip to conversation

Virtio Crypto Test failed

Bug 953 [email protected] 1 participant 2 messages Mar 7, 2022 – Mar 8, 2022

lore
Share & tools
lore

[email protected]

author Reviewed-by Maxime Coquelin Reviewed-by David Marchand
#0 lore raw

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

Bug ID: 953
Summary: Virtio Crypto Test failed
Product: DPDK
Version: unspecified
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: vhost/virtio
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---

DPDK Virtio Crypto Test always fail.

RTE>>cryptodev_virtio_autotest
+ ------------------------------------------------------- +
+ Test Suite : Crypto VIRTIO Unit Test Suite
CRYPTODEV: elt_size 0 is expanded to 272

+ ------------------------------------------------------- +
SESSION: virtio_crypto_send_command(): Something wrong on backend! status=1, session_id=0
SESSION: virtio_crypto_sym_configure_session(): create session failed: -1
CRYPTODEV: rte_cryptodev_sym_session_init() line 1744: dev_id 0 failed to configure session details
0) TestCase AES-128-CBC Encryption line 458 FAILED: Session creation failed
SESSION: virtio_crypto_send_command(): Something wrong on backend! status=1, session_id=0
SESSION: virtio_crypto_sym_configure_session(): create session failed: -1
CRYPTODEV: rte_cryptodev_sym_session_init() line 1744: dev_id 0 failed to configure session details
1) TestCase AES-128-CBC Decryption line 458 FAILED: Session creation failed
SESSION: virtio_crypto_send_command(): Something wrong on backend! status=1, session_id=0
SESSION: virtio_crypto_sym_configure_session(): create session failed: -1
CRYPTODEV: rte_cryptodev_sym_session_init() line 1744: dev_id 0 failed to configure session details
2) TestCase AES-192-CBC Encryption line 458 FAILED: Session creation failed
Device doesn't support out-of-place scatter-gather in input mbuf. Test Skipped.
3) TestCase AES-192-CBC Encryption Scater gather SKIPPED
SESSION: virtio_crypto_send_command(): Something wrong on backend! status=1, session_id=0
SESSION: virtio_crypto_sym_configure_session(): create session failed: -1
CRYPTODEV: rte_cryptodev_sym_session_init() line 1744: dev_id 0 failed to configure session details
4) TestCase AES-192-CBC Decryption line 458 FAILED: Session creation failed
Device doesn't support in-place scatter-gather mbufs. Test Skipped.
5) TestCase AES-192-CBC Decryption Scatter Gather SKIPPED
SESSION: virtio_crypto_sym_configure_session(): Couldn't get object from session mempool
CRYPTODEV: rte_cryptodev_sym_session_init() line 1744: dev_id 0 failed to configure session details
6) TestCase AES-256-CBC Encryption line 458 FAILED: Session creation failed
SESSION: virtio_crypto_sym_configure_session(): Couldn't get object from session mempool
CRYPTODEV: rte_cryptodev_sym_session_init() line 1744: dev_id 0 failed to configure session details
7) TestCase AES-256-CBC Decryption line 458 FAILED: Session creation failed
SESSION: virtio_crypto_sym_configure_session(): Couldn't get object from session mempool
CRYPTODEV: rte_cryptodev_sym_session_init() line 1744: dev_id 0 failed to configure session details
8) TestCase AES-256-CBC OOP Encryption line 458 FAILED: Session creation
failed
SESSION: virtio_crypto_sym_configure_session(): Couldn't get object from session mempool
CRYPTODEV: rte_cryptodev_sym_session_init() line 1744: dev_id 0 failed to configure session details
9) TestCase AES-256-CBC OOP Decryption line 458 FAILED: Session creation
failed

The initial research to the problem is caused by recent change made to vhost library

Debug info in lib/vhost/vhost_crypto.c:

470 switch (ctx->msg.request.master) {
471 case VHOST_USER_CRYPTO_CREATE_SESS:
472 vhost_crypto_create_sess(vcrypto,
473 &ctx->msg.payload.crypto_session);

474                     ctx->fd_num = 0;
475                     ret = RTE_VHOST_MSG_RESULT_REPLY;
476                     break;

477 case VHOST_USER_CRYPTO_CLOSE_SESS:
478 if (vhost_crypto_close_sess(vcrypto,
ctx->msg.payload.u64))
479 ret = RTE_VHOST_MSG_RESULT_ERR;
(gdb) p ctx->msg.request.master
$12 = 0
(gdb) p ctx->msg.request
$13 = {master = 0, slave = 0}
(gdb) l
480 break;
481 default:
482 ret = RTE_VHOST_MSG_RESULT_NOT_HANDLED;
483 break;
484 }
485
486 return ret;

The code expect the request.master to be 26, but got 0 in the end. This cause the switch fallen into default case and return not handled. Looks like this problem is caused by this commit

commit 5e0099dc709e4abce167907e14335d8381f1944e

Author: Christophe Fontaine <[email protected]>
Date:   Mon Feb 7 11:21:29 2022 +0100

vhost: remove payload size limitation

FDs at the end of the VhostUserMessage structure limits the size of the payload. Move them to an other englobing structure, before the header & payload of a VhostUserMessage.
Also removes a reference to fds in the VHUMsg structure defined in drivers/net/virtio/virtio_user/vhost_user.c

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=953

Fan Zhang ([email protected]) changed:

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

             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #5 from Fan Zhang ([email protected]) --- Resolved by
https://patchwork.dpdk.org/project/dpdk/patch/[email protected]/

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