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

Function cryptodev_null_create

dpdk/drivers/crypto/null/null_crypto_pmd.c:148–180  ·  view source on GitHub ↗

Create crypto device */

Source from the content-addressed store, hash-verified

146
147/** Create crypto device */
148static int
149cryptodev_null_create(const char *name,
150 struct rte_vdev_device *vdev,
151 struct rte_cryptodev_pmd_init_params *init_params)
152{
153 struct rte_cryptodev *dev;
154 struct null_crypto_private *internals;
155 dev = rte_cryptodev_pmd_create(name, &vdev->device, init_params);
156 if (dev == NULL) {
157 NULL_LOG(ERR, "failed to create cryptodev vdev");
158 return -EFAULT;
159 }
160
161 dev->driver_id = cryptodev_driver_id;
162 dev->dev_ops = null_crypto_pmd_ops;
163
164 /* register rx/tx burst functions for data path */
165 dev->dequeue_burst = null_crypto_pmd_dequeue_burst;
166 dev->enqueue_burst = null_crypto_pmd_enqueue_burst;
167
168 dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
169 RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
170 RTE_CRYPTODEV_FF_IN_PLACE_SGL |
171 RTE_CRYPTODEV_FF_SYM_SESSIONLESS;
172
173 internals = dev->data->dev_private;
174
175 internals->max_nb_qpairs = init_params->max_nb_queue_pairs;
176
177 rte_cryptodev_pmd_probing_finish(dev);
178
179 return 0;
180}
181
182/** Initialise null crypto device */
183static int

Callers 1

cryptodev_null_probeFunction · 0.85

Calls 2

rte_cryptodev_pmd_createFunction · 0.85

Tested by

no test coverage detected