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

Function pdump_validate_ring_mp

dpdk/lib/pdump/rte_pdump.c:456–481  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

454}
455
456static int
457pdump_validate_ring_mp(struct rte_ring *ring, struct rte_mempool *mp)
458{
459 if (ring == NULL || mp == NULL) {
460 PDUMP_LOG(ERR, "NULL ring or mempool\n");
461 rte_errno = EINVAL;
462 return -1;
463 }
464 if (mp->flags & RTE_MEMPOOL_F_SP_PUT ||
465 mp->flags & RTE_MEMPOOL_F_SC_GET) {
466 PDUMP_LOG(ERR,
467 "mempool with SP or SC set not valid for pdump,"
468 "must have MP and MC set\n");
469 rte_errno = EINVAL;
470 return -1;
471 }
472 if (rte_ring_is_prod_single(ring) || rte_ring_is_cons_single(ring)) {
473 PDUMP_LOG(ERR,
474 "ring with SP or SC set is not valid for pdump,"
475 "must have MP and MC set\n");
476 rte_errno = EINVAL;
477 return -1;
478 }
479
480 return 0;
481}
482
483static int
484pdump_validate_flags(uint32_t flags)

Callers 2

pdump_enableFunction · 0.85
pdump_enable_by_deviceidFunction · 0.85

Calls 2

rte_ring_is_prod_singleFunction · 0.85
rte_ring_is_cons_singleFunction · 0.85

Tested by

no test coverage detected