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

Function pdump_validate_port

dpdk/lib/pdump/rte_pdump.c:504–524  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

502}
503
504static int
505pdump_validate_port(uint16_t port, char *name)
506{
507 int ret = 0;
508
509 if (port >= RTE_MAX_ETHPORTS) {
510 PDUMP_LOG(ERR, "Invalid port id %u\n", port);
511 rte_errno = EINVAL;
512 return -1;
513 }
514
515 ret = rte_eth_dev_get_name_by_port(port, name);
516 if (ret < 0) {
517 PDUMP_LOG(ERR, "port %u to name mapping failed\n",
518 port);
519 rte_errno = EINVAL;
520 return -1;
521 }
522
523 return 0;
524}
525
526static int
527pdump_prepare_client_request(const char *device, uint16_t queue,

Callers 2

pdump_enableFunction · 0.85
rte_pdump_disableFunction · 0.85

Calls 1

Tested by

no test coverage detected