1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2018 HUAWEI TECHNOLOGIES CO., LTD.
8 #include <rte_crypto.h>
9 #include <rte_malloc.h>
11 #include "virtqueue.h"
14 virtqueue_disable_intr(struct virtqueue *vq)
17 * Set VRING_AVAIL_F_NO_INTERRUPT to hint host
18 * not to interrupt when it consumes packets
19 * Note: this is only considered a hint to the host
21 vq->vq_ring.avail->flags |= VRING_AVAIL_F_NO_INTERRUPT;
25 virtqueue_detatch_unused(struct virtqueue *vq)
27 struct rte_crypto_op *cop = NULL;
32 for (idx = 0; idx < vq->vq_nentries; idx++) {
33 cop = vq->vq_descx[idx].crypto_op;
36 rte_pktmbuf_free(cop->sym->m_src);
38 rte_pktmbuf_free(cop->sym->m_dst);
39 rte_crypto_op_free(cop);
40 vq->vq_descx[idx].crypto_op = NULL;