| 271 | } |
| 272 | |
| 273 | static int |
| 274 | parse_cryptodev_id_arg(char *arg) |
| 275 | { |
| 276 | uint32_t cryptodev_id; |
| 277 | |
| 278 | if (parser_read_uint32(&cryptodev_id, arg) < 0) { |
| 279 | RTE_LOG(ERR, USER1, "Error %i: invalid cryptodev id %s\n", |
| 280 | -EINVAL, arg); |
| 281 | return -1; |
| 282 | } |
| 283 | |
| 284 | |
| 285 | if (!rte_cryptodev_is_valid_dev(cryptodev_id)) { |
| 286 | RTE_LOG(ERR, USER1, "Error %i: invalid cryptodev id %s\n", |
| 287 | cryptodev_id, arg); |
| 288 | return -1; |
| 289 | } |
| 290 | |
| 291 | env.dev_id = (uint8_t)cryptodev_id; |
| 292 | |
| 293 | return 0; |
| 294 | } |
| 295 | |
| 296 | static void |
| 297 | cryptodev_fips_validate_usage(const char *prgname) |
no test coverage detected