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

Function parse_cryptodev_id_arg

dpdk/examples/fips_validation/main.c:273–294  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

271}
272
273static int
274parse_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
296static void
297cryptodev_fips_validate_usage(const char *prgname)

Callers 1

Calls 2

parser_read_uint32Function · 0.70

Tested by

no test coverage detected