#include <rte_branch_prediction.h>
#include <rte_common.h>
-#include <rte_cryptodev.h>
+#include <cryptodev_pmd.h>
#include <rte_errno.h>
#include <rte_mempool.h>
#include <rte_memzone.h>
/* CPT VF device initialization */
otx_cpt_vfvq_init(cptvf);
- /* Send msg to PF to assign currnet Q to required group */
+ /* Send msg to PF to assign current Q to required group */
cptvf->vfgrp = group;
err = otx_cpt_send_vf_grp_msg(cptvf, group);
if (err) {
memset(&cptvf->pqueue, 0, sizeof(cptvf->pqueue));
/* Chunks are of fixed size buffers */
+
+ qlen = DEFAULT_CMD_QLEN;
chunks = DEFAULT_CMD_QCHUNKS;
chunk_len = DEFAULT_CMD_QCHUNK_SIZE;
-
- qlen = chunks * chunk_len;
/* Chunk size includes 8 bytes of next chunk ptr */
chunk_size = chunk_len * CPT_INST_SIZE + CPT_NEXT_CHUNK_PTR_SIZE;
len = chunks * RTE_ALIGN(sizeof(struct command_chunk), 8);
/* For pending queue */
- len += qlen * sizeof(uintptr_t);
+ len += qlen * RTE_ALIGN(sizeof(cptvf->pqueue.rid_queue[0]), 8);
/* So that instruction queues start as pg size aligned */
len = RTE_ALIGN(len, pg_sz);
}
/* Pending queue setup */
- cptvf->pqueue.req_queue = (uintptr_t *)mem;
- cptvf->pqueue.enq_tail = 0;
- cptvf->pqueue.deq_head = 0;
- cptvf->pqueue.pending_count = 0;
-
- mem += qlen * sizeof(uintptr_t);
- len -= qlen * sizeof(uintptr_t);
- dma_addr += qlen * sizeof(uintptr_t);
+ cptvf->pqueue.rid_queue = (void **)mem;
+
+ mem += qlen * RTE_ALIGN(sizeof(cptvf->pqueue.rid_queue[0]), 8);
+ len -= qlen * RTE_ALIGN(sizeof(cptvf->pqueue.rid_queue[0]), 8);
+ dma_addr += qlen * RTE_ALIGN(sizeof(cptvf->pqueue.rid_queue[0]), 8);
/* Alignment wastage */
used_len = alloc_len - len;