* 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. */
| 585 | * bogus value. |
| 586 | */ |
| 587 | static int |
| 588 | pdump_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 | |
| 613 | int |
| 614 | rte_pdump_enable(uint16_t port, uint16_t queue, uint32_t flags, |
no test coverage detected