Lines Matching refs:cryptodev
26 struct cryptodev *
29 struct cryptodev *cryptodev; in cryptodev_find() local
34 TAILQ_FOREACH(cryptodev, &cryptodev_list, node) in cryptodev_find()
35 if (strcmp(cryptodev->name, name) == 0) in cryptodev_find()
36 return cryptodev; in cryptodev_find()
41 struct cryptodev *
42 cryptodev_next(struct cryptodev *cryptodev) in cryptodev_next() argument
44 return (cryptodev == NULL) ? in cryptodev_next()
46 TAILQ_NEXT(cryptodev, node); in cryptodev_next()
49 struct cryptodev *
55 struct cryptodev *cryptodev; in cryptodev_create() local
113 cryptodev = calloc(1, sizeof(struct cryptodev)); in cryptodev_create()
114 if (cryptodev == NULL) { in cryptodev_create()
119 strlcpy(cryptodev->name, name, sizeof(cryptodev->name)); in cryptodev_create()
120 cryptodev->dev_id = dev_id; in cryptodev_create()
121 cryptodev->n_queues = params->n_queues; in cryptodev_create()
124 cryptodev->mp_create = rte_cryptodev_sym_session_pool_create( in cryptodev_create()
131 if (!cryptodev->mp_create) in cryptodev_create()
135 cryptodev->mp_init = rte_mempool_create( in cryptodev_create()
147 if (!cryptodev->mp_init) in cryptodev_create()
150 TAILQ_INSERT_TAIL(&cryptodev_list, cryptodev, node); in cryptodev_create()
152 return cryptodev; in cryptodev_create()
155 if (cryptodev->mp_create) in cryptodev_create()
156 rte_mempool_free(cryptodev->mp_create); in cryptodev_create()
157 if (cryptodev->mp_init) in cryptodev_create()
158 rte_mempool_free(cryptodev->mp_init); in cryptodev_create()
160 free(cryptodev); in cryptodev_create()