* Setting profiling Rx callback for a given Ethernet device. * This function must be invoked when Ethernet device is being configured. * * @param port_id * The port identifier of the Ethernet device. * @param rx_queue_num * The number of Rx queues on specified port. * * @return * - On success, zero. * - On failure, a negative value. */
| 36 | * - On failure, a negative value. |
| 37 | */ |
| 38 | static inline int |
| 39 | vtune_profile_rx_init(uint16_t port_id, uint8_t rx_queue_num) |
| 40 | { |
| 41 | uint16_t q_id; |
| 42 | |
| 43 | for (q_id = 0; q_id < rx_queue_num; ++q_id) { |
| 44 | if (!rte_eth_add_rx_callback( |
| 45 | port_id, q_id, profile_hook_rx_burst_cb, NULL)) { |
| 46 | return -rte_errno; |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | return 0; |
| 51 | } |
| 52 | #endif /* RTE_ETHDEV_PROFILE_WITH_VTUNE */ |
| 53 | |
| 54 | int |
no test coverage detected