#include <time.h>
#include <net/if.h>
+#include <unistd.h>
#include <rte_mbuf.h>
#include <rte_cryptodev.h>
}
static inline struct rte_crypto_op *
-sec_simple_fd_to_mbuf(const struct qbman_fd *fd, __rte_unused uint8_t id)
+sec_simple_fd_to_mbuf(const struct qbman_fd *fd)
{
struct rte_crypto_op *op;
uint16_t len = DPAA2_GET_FD_LEN(fd);
}
static inline struct rte_crypto_op *
-sec_fd_to_mbuf(const struct qbman_fd *fd, uint8_t driver_id)
+sec_fd_to_mbuf(const struct qbman_fd *fd)
{
struct qbman_fle *fle;
struct rte_crypto_op *op;
struct rte_mbuf *dst, *src;
if (DPAA2_FD_GET_FORMAT(fd) == qbman_fd_single)
- return sec_simple_fd_to_mbuf(fd, driver_id);
+ return sec_simple_fd_to_mbuf(fd);
fle = (struct qbman_fle *)DPAA2_IOVA_TO_VADDR(DPAA2_GET_FD_ADDR(fd));
{
/* Function is responsible to receive frames for a given device and VQ*/
struct dpaa2_sec_qp *dpaa2_qp = (struct dpaa2_sec_qp *)qp;
- struct rte_cryptodev *dev =
- (struct rte_cryptodev *)(dpaa2_qp->rx_vq.dev);
struct qbman_result *dq_storage;
uint32_t fqid = dpaa2_qp->rx_vq.fqid;
int ret, num_rx = 0;
}
fd = qbman_result_DQ_fd(dq_storage);
- ops[num_rx] = sec_fd_to_mbuf(fd, dev->driver_id);
+ ops[num_rx] = sec_fd_to_mbuf(fd);
if (unlikely(fd->simple.frc)) {
/* TODO Parse SEC errors */
return -1;
}
- qp->rx_vq.dev = dev;
- qp->tx_vq.dev = dev;
+ qp->rx_vq.crypto_data = dev->data;
+ qp->tx_vq.crypto_data = dev->data;
qp->rx_vq.q_storage = rte_malloc("sec dq storage",
sizeof(struct queue_storage_info_t),
RTE_CACHE_LINE_SIZE);
ev->sched_type = rxq->ev.sched_type;
ev->queue_id = rxq->ev.queue_id;
ev->priority = rxq->ev.priority;
- ev->event_ptr = sec_fd_to_mbuf(fd, ((struct rte_cryptodev *)
- (rxq->dev))->driver_id);
+ ev->event_ptr = sec_fd_to_mbuf(fd);
qbman_swp_dqrr_consume(swp, dq);
}
ev->queue_id = rxq->ev.queue_id;
ev->priority = rxq->ev.priority;
- ev->event_ptr = sec_fd_to_mbuf(fd, ((struct rte_cryptodev *)
- (rxq->dev))->driver_id);
+ ev->event_ptr = sec_fd_to_mbuf(fd);
dqrr_index = qbman_get_dqrr_idx(dq);
crypto_op->sym->m_src->seqn = dqrr_index + 1;
DPAA2_PER_LCORE_DQRR_SIZE++;
uint16_t token;
struct dpseci_attr attr;
int retcode, hw_id;
- char str[20];
+ char str[30];
PMD_INIT_FUNC_TRACE();
dpaa2_dev = container_of(dev, struct rte_dpaa2_device, device);
internals->hw = dpseci;
internals->token = token;
- snprintf(str, sizeof(str), "fle_pool_%d", cryptodev->data->dev_id);
+ snprintf(str, sizeof(str), "sec_fle_pool_p%d_%d",
+ getpid(), cryptodev->data->dev_id);
internals->fle_pool = rte_mempool_create((const char *)str,
FLE_POOL_NUM_BUFS,
FLE_POOL_BUF_SIZE,