Initialise null crypto device */
| 181 | |
| 182 | /** Initialise null crypto device */ |
| 183 | static int |
| 184 | cryptodev_null_probe(struct rte_vdev_device *dev) |
| 185 | { |
| 186 | struct rte_cryptodev_pmd_init_params init_params = { |
| 187 | "", |
| 188 | sizeof(struct null_crypto_private), |
| 189 | rte_socket_id(), |
| 190 | RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS |
| 191 | }; |
| 192 | const char *name, *args; |
| 193 | int retval; |
| 194 | |
| 195 | name = rte_vdev_device_name(dev); |
| 196 | if (name == NULL) |
| 197 | return -EINVAL; |
| 198 | |
| 199 | args = rte_vdev_device_args(dev); |
| 200 | |
| 201 | retval = rte_cryptodev_pmd_parse_input_args(&init_params, args); |
| 202 | if (retval) { |
| 203 | NULL_LOG(ERR, |
| 204 | "Failed to parse initialisation arguments[%s]", |
| 205 | args); |
| 206 | return -EINVAL; |
| 207 | } |
| 208 | |
| 209 | return cryptodev_null_create(name, dev, &init_params); |
| 210 | } |
| 211 | |
| 212 | static int |
| 213 | cryptodev_null_remove_dev(struct rte_vdev_device *vdev) |
nothing calls this directly
no test coverage detected