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

Function pdump_validate_flags

dpdk/lib/pdump/rte_pdump.c:483–502  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

481}
482
483static int
484pdump_validate_flags(uint32_t flags)
485{
486 if ((flags & RTE_PDUMP_FLAG_RXTX) == 0) {
487 PDUMP_LOG(ERR,
488 "invalid flags, should be either rx/tx/rxtx\n");
489 rte_errno = EINVAL;
490 return -1;
491 }
492
493 /* mask off the flags we know about */
494 if (flags & ~(RTE_PDUMP_FLAG_RXTX | RTE_PDUMP_FLAG_PCAPNG)) {
495 PDUMP_LOG(ERR,
496 "unknown flags: %#x\n", flags);
497 rte_errno = ENOTSUP;
498 return -1;
499 }
500
501 return 0;
502}
503
504static int
505pdump_validate_port(uint16_t port, char *name)

Callers 4

pdump_enableFunction · 0.85
pdump_enable_by_deviceidFunction · 0.85
rte_pdump_disableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected