MCPcopy Create free account
hub / github.com/F-Stack/f-stack / cryptodev_cb_cleanup

Function cryptodev_cb_cleanup

dpdk/lib/cryptodev/rte_cryptodev.c:632–670  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

630static rte_spinlock_t rte_cryptodev_callback_lock = RTE_SPINLOCK_INITIALIZER;
631
632static void
633cryptodev_cb_cleanup(struct rte_cryptodev *dev)
634{
635 struct rte_cryptodev_cb_rcu *list;
636 struct rte_cryptodev_cb *cb, *next;
637 uint16_t qp_id;
638
639 if (dev->enq_cbs == NULL && dev->deq_cbs == NULL)
640 return;
641
642 for (qp_id = 0; qp_id < dev->data->nb_queue_pairs; qp_id++) {
643 list = &dev->enq_cbs[qp_id];
644 cb = list->next;
645 while (cb != NULL) {
646 next = cb->next;
647 rte_free(cb);
648 cb = next;
649 }
650
651 rte_free(list->qsbr);
652 }
653
654 for (qp_id = 0; qp_id < dev->data->nb_queue_pairs; qp_id++) {
655 list = &dev->deq_cbs[qp_id];
656 cb = list->next;
657 while (cb != NULL) {
658 next = cb->next;
659 rte_free(cb);
660 cb = next;
661 }
662
663 rte_free(list->qsbr);
664 }
665
666 rte_free(dev->enq_cbs);
667 dev->enq_cbs = NULL;
668 rte_free(dev->deq_cbs);
669 dev->deq_cbs = NULL;
670}
671
672static int
673cryptodev_cb_init(struct rte_cryptodev *dev)

Callers 2

cryptodev_cb_initFunction · 0.85
rte_cryptodev_configureFunction · 0.85

Calls 1

rte_freeFunction · 0.85

Tested by

no test coverage detected