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

Function pdump_enable

dpdk/lib/pdump/rte_pdump.c:587–611  ·  view source on GitHub ↗

* There are two versions of this function, because although original API * left place holder for future filter, it never checked the value. * Therefore the API can't depend on application passing a non * bogus value. */

Source from the content-addressed store, hash-verified

585 * bogus value.
586 */
587static int
588pdump_enable(uint16_t port, uint16_t queue,
589 uint32_t flags, uint32_t snaplen,
590 struct rte_ring *ring, struct rte_mempool *mp,
591 const struct rte_bpf_prm *prm)
592{
593 int ret;
594 char name[RTE_DEV_NAME_MAX_LEN];
595
596 ret = pdump_validate_port(port, name);
597 if (ret < 0)
598 return ret;
599 ret = pdump_validate_ring_mp(ring, mp);
600 if (ret < 0)
601 return ret;
602 ret = pdump_validate_flags(flags);
603 if (ret < 0)
604 return ret;
605
606 if (snaplen == 0)
607 snaplen = UINT32_MAX;
608
609 return pdump_prepare_client_request(name, queue, flags, snaplen,
610 ENABLE, ring, mp, prm);
611}
612
613int
614rte_pdump_enable(uint16_t port, uint16_t queue, uint32_t flags,

Callers 2

rte_pdump_enableFunction · 0.85
rte_pdump_enable_bpfFunction · 0.85

Calls 4

pdump_validate_portFunction · 0.85
pdump_validate_ring_mpFunction · 0.85
pdump_validate_flagsFunction · 0.85

Tested by

no test coverage detected