From: qemudev@loongson.cn
To: test-report@dpdk.org
Cc: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>,
zhoumin@loongson.cn
Subject: |WARNING| pw149670-149671 [v2 1/2] crypto/virtio: refactor queue operations
Date: Wed, 8 Jan 2025 01:39:43 +0800 [thread overview]
Message-ID: <202501071739.507Hdh6B3167454@localhost.localdomain> (raw)
In-Reply-To: <4c5700d4acaff81d7f17ab9ceb7637d5c22bd009.1736270226.git.gmuthukrishn@marvell.com>
Test-Label: loongarch-compilation
Test-Status: WARNING
http://dpdk.org/patch/149670
_apply patch failure_
Submitter: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Date: Tue, 7 Jan 2025 23:38:28 +0530
DPDK git baseline: Repo:dpdk-next-crypto
Branch: for-main
CommitID: 7df61db6c387703a36306c1aea92225921e2eeb2
Apply patch set 149670-149671 failed:
Checking patch drivers/crypto/virtio/meson.build...
Checking patch drivers/crypto/virtio/virtio_crypto_algs.h...
Checking patch drivers/crypto/virtio/virtio_cryptodev.c...
error: while searching for:
uint8_t cryptodev_virtio_driver_id;
#define NUM_ENTRY_SYM_CREATE_SESSION 4
static int
virtio_crypto_send_command(struct virtqueue *vq,
struct virtio_crypto_op_ctrl_req *ctrl, uint8_t *cipher_key,
uint8_t *auth_key, struct virtio_crypto_session *session)
{
uint8_t idx = 0;
uint8_t needed = 1;
uint32_t head = 0;
uint32_t len_cipher_key = 0;
uint32_t len_auth_key = 0;
uint32_t len_ctrl_req = sizeof(struct virtio_crypto_op_ctrl_req);
uint32_t len_session_input = sizeof(struct virtio_crypto_session_input);
uint32_t len_total = 0;
uint32_t input_offset = 0;
void *virt_addr_started = NULL;
phys_addr_t phys_addr_started;
struct vring_desc *desc;
uint32_t desc_offset;
struct virtio_crypto_session_input *input;
int ret;
PMD_INIT_FUNC_TRACE();
if (session == NULL) {
VIRTIO_CRYPTO_SESSION_LOG_ERR("session is NULL.");
return -EINVAL;
}
/* cipher only is supported, it is available if auth_key is NULL */
if (session->ctrl.header.algo == VIRTIO_CRYPTO_SERVICE_CIPHER && !cipher_key) {
VIRTIO_CRYPTO_SESSION_LOG_ERR("cipher key is NULL.");
return -EINVAL;
}
head = vq->vq_desc_head_idx;
VIRTIO_CRYPTO_INIT_LOG_DBG("vq->vq_desc_head_idx = %d, vq = %p",
head, vq);
if (vq->vq_free_cnt < needed) {
VIRTIO_CRYPTO_SESSION_LOG_ERR("Not enough entry");
return -ENOSPC;
}
/* calculate the length of cipher key */
if (cipher_key) {
if (session->ctrl.header.algo == VIRTIO_CRYPTO_SERVICE_CIPHER) {
switch (ctrl->u.sym_create_session.op_type) {
case VIRTIO_CRYPTO_SYM_OP_CIPHER:
len_cipher_key = ctrl->u.sym_create_session.u.cipher.para.keylen;
break;
case VIRTIO_CRYPTO_SYM_OP_ALGORITHM_CHAINING:
len_cipher_key =
ctrl->u.sym_create_session.u.chain.para.cipher_param.keylen;
break;
default:
VIRTIO_CRYPTO_SESSION_LOG_ERR("invalid op type");
return -EINVAL;
}
} else if (session->ctrl.header.algo == VIRTIO_CRYPTO_AKCIPHER_RSA) {
len_cipher_key = ctrl->u.akcipher_create_session.para.keylen;
} else {
VIRTIO_CRYPTO_SESSION_LOG_ERR("Invalid crypto service for cipher key");
return -EINVAL;
}
}
/* calculate the length of auth key */
if (auth_key) {
len_auth_key =
ctrl->u.sym_create_session.u.chain.para.u.mac_param
.auth_key_len;
}
/*
* malloc memory to store indirect vring_desc entries, including
* ctrl request, cipher key, auth key, session input and desc vring
*/
desc_offset = len_ctrl_req + len_cipher_key + len_auth_key
+ len_session_input;
virt_addr_started = rte_malloc(NULL,
desc_offset + NUM_ENTRY_SYM_CREATE_SESSION
* sizeof(struct vring_desc), RTE_CACHE_LINE_SIZE);
if (virt_addr_started == NULL) {
VIRTIO_CRYPTO_SESSION_LOG_ERR("not enough heap memory");
return -ENOSPC;
}
phys_addr_started = rte_malloc_virt2iova(virt_addr_started);
/* address to store indirect vring desc entries */
desc = (struct vring_desc *)
((uint8_t *)virt_addr_started + desc_offset);
/* ctrl req part */
memcpy(virt_addr_started, ctrl, len_ctrl_req);
desc[idx].addr = phys_addr_started;
desc[idx].len = len_ctrl_req;
desc[idx].flags = VRING_DESC_F_NEXT;
desc[idx].next = idx + 1;
idx++;
len_total += len_ctrl_req;
input_offset += len_ctrl_req;
/* cipher key part */
if (len_cipher_key > 0) {
memcpy((uint8_t *)virt_addr_started + len_total,
cipher_key, len_cipher_key);
desc[idx].addr = phys_addr_started + len_total;
desc[idx].len = len_cipher_key;
desc[idx].flags = VRING_DESC_F_NEXT;
desc[idx].next = idx + 1;
idx++;
len_total += len_cipher_key;
input_offset += len_cipher_key;
}
/* auth key part */
if (len_auth_key > 0) {
memcpy((uint8_t *)virt_addr_started + len_total,
auth_key, len_auth_key);
desc[idx].addr = phys_addr_started + len_total;
desc[idx].len = len_auth_key;
desc[idx].flags = VRING_DESC_F_NEXT;
desc[idx].next = idx + 1;
idx++;
len_total += len_auth_key;
input_offset += len_auth_key;
}
/* input part */
input = (struct virtio_crypto_session_input *)
((uint8_t *)virt_addr_started + input_offset);
input->status = VIRTIO_CRYPTO_ERR;
input->ses
error: patch failed: drivers/crypto/virtio/virtio_cryptodev.c:64
error: drivers/crypto/virtio/virtio_cryptodev.c: patch does not apply
Checking patch drivers/crypto/virtio/virtio_cvq.c...
Checking patch drivers/crypto/virtio/virtio_cvq.h...
Checking patch drivers/crypto/virtio/virtio_pci.h...
Checking patch drivers/crypto/virtio/virtio_ring.h...
Checking patch drivers/crypto/virtio/virtio_rxtx.c...
error: while searching for:
{
struct rte_crypto_asym_op *asym_op = cop->asym;
struct virtio_crypto_op_data_req *req_data = data;
struct virtio_crypto_op_ctrl_req *ctrl = &session->ctrl;
req_data->header.session_id = session->session_id;
error: patch failed: drivers/crypto/virtio/virtio_rxtx.c:351
error: drivers/crypto/virtio/virtio_rxtx.c: patch does not apply
Checking patch drivers/crypto/virtio/virtio_rxtx.h...
Checking patch drivers/crypto/virtio/virtqueue.c...
Checking patch drivers/crypto/virtio/virtqueue.h...
next parent reply other threads:[~2025-01-07 18:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4c5700d4acaff81d7f17ab9ceb7637d5c22bd009.1736270226.git.gmuthukrishn@marvell.com>
2025-01-07 17:39 ` qemudev [this message]
2025-01-07 18:09 ` |SUCCESS| pw149670 " checkpatch
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=202501071739.507Hdh6B3167454@localhost.localdomain \
--to=qemudev@loongson.cn \
--cc=gmuthukrishn@marvell.com \
--cc=test-report@dpdk.org \
--cc=zhoumin@loongson.cn \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).