All of lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla@dpdk.org
To: dev@dpdk.org
Subject: [Bug 953] Virtio Crypto Test failed
Date: Mon, 07 Mar 2022 17:02:09 +0000	[thread overview]
Message-ID: <bug-953-3@http.bugs.dpdk.org/> (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: dev@dpdk.org
          Reporter: roy.fan.zhang@intel.com
  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 <cfontain@redhat.com>
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

    Signed-off-by: Christophe Fontaine <cfontain@redhat.com>
    Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
    Reviewed-by: David Marchand <david.marchand@redhat.com>

-- 
You are receiving this mail because:
You are the assignee for the bug.

             reply	other threads:[~2022-03-07 17:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-07 17:02 bugzilla [this message]
2022-03-08 15:38 ` [Bug 953] Virtio Crypto Test failed 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-953-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.